BLAS1_S
Basic Linear Algebra Subprograms
Level 1
Single Precision Real Arithmetic


BLAS1_S is a library of MATLAB routines, using double precision arithmetic, which implement the Level 1 BLAS, or Basic Linear Algebra Subprograms.

The BLAS are a small core library of linear algebra utilities, which can be highly optimized for various architectures. Software that relies on the BLAS is thus highly portable, and will typically run very efficiently. The LINPACK and LAPACK linear algebra libraries make extensive use of the BLAS.

The Level 1 BLAS are primarily for use in vector operations. In certain cases, they may also be used to operate on the rows or columns of a two-dimensional array.

It is worth questioning whether one should try to implement the Level 1 BLAS in MATLAB: for one thing, the MATLAB language makes it very easy to carry out vector operations, even with nonunit incrementing on the vector indices. Moreover, MATLAB actually makes it more difficult to stick with the syntax of the BLAS, since it is not so easy to make a two dimensional array "look like" a vector.

In particular, if you want to work on a row of a matrix, MATLAB essentially prefers you to make a temporary vector, as in "A(3,1:N)"; in the standard BLAS, you would instead pass the location of the first entry, A(3,1), and an increment, LDA, that will lead to the next entry of the row. This is not easy or natural to do in MATLAB. Still, for consistency, I have gone ahead and tried to make a reasonable effort at implementing the Level 1 BLAS.

Related Data and Programs:

BLAS1_C is a MATLAB library which is the single precision complex arithmetic version of BLAS1.

BLAS1_D is a MATLAB library which is the double precision real arithmetic version of BLAS1.

BLAS1_S is also available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version.

BLAS1_Z is a MATLAB library which is the double precision complex arithmetic version of BLAS1.

GSL is the Gnu Scientific Library which includes an implementation of the BLAS1 routines.

LAPACK is a FORTRAN90 library which is a linear algebra package that uses the BLAS1 routines.

LINPACK is a MATLAB library which is a linear algebra package that uses the BLAS1 routines.

SUPER_BLAS is a C library which is a version of some of the BLAS1 routines.

Reference:

  1. Thomas Coleman, Charles Van Loan,
    Handbook for Matrix Computations,
    SIAM, 1988,
    ISBN13: 978-0-898712-27-8.
  2. Jack Dongarra, Jim Bunch, Cleve Moler, Pete Stewart,
    LINPACK User's Guide,
    SIAM, 1979,
    ISBN13: 978-0-898711-72-1,
    LC: QA214.L56.
  3. Charles Lawson, Richard Hanson, David Kincaid, Fred Krogh,
    Algorithm 539, Basic Linear Algebra Subprograms for Fortran Usage,
    ACM Transactions on Mathematical Software,
    Volume 5, Number 3, September 1979, pages 308-323.

Tar File:

A GZIP'ed TAR file of the contents of this directory is available. This is only done as a convenience for users who want ALL the files, and don't want to download them individually. This is not a convenience for me, so don't be surprised if the tar file is somewhat out of date.

Source Code:

Examples and Tests:

Utility Routines:

You can go up one level to the MATLAB source codes.


Last revised on 09 May 2006.