Level 2 BLAS


SUBROUTINE SMXPY(N1,Y,N2,LDA,X,A)

SMXPY computes the product of a column vector X times a matrix A,
and adds the result to another column vector Y.

Y(I) = Y(I) + SUM(J=1 to N2) A(I,J)*X(J)

N1     Input, number of entries in Y.

Y      Input/output, REAL Y(N1), the vector to which X*A is to
       be added.

N2     Input, number of entries in X.

LDA    Input, leading dimension of the array A.

X      Input, REAL X(N2), column vector to be multiplied by X.

A      Input, REAL A(LDA,*), containing an N1 by N2 matrix
       which is to multiply X.


SUBROUTINE SXMPY(N1,LDY,Y,N2,LDX,X,LDA,A)

SXMPY computes the product of a row vector X and a matrix A,
and adds the result to another row vector Y.

Y(1,J)=Y(1,J) + SUM(I=1 to N2) X(1,I)*A(I,J)

N1     Input, number of entries in row vector Y
       (or number of columns in the array Y).

LDY    Input, leading dimension of the array Y.

Y      Input/output, REAL Y(LDY,N1), array containing the row
       vector Y as its first row.  On output, X*A has been
       added to the first row of Y.

N2     Input, number of entries in the row vector X,
       (or number of coumns in the array X).

LDX    Input, leading dimension of the array X.

X      Input, REAL X(LDX,N2), array containing the row vector
       X as its first row.

LDA    Input, leading dimension of the array A.

A      Input, REAL A(LDA,N1), array which is to be multiplied
       by X.


SUBROUTINE SGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)

SGBMV  performs one of the matrix-vector operations

   y := alpha*A*x + beta*y,   or   y := alpha*A'*x + beta*y,

where alpha and beta are scalars, x and y are vectors and A is an
m by n band matrix, with kl sub-diagonals and ku super-diagonals.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the operation to be performed as
         follows:

            TRANS = 'N' or 'n'   y := alpha*A*x + beta*y.

            TRANS = 'T' or 't'   y := alpha*A'*x + beta*y.

            TRANS = 'C' or 'c'   y := alpha*A'*x + beta*y.

         Unchanged on exit.

M      - INTEGER.
         On entry, M specifies the number of rows of the matrix A.
         M must be at least zero.
         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the number of columns of the matrix A.
         N must be at least zero.
         Unchanged on exit.

KL     - INTEGER.
         On entry, KL specifies the number of sub-diagonals of the
         matrix A. KL must satisfy  0 .le. KL.
         Unchanged on exit.

KU     - INTEGER.
         On entry, KU specifies the number of super-diagonals of the
         matrix A. KU must satisfy  0 .le. KU.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

A      - REAL             array of DIMENSION ( LDA, n ).
         Before entry, the leading ( kl + ku + 1 ) by n part of the
         array A must contain the matrix of coefficients, supplied
         column by column, with the leading diagonal of the matrix in
         row ( ku + 1 ) of the array, the first super-diagonal
         starting at position 2 in row ku, the first sub-diagonal
         starting at position 1 in row ( ku + 2 ), and so on.
         Elements in the array A that do not correspond to elements
         in the band matrix (such as the top left ku by ku triangle)
         are not referenced.
         The following program segment will transfer a band matrix
         from conventional full matrix storage to band storage:

               DO 20, J = 1, N
                  K = KU + 1 - J
                  DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
                     A( K + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         ( kl + ku + 1 ).
         Unchanged on exit.

X      - REAL             array of DIMENSION at least
         ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
         and at least
         ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
         Before entry, the incremented array X must contain the
         vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

BETA   - REAL            .
         On entry, BETA specifies the scalar beta. When BETA is
         supplied as zero then Y need not be set on input.
         Unchanged on exit.

Y      - REAL             array of DIMENSION at least
         ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
         and at least
         ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
         Before entry, the incremented array Y must contain the
         vector y. On exit, Y is overwritten by the updated vector y.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.


SUBROUTINE SGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)

SGEMV  performs one of the matrix-vector operations

   y := alpha*A*x + beta*y,   or   y := alpha*A'*x + beta*y,

where alpha and beta are scalars, x and y are vectors and A is an
m by n matrix.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the operation to be performed as
         follows:

            TRANS = 'N' or 'n'   y := alpha*A*x + beta*y.

            TRANS = 'T' or 't'   y := alpha*A'*x + beta*y.

            TRANS = 'C' or 'c'   y := alpha*A'*x + beta*y.

         Unchanged on exit.

M      - INTEGER.
         On entry, M specifies the number of rows of the matrix A.
         M must be at least zero.
         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the number of columns of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

A      - REAL             array of DIMENSION ( LDA, n ).
         Before entry, the leading m by n part of the array A must
         contain the matrix of coefficients.
         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, m ).
         Unchanged on exit.

X      - REAL             array of DIMENSION at least
         ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
         and at least
         ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
         Before entry, the incremented array X must contain the
         vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

BETA   - REAL            .
         On entry, BETA specifies the scalar beta. When BETA is
         supplied as zero then Y need not be set on input.
         Unchanged on exit.

Y      - REAL             array of DIMENSION at least
         ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
         and at least
         ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
         Before entry with BETA non-zero, the incremented array Y
         must contain the vector y. On exit, Y is overwritten by the
         updated vector y.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.


SUBROUTINE SGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)

SGER   performs the rank 1 operation

   A := alpha*x*y' + A,

where alpha is a scalar, x is an m element vector, y is an n element
vector and A is an m by n matrix.

M      - INTEGER.
         On entry, M specifies the number of rows of the matrix A.
         M must be at least zero.
         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the number of columns of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

X      - REAL             array of dimension at least
         ( 1 + ( m - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the m
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

Y      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the n
         element vector y.
         Unchanged on exit.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.

A      - REAL             array of DIMENSION ( LDA, n ).
         Before entry, the leading m by n part of the array A must
         contain the matrix of coefficients. On exit, A is
         overwritten by the updated matrix.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, m ).
         Unchanged on exit.


SUBROUTINE SSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)

SSBMV  performs the matrix-vector  operation

   y := alpha*A*x + beta*y,

where alpha and beta are scalars, x and y are n element vectors and
A is an n by n symmetric band matrix, with k super-diagonals.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the band matrix A is being supplied as
         follows:

            UPLO = 'U' or 'u'   The upper triangular part of A is
                                being supplied.

            UPLO = 'L' or 'l'   The lower triangular part of A is
                                being supplied.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

K      - INTEGER.
         On entry, K specifies the number of super-diagonals of the
         matrix A. K must satisfy  0 .le. K.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

A      - REAL             array of DIMENSION ( LDA, n ).
         Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
         by n part of the array A must contain the upper triangular
         band part of the symmetric matrix, supplied column by
         column, with the leading diagonal of the matrix in row
         ( k + 1 ) of the array, the first super-diagonal starting at
         position 2 in row k, and so on. The top left k by k triangle
         of the array A is not referenced.
         The following program segment will transfer the upper
         triangular part of a symmetric band matrix from conventional
         full matrix storage to band storage:

               DO 20, J = 1, N
                  M = K + 1 - J
                  DO 10, I = MAX( 1, J - K ), J
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
         by n part of the array A must contain the lower triangular
         band part of the symmetric matrix, supplied column by
         column, with the leading diagonal of the matrix in row 1 of
         the array, the first sub-diagonal starting at position 1 in
         row 2, and so on. The bottom right k by k triangle of the
         array A is not referenced.
         The following program segment will transfer the lower
         triangular part of a symmetric band matrix from conventional
         full matrix storage to band storage:

               DO 20, J = 1, N
                  M = 1 - J
                  DO 10, I = J, MIN( N, J + K )
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         ( k + 1 ).
         Unchanged on exit.

X      - REAL             array of DIMENSION at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the
         vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

BETA   - REAL            .
         On entry, BETA specifies the scalar beta.
         Unchanged on exit.

Y      - REAL             array of DIMENSION at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the
         vector y. On exit, Y is overwritten by the updated vector y.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.


SUBROUTINE SSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)

SSPMV  performs the matrix-vector operation

   y := alpha*A*x + beta*y,

where alpha and beta are scalars, x and y are n element vectors and
A is an n by n symmetric matrix, supplied in packed form.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the matrix A is supplied in the packed
         array AP as follows:

            UPLO = 'U' or 'u'   The upper triangular part of A is
                                supplied in AP.

            UPLO = 'L' or 'l'   The lower triangular part of A is
                                supplied in AP.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

AP     - REAL             array of DIMENSION at least
         ( ( n*( n + 1 ) )/2 ).
         Before entry with UPLO = 'U' or 'u', the array AP must
         contain the upper triangular part of the symmetric matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
         and a( 2, 2 ) respectively, and so on.
         Before entry with UPLO = 'L' or 'l', the array AP must
         contain the lower triangular part of the symmetric matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
         and a( 3, 1 ) respectively, and so on.
         Unchanged on exit.

X      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

BETA   - REAL            .
         On entry, BETA specifies the scalar beta. When BETA is
         supplied as zero then Y need not be set on input.
         Unchanged on exit.

Y      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the n
         element vector y. On exit, Y is overwritten by the updated
         vector y.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.


SUBROUTINE SSPR(UPLO,N,ALPHA,X,INCX,AP)

SSPR    performs the symmetric rank 1 operation

   A := alpha*x*x' + A,

where alpha is a real scalar, x is an n element vector and A is an
n by n symmetric matrix, supplied in packed form.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the matrix A is supplied in the packed
         array AP as follows:

            UPLO = 'U' or 'u'   The upper triangular part of A is
                                supplied in AP.

            UPLO = 'L' or 'l'   The lower triangular part of A is
                                supplied in AP.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

X      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

AP     - REAL             array of DIMENSION at least
         ( ( n*( n + 1 ) )/2 ).
         Before entry with  UPLO = 'U' or 'u', the array AP must
         contain the upper triangular part of the symmetric matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
         and a( 2, 2 ) respectively, and so on. On exit, the array
         AP is overwritten by the upper triangular part of the
         updated matrix.
         Before entry with UPLO = 'L' or 'l', the array AP must
         contain the lower triangular part of the symmetric matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
         and a( 3, 1 ) respectively, and so on. On exit, the array
         AP is overwritten by the lower triangular part of the
         updated matrix.


SUBROUTINE SSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)

SSPR2  performs the symmetric rank 2 operation

   A := alpha*x*y' + alpha*y*x' + A,

where alpha is a scalar, x and y are n element vectors and A is an
n by n symmetric matrix, supplied in packed form.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the matrix A is supplied in the packed
         array AP as follows:

            UPLO = 'U' or 'u'   The upper triangular part of A is
                                supplied in AP.

            UPLO = 'L' or 'l'   The lower triangular part of A is
                                supplied in AP.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

X      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

Y      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the n
         element vector y.
         Unchanged on exit.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.

AP     - REAL             array of DIMENSION at least
         ( ( n*( n + 1 ) )/2 ).
         Before entry with  UPLO = 'U' or 'u', the array AP must
         contain the upper triangular part of the symmetric matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
         and a( 2, 2 ) respectively, and so on. On exit, the array
         AP is overwritten by the upper triangular part of the
         updated matrix.
         Before entry with UPLO = 'L' or 'l', the array AP must
         contain the lower triangular part of the symmetric matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
         and a( 3, 1 ) respectively, and so on. On exit, the array
         AP is overwritten by the lower triangular part of the
         updated matrix.


SUBROUTINE SSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)

SSYMV  performs the matrix-vector  operation

   y := alpha*A*x + beta*y,

where alpha and beta are scalars, x and y are n element vectors and
A is an n by n symmetric matrix.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the array A is to be referenced as
         follows:

            UPLO = 'U' or 'u'   Only the upper triangular part of A
                                is to be referenced.

            UPLO = 'L' or 'l'   Only the lower triangular part of A
                                is to be referenced.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

A      - REAL             array of DIMENSION ( LDA, n ).
         Before entry with  UPLO = 'U' or 'u', the leading n by n
         upper triangular part of the array A must contain the upper
         triangular part of the symmetric matrix and the strictly
         lower triangular part of A is not referenced.
         Before entry with UPLO = 'L' or 'l', the leading n by n
         lower triangular part of the array A must contain the lower
         triangular part of the symmetric matrix and the strictly
         upper triangular part of A is not referenced.
         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, n ).
         Unchanged on exit.

X      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

BETA   - REAL            .
         On entry, BETA specifies the scalar beta. When BETA is
         supplied as zero then Y need not be set on input.
         Unchanged on exit.

Y      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the n
         element vector y. On exit, Y is overwritten by the updated
         vector y.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.


SUBROUTINE SSYR(UPLO,N,ALPHA,X,INCX,A,LDA)

SSYR   performs the symmetric rank 1 operation

   A := alpha*x*x' + A,

where alpha is a real scalar, x is an n element vector and A is an
n by n symmetric matrix.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the array A is to be referenced as
         follows:

            UPLO = 'U' or 'u'   Only the upper triangular part of A
                                is to be referenced.

            UPLO = 'L' or 'l'   Only the lower triangular part of A
                                is to be referenced.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

X      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

A      - REAL             array of DIMENSION ( LDA, n ).
         Before entry with  UPLO = 'U' or 'u', the leading n by n
         upper triangular part of the array A must contain the upper
         triangular part of the symmetric matrix and the strictly
         lower triangular part of A is not referenced. On exit, the
         upper triangular part of the array A is overwritten by the
         upper triangular part of the updated matrix.
         Before entry with UPLO = 'L' or 'l', the leading n by n
         lower triangular part of the array A must contain the lower
         triangular part of the symmetric matrix and the strictly
         upper triangular part of A is not referenced. On exit, the
         lower triangular part of the array A is overwritten by the
         lower triangular part of the updated matrix.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, n ).
         Unchanged on exit.


SUBROUTINE SSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)

SSYR2  performs the symmetric rank 2 operation

   A := alpha*x*y' + alpha*y*x' + A,

where alpha is a scalar, x and y are n element vectors and A is an n
by n symmetric matrix.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the array A is to be referenced as
         follows:

            UPLO = 'U' or 'u'   Only the upper triangular part of A
                                is to be referenced.

            UPLO = 'L' or 'l'   Only the lower triangular part of A
                                is to be referenced.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

X      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

Y      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the n
         element vector y.
         Unchanged on exit.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.

A      - REAL             array of DIMENSION ( LDA, n ).
         Before entry with  UPLO = 'U' or 'u', the leading n by n
         upper triangular part of the array A must contain the upper
         triangular part of the symmetric matrix and the strictly
         lower triangular part of A is not referenced. On exit, the
         upper triangular part of the array A is overwritten by the
         upper triangular part of the updated matrix.
         Before entry with UPLO = 'L' or 'l', the leading n by n
         lower triangular part of the array A must contain the lower
         triangular part of the symmetric matrix and the strictly
         upper triangular part of A is not referenced. On exit, the
         lower triangular part of the array A is overwritten by the
         lower triangular part of the updated matrix.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, n ).
         Unchanged on exit.


SUBROUTINE STBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)

STBMV  performs one of the matrix-vector operations

   x := A*x,   or   x := A'*x,

where x is an n element vector and  A is an n by n unit, or non-unit,
upper or lower triangular band matrix, with ( k + 1 ) diagonals.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the matrix is an upper or
         lower triangular matrix as follows:

            UPLO = 'U' or 'u'   A is an upper triangular matrix.

            UPLO = 'L' or 'l'   A is a lower triangular matrix.

         Unchanged on exit.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the operation to be performed as
         follows:

            TRANS = 'N' or 'n'   x := A*x.

            TRANS = 'T' or 't'   x := A'*x.

            TRANS = 'C' or 'c'   x := A'*x.

         Unchanged on exit.

DIAG   - CHARACTER*1.
         On entry, DIAG specifies whether or not A is unit
         triangular as follows:

            DIAG = 'U' or 'u'   A is assumed to be unit triangular.

            DIAG = 'N' or 'n'   A is not assumed to be unit
                                triangular.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

K      - INTEGER.
         On entry with UPLO = 'U' or 'u', K specifies the number of
         super-diagonals of the matrix A.
         On entry with UPLO = 'L' or 'l', K specifies the number of
         sub-diagonals of the matrix A.
         K must satisfy  0 .le. K.
         Unchanged on exit.

A      - REAL             array of DIMENSION ( LDA, n ).
         Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
         by n part of the array A must contain the upper triangular
         band part of the matrix of coefficients, supplied column by
         column, with the leading diagonal of the matrix in row
         ( k + 1 ) of the array, the first super-diagonal starting at
         position 2 in row k, and so on. The top left k by k triangle
         of the array A is not referenced.
         The following program segment will transfer an upper
         triangular band matrix from conventional full matrix storage
         to band storage:

               DO 20, J = 1, N
                  M = K + 1 - J
                  DO 10, I = MAX( 1, J - K ), J
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
         by n part of the array A must contain the lower triangular
         band part of the matrix of coefficients, supplied column by
         column, with the leading diagonal of the matrix in row 1 of
         the array, the first sub-diagonal starting at position 1 in
         row 2, and so on. The bottom right k by k triangle of the
         array A is not referenced.
         The following program segment will transfer a lower
         triangular band matrix from conventional full matrix storage
         to band storage:

               DO 20, J = 1, N
                  M = 1 - J
                  DO 10, I = J, MIN( N, J + K )
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Note that when DIAG = 'U' or 'u' the elements of the array A
         corresponding to the diagonal elements of the matrix are not
         referenced, but are assumed to be unity.
         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         ( k + 1 ).
         Unchanged on exit.

X      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x. On exit, X is overwritten with the
         tranformed vector x.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.


SUBROUTINE STBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)

STBSV  solves one of the systems of equations

   A*x = b,   or   A'*x = b,

where b and x are n element vectors and A is an n by n unit, or
non-unit, upper or lower triangular band matrix, with ( k + 1 )
diagonals.

No test for singularity or near-singularity is included in this
routine. Such tests must be performed before calling this routine.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the matrix is an upper or
         lower triangular matrix as follows:

            UPLO = 'U' or 'u'   A is an upper triangular matrix.

            UPLO = 'L' or 'l'   A is a lower triangular matrix.

         Unchanged on exit.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the equations to be solved as
         follows:

            TRANS = 'N' or 'n'   A*x = b.

            TRANS = 'T' or 't'   A'*x = b.

            TRANS = 'C' or 'c'   A'*x = b.

         Unchanged on exit.

DIAG   - CHARACTER*1.
         On entry, DIAG specifies whether or not A is unit
         triangular as follows:

            DIAG = 'U' or 'u'   A is assumed to be unit triangular.

            DIAG = 'N' or 'n'   A is not assumed to be unit
                                triangular.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

K      - INTEGER.
         On entry with UPLO = 'U' or 'u', K specifies the number of
         super-diagonals of the matrix A.
         On entry with UPLO = 'L' or 'l', K specifies the number of
         sub-diagonals of the matrix A.
         K must satisfy  0 .le. K.
         Unchanged on exit.

A      - REAL             array of DIMENSION ( LDA, n ).
         Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
         by n part of the array A must contain the upper triangular
         band part of the matrix of coefficients, supplied column by
         column, with the leading diagonal of the matrix in row
         ( k + 1 ) of the array, the first super-diagonal starting at
         position 2 in row k, and so on. The top left k by k triangle
         of the array A is not referenced.
         The following program segment will transfer an upper
         triangular band matrix from conventional full matrix storage
         to band storage:

               DO 20, J = 1, N
                  M = K + 1 - J
                  DO 10, I = MAX( 1, J - K ), J
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
         by n part of the array A must contain the lower triangular
         band part of the matrix of coefficients, supplied column by
         column, with the leading diagonal of the matrix in row 1 of
         the array, the first sub-diagonal starting at position 1 in
         row 2, and so on. The bottom right k by k triangle of the
         array A is not referenced.
         The following program segment will transfer a lower
         triangular band matrix from conventional full matrix storage
         to band storage:

               DO 20, J = 1, N
                  M = 1 - J
                  DO 10, I = J, MIN( N, J + K )
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Note that when DIAG = 'U' or 'u' the elements of the array A
         corresponding to the diagonal elements of the matrix are not
         referenced, but are assumed to be unity.
         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         ( k + 1 ).
         Unchanged on exit.

X      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element right-hand side vector b. On exit, X is overwritten
         with the solution vector x.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.


SUBROUTINE STPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)

STPMV  performs one of the matrix-vector operations

   x := A*x,   or   x := A'*x,

where x is an n element vector and  A is an n by n unit, or non-unit,
upper or lower triangular matrix, supplied in packed form.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the matrix is an upper or
         lower triangular matrix as follows:

            UPLO = 'U' or 'u'   A is an upper triangular matrix.

            UPLO = 'L' or 'l'   A is a lower triangular matrix.

         Unchanged on exit.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the operation to be performed as
         follows:

            TRANS = 'N' or 'n'   x := A*x.

            TRANS = 'T' or 't'   x := A'*x.

            TRANS = 'C' or 'c'   x := A'*x.

         Unchanged on exit.

DIAG   - CHARACTER*1.
         On entry, DIAG specifies whether or not A is unit
         triangular as follows:

            DIAG = 'U' or 'u'   A is assumed to be unit triangular.

            DIAG = 'N' or 'n'   A is not assumed to be unit
                                triangular.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

AP     - REAL             array of DIMENSION at least
         ( ( n*( n + 1 ) )/2 ).
         Before entry with  UPLO = 'U' or 'u', the array AP must
         contain the upper triangular matrix packed sequentially,
         column by column, so that AP( 1 ) contains a( 1, 1 ),
         AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
         respectively, and so on.
         Before entry with UPLO = 'L' or 'l', the array AP must
         contain the lower triangular matrix packed sequentially,
         column by column, so that AP( 1 ) contains a( 1, 1 ),
         AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
         respectively, and so on.
         Note that when  DIAG = 'U' or 'u', the diagonal elements of
         A are not referenced, but are assumed to be unity.
         Unchanged on exit.

X      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x. On exit, X is overwritten with the
         tranformed vector x.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.


SUBROUTINE STPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)

STPSV  solves one of the systems of equations

   A*x = b,   or   A'*x = b,

where b and x are n element vectors and A is an n by n unit, or
non-unit, upper or lower triangular matrix, supplied in packed form.

No test for singularity or near-singularity is included in this
routine. Such tests must be performed before calling this routine.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the matrix is an upper or
         lower triangular matrix as follows:

            UPLO = 'U' or 'u'   A is an upper triangular matrix.

            UPLO = 'L' or 'l'   A is a lower triangular matrix.

         Unchanged on exit.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the equations to be solved as
         follows:

            TRANS = 'N' or 'n'   A*x = b.

            TRANS = 'T' or 't'   A'*x = b.

            TRANS = 'C' or 'c'   A'*x = b.

         Unchanged on exit.

DIAG   - CHARACTER*1.
         On entry, DIAG specifies whether or not A is unit
         triangular as follows:

            DIAG = 'U' or 'u'   A is assumed to be unit triangular.

            DIAG = 'N' or 'n'   A is not assumed to be unit
                                triangular.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

AP     - REAL             array of DIMENSION at least
         ( ( n*( n + 1 ) )/2 ).
         Before entry with  UPLO = 'U' or 'u', the array AP must
         contain the upper triangular matrix packed sequentially,
         column by column, so that AP( 1 ) contains a( 1, 1 ),
         AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
         respectively, and so on.
         Before entry with UPLO = 'L' or 'l', the array AP must
         contain the lower triangular matrix packed sequentially,
         column by column, so that AP( 1 ) contains a( 1, 1 ),
         AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
         respectively, and so on.
         Note that when  DIAG = 'U' or 'u', the diagonal elements of
         A are not referenced, but are assumed to be unity.
         Unchanged on exit.

X      - REAL             array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element right-hand side vector b. On exit, X is overwritten
         with the solution vector x.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.


SUBROUTINE STRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)

STRMV  performs one of the matrix-vector operations

   x := A*x,   or   x := TRANSPOSE(A)*x,

where x is an n element vector and  A is an n by n unit, or non-unit,
upper or lower triangular matrix.

UPLO   Input, CHARACTER*1 UPLO.
       On entry, UPLO specifies whether the matrix is an upper or
       lower triangular matrix as follows:

         UPLO = 'U' or 'u'   A is an upper triangular matrix.

         UPLO = 'L' or 'l'   A is a lower triangular matrix.

TRANS  Input, CHARACTER*1 TRANS.
       On entry, TRANS specifies the operation to be performed as follows:

         TRANS = 'N' or 'n'   x := A*x.

         TRANS = 'T' or 't'   x := A'*x.

         TRANS = 'C' or 'c'   x := A'*x.

DIAG   Input, CHARACTER*1 DIAG.
       On entry, DIAG specifies whether or not A is unit triangular as
       follows:

         DIAG = 'U' or 'u'   A is assumed to be unit triangular.

         DIAG = 'N' or 'n'   A is not assumed to be unit triangular.

N      Input, INTEGER N.
       On entry, N specifies the order of the matrix A.
       N must be at least zero.

A      Input, REAL A(LDA,N).
       Before entry with  UPLO = 'U' or 'u', the leading n by n
       upper triangular part of the array A must contain the upper
       triangular matrix and the strictly lower triangular part of
       A is not referenced.
       Before entry with UPLO = 'L' or 'l', the leading n by n
       lower triangular part of the array A must contain the lower
       triangular matrix and the strictly upper triangular part of
       A is not referenced.
       Note that when  DIAG = 'U' or 'u', the diagonal elements of
       A are not referenced either, but are assumed to be unity.

LDA    Input, INTEGER LDA.
       On entry, LDA specifies the first dimension of A as declared
       in the calling (sub) program. LDA must be at least max( 1, n ).

X      Input/output, REAL X(N).
       Before entry, the incremented array X must contain the n
       element vector x. On exit, X is overwritten with the
       tranformed vector x.

INCX   Input, INTEGER INCX.
       On entry, INCX specifies the increment for the elements of
       X. INCX must not be zero.


SUBROUTINE STRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)

STRSV solves one of the systems of equations

   A*x = b,   or   A'*x = b,

where b and x are n element vectors and A is an n by n unit, or
non-unit, upper or lower triangular matrix.

No test for singularity or near-singularity is included in this
routine. Such tests must be performed before calling this routine.

UPLO   CHARACTER*1.
       On entry, UPLO specifies whether the matrix is an upper or
       lower triangular matrix as follows:

       UPLO = 'U' or 'u'   A is an upper triangular matrix.

       UPLO = 'L' or 'l'   A is a lower triangular matrix.

       Unchanged on exit.

TRANS  CHARACTER*1.
       On entry, TRANS specifies the equations to be solved as
       follows:

       TRANS = 'N' or 'n'   A*x = b.

       TRANS = 'T' or 't'   A'*x = b.

       TRANS = 'C' or 'c'   A'*x = b.

       Unchanged on exit.

DIAG   CHARACTER*1.
       On entry, DIAG specifies whether or not A is unit
       triangular as follows:

       DIAG = 'U' or 'u'   A is assumed to be unit triangular.

       DIAG = 'N' or 'n'   A is not assumed to be unit triangular.

       Unchanged on exit.

N      INTEGER.
       On entry, N specifies the order of the matrix A.
       N must be at least zero.
       Unchanged on exit.

A      REAL             array of DIMENSION ( LDA, n ).
       Before entry with  UPLO = 'U' or 'u', the leading n by n
       upper triangular part of the array A must contain the upper
       triangular matrix and the strictly lower triangular part of
       A is not referenced.
       Before entry with UPLO = 'L' or 'l', the leading n by n
       lower triangular part of the array A must contain the lower
       triangular matrix and the strictly upper triangular part of
       A is not referenced.
       Note that when  DIAG = 'U' or 'u', the diagonal elements of
       A are not referenced either, but are assumed to be unity.
       Unchanged on exit.

LDA    INTEGER.
       On entry, LDA specifies the first dimension of A as declared
       in the calling (sub) program. LDA must be at least
       max( 1, n ).
       Unchanged on exit.

X      REAL             array of dimension at least
       ( 1 + ( n - 1 )*abs( INCX ) ).
       Before entry, the incremented array X must contain the n
       element right-hand side vector b. On exit, X is overwritten
       with the solution vector x.

INCX   INTEGER.
       On entry, INCX specifies the increment for the elements of
       X. INCX must not be zero.
       Unchanged on exit.


SUBROUTINE XERBLA(SRNAME,INFO)


XERBLA  is an error handler for the Level 2 BLAS routines.

It is called by the Level 2 BLAS routines if an input parameter is
invalid.

SRNAME - CHARACTER*6.
         On entry, SRNAME specifies the name of the routine which
         called XERBLA.

INFO   - INTEGER.
         On entry, INFO specifies the position of the invalid
         parameter in the parameter-list of the calling routine.


LOGICAL FUNCTION LSAME ( CA, CB )

LSAME  tests if CA is the same letter as CB regardless of case.
CB is assumed to be an upper case letter. LSAME returns .TRUE. if
CA is either the same as CB or the equivalent lower case letter.

N.B. This version of the routine is only correct for ASCII code.
     Installers must modify the routine for other character-codes.

     For EBCDIC systems the constant IOFF must be changed to -64.
     For CDC systems using 6-12 bit representations, the system-
     specific code in comments must be activated.

CA     - CHARACTER*1

CB     - CHARACTER*1
         On entry, CA and CB specify characters to be compared.
         Unchanged on exit.


SUBROUTINE CGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)

CGBMV  performs one of the matrix-vector operations

   y := alpha*A*x + beta*y,   or   y := alpha*A'*x + beta*y,   or

   y := alpha*conjg( A' )*x + beta*y,

where alpha and beta are scalars, x and y are vectors and A is an
m by n band matrix, with kl sub-diagonals and ku super-diagonals.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the operation to be performed as
         follows:

            TRANS = 'N' or 'n'   y := alpha*A*x + beta*y.

            TRANS = 'T' or 't'   y := alpha*A'*x + beta*y.

            TRANS = 'C' or 'c'   y := alpha*conjg( A' )*x + beta*y.

         Unchanged on exit.

M      - INTEGER.
         On entry, M specifies the number of rows of the matrix A.
         M must be at least zero.
         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the number of columns of the matrix A.
         N must be at least zero.
         Unchanged on exit.

KL     - INTEGER.
         On entry, KL specifies the number of sub-diagonals of the
         matrix A. KL must satisfy  0 .le. KL.
         Unchanged on exit.

KU     - INTEGER.
         On entry, KU specifies the number of super-diagonals of the
         matrix A. KU must satisfy  0 .le. KU.
         Unchanged on exit.

ALPHA  - COMPLEX         .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry, the leading ( kl + ku + 1 ) by n part of the
         array A must contain the matrix of coefficients, supplied
         column by column, with the leading diagonal of the matrix in
         row ( ku + 1 ) of the array, the first super-diagonal
         starting at position 2 in row ku, the first sub-diagonal
         starting at position 1 in row ( ku + 2 ), and so on.
         Elements in the array A that do not correspond to elements
         in the band matrix (such as the top left ku by ku triangle)
         are not referenced.
         The following program segment will transfer a band matrix
         from conventional full matrix storage to band storage:

               DO 20, J = 1, N
                  K = KU + 1 - J
                  DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
                     A( K + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         ( kl + ku + 1 ).
         Unchanged on exit.

X      - COMPLEX          array of DIMENSION at least
         ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
         and at least
         ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
         Before entry, the incremented array X must contain the
         vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

BETA   - COMPLEX         .
         On entry, BETA specifies the scalar beta. When BETA is
         supplied as zero then Y need not be set on input.
         Unchanged on exit.

Y      - COMPLEX          array of DIMENSION at least
         ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
         and at least
         ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
         Before entry, the incremented array Y must contain the
         vector y. On exit, Y is overwritten by the updated vector y.


INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.



SUBROUTINE CGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)

CGEMV  performs one of the matrix-vector operations

   y := alpha*A*x + beta*y,   or   y := alpha*A'*x + beta*y,   or

   y := alpha*conjg( A' )*x + beta*y,

where alpha and beta are scalars, x and y are vectors and A is an
m by n matrix.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the operation to be performed as
         follows:

            TRANS = 'N' or 'n'   y := alpha*A*x + beta*y.

            TRANS = 'T' or 't'   y := alpha*A'*x + beta*y.

            TRANS = 'C' or 'c'   y := alpha*conjg( A' )*x + beta*y.

         Unchanged on exit.

M      - INTEGER.
         On entry, M specifies the number of rows of the matrix A.
         M must be at least zero.
         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the number of columns of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - COMPLEX         .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry, the leading m by n part of the array A must
         contain the matrix of coefficients.
         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, m ).
         Unchanged on exit.

X      - COMPLEX          array of DIMENSION at least
         ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
         and at least
         ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
         Before entry, the incremented array X must contain the
         vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

BETA   - COMPLEX         .
         On entry, BETA specifies the scalar beta. When BETA is
         supplied as zero then Y need not be set on input.
         Unchanged on exit.

Y      - COMPLEX          array of DIMENSION at least
         ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
         and at least
         ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
         Before entry with BETA non-zero, the incremented array Y
         must contain the vector y. On exit, Y is overwritten by the
         updated vector y.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.


SUBROUTINE CGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)

CGERC  performs the rank 1 operation

   A := alpha*x*conjg( y' ) + A,

where alpha is a scalar, x is an m element vector, y is an n element
vector and A is an m by n matrix.

M      - INTEGER.
         On entry, M specifies the number of rows of the matrix A.
         M must be at least zero.
         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the number of columns of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - COMPLEX         .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( m - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the m
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

Y      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the n
         element vector y.
         Unchanged on exit.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry, the leading m by n part of the array A must
         contain the matrix of coefficients. On exit, A is
         overwritten by the updated matrix.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, m ).
         Unchanged on exit.


SUBROUTINE CGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)

CGERU  performs the rank 1 operation

   A := alpha*x*y' + A,

where alpha is a scalar, x is an m element vector, y is an n element
vector and A is an m by n matrix.

M      - INTEGER.
         On entry, M specifies the number of rows of the matrix A.
         M must be at least zero.
         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the number of columns of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - COMPLEX         .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( m - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the m
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

Y      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the n
         element vector y.
         Unchanged on exit.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry, the leading m by n part of the array A must
         contain the matrix of coefficients. On exit, A is
         overwritten by the updated matrix.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, m ).
         Unchanged on exit.


SUBROUTINE CHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)

CHBMV  performs the matrix-vector  operation

   y := alpha*A*x + beta*y,

where alpha and beta are scalars, x and y are n element vectors and
A is an n by n hermitian band matrix, with k super-diagonals.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the band matrix A is being supplied as
         follows:

            UPLO = 'U' or 'u'   The upper triangular part of A is
                                being supplied.

            UPLO = 'L' or 'l'   The lower triangular part of A is
                                being supplied.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

K      - INTEGER.
         On entry, K specifies the number of super-diagonals of the
         matrix A. K must satisfy  0 .le. K.
         Unchanged on exit.

ALPHA  - COMPLEX         .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
         by n part of the array A must contain the upper triangular
         band part of the hermitian matrix, supplied column by
         column, with the leading diagonal of the matrix in row
         ( k + 1 ) of the array, the first super-diagonal starting at
         position 2 in row k, and so on. The top left k by k triangle
         of the array A is not referenced.
         The following program segment will transfer the upper
         triangular part of a hermitian band matrix from conventional
         full matrix storage to band storage:

               DO 20, J = 1, N
                  M = K + 1 - J
                  DO 10, I = MAX( 1, J - K ), J
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
         by n part of the array A must contain the lower triangular
         band part of the hermitian matrix, supplied column by
         column, with the leading diagonal of the matrix in row 1 of
         the array, the first sub-diagonal starting at position 1 in
         row 2, and so on. The bottom right k by k triangle of the
         array A is not referenced.
         The following program segment will transfer the lower
         triangular part of a hermitian band matrix from conventional
         full matrix storage to band storage:

               DO 20, J = 1, N
                  M = 1 - J
                  DO 10, I = J, MIN( N, J + K )
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Note that the imaginary parts of the diagonal elements need
         not be set and are assumed to be zero.
         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         ( k + 1 ).
         Unchanged on exit.

X      - COMPLEX          array of DIMENSION at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the
         vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

BETA   - COMPLEX         .
         On entry, BETA specifies the scalar beta.
         Unchanged on exit.

Y      - COMPLEX          array of DIMENSION at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the
         vector y. On exit, Y is overwritten by the updated vector y.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.


SUBROUTINE CHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)

CHEMV  performs the matrix-vector  operation

   y := alpha*A*x + beta*y,

where alpha and beta are scalars, x and y are n element vectors and
A is an n by n hermitian matrix.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the array A is to be referenced as
         follows:

            UPLO = 'U' or 'u'   Only the upper triangular part of A
                                is to be referenced.

            UPLO = 'L' or 'l'   Only the lower triangular part of A
                                is to be referenced.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - COMPLEX         .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry with  UPLO = 'U' or 'u', the leading n by n
         upper triangular part of the array A must contain the upper
         triangular part of the hermitian matrix and the strictly
         lower triangular part of A is not referenced.
         Before entry with UPLO = 'L' or 'l', the leading n by n
         lower triangular part of the array A must contain the lower
         triangular part of the hermitian matrix and the strictly
         upper triangular part of A is not referenced.
         Note that the imaginary parts of the diagonal elements need
         not be set and are assumed to be zero.
         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, n ).
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

BETA   - COMPLEX         .
         On entry, BETA specifies the scalar beta. When BETA is
         supplied as zero then Y need not be set on input.
         Unchanged on exit.

Y      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the n
         element vector y. On exit, Y is overwritten by the updated
         vector y.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.


SUBROUTINE CHER(UPLO,N,ALPHA,X,INCX,A,LDA)

CHER   performs the hermitian rank 1 operation

   A := alpha*x*conjg( x' ) + A,

where alpha is a real scalar, x is an n element vector and A is an
n by n hermitian matrix.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the array A is to be referenced as
         follows:

            UPLO = 'U' or 'u'   Only the upper triangular part of A
                                is to be referenced.

            UPLO = 'L' or 'l'   Only the lower triangular part of A
                                is to be referenced.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry with  UPLO = 'U' or 'u', the leading n by n
         upper triangular part of the array A must contain the upper
         triangular part of the hermitian matrix and the strictly
         lower triangular part of A is not referenced. On exit, the
         upper triangular part of the array A is overwritten by the
         upper triangular part of the updated matrix.
         Before entry with UPLO = 'L' or 'l', the leading n by n
         lower triangular part of the array A must contain the lower
         triangular part of the hermitian matrix and the strictly
         upper triangular part of A is not referenced. On exit, the
         lower triangular part of the array A is overwritten by the
         lower triangular part of the updated matrix.
         Note that the imaginary parts of the diagonal elements need
         not be set, they are assumed to be zero, and on exit they
         are set to zero.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, n ).
         Unchanged on exit.


SUBROUTINE CHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)

CHER2  performs the hermitian rank 2 operation

   A := alpha*x*conjg( y' ) + conjg( alpha )*y*conjg( x' ) + A,

where alpha is a scalar, x and y are n element vectors and A is an n
by n hermitian matrix.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the array A is to be referenced as
         follows:

            UPLO = 'U' or 'u'   Only the upper triangular part of A
                                is to be referenced.

            UPLO = 'L' or 'l'   Only the lower triangular part of A
                                is to be referenced.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - COMPLEX         .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

Y      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the n
         element vector y.
         Unchanged on exit.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry with  UPLO = 'U' or 'u', the leading n by n
         upper triangular part of the array A must contain the upper
         triangular part of the hermitian matrix and the strictly
         lower triangular part of A is not referenced. On exit, the
         upper triangular part of the array A is overwritten by the
         upper triangular part of the updated matrix.
         Before entry with UPLO = 'L' or 'l', the leading n by n
         lower triangular part of the array A must contain the lower
         triangular part of the hermitian matrix and the strictly
         upper triangular part of A is not referenced. On exit, the
         lower triangular part of the array A is overwritten by the
         lower triangular part of the updated matrix.
         Note that the imaginary parts of the diagonal elements need
         not be set, they are assumed to be zero, and on exit they
         are set to zero.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, n ).
         Unchanged on exit.


SUBROUTINE CHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)

CHPMV  performs the matrix-vector operation

   y := alpha*A*x + beta*y,

where alpha and beta are scalars, x and y are n element vectors and
A is an n by n hermitian matrix, supplied in packed form.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the matrix A is supplied in the packed
         array AP as follows:

            UPLO = 'U' or 'u'   The upper triangular part of A is
                                supplied in AP.

            UPLO = 'L' or 'l'   The lower triangular part of A is
                                supplied in AP.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - COMPLEX         .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

AP     - COMPLEX          array of DIMENSION at least
         ( ( n*( n + 1 ) )/2 ).
         Before entry with UPLO = 'U' or 'u', the array AP must
         contain the upper triangular part of the hermitian matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
         and a( 2, 2 ) respectively, and so on.
         Before entry with UPLO = 'L' or 'l', the array AP must
         contain the lower triangular part of the hermitian matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
         and a( 3, 1 ) respectively, and so on.
         Note that the imaginary parts of the diagonal elements need
         not be set and are assumed to be zero.
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

BETA   - COMPLEX         .
         On entry, BETA specifies the scalar beta. When BETA is
         supplied as zero then Y need not be set on input.
         Unchanged on exit.

Y      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the n
         element vector y. On exit, Y is overwritten by the updated
         vector y.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.


SUBROUTINE CHPR(UPLO,N,ALPHA,X,INCX,AP)

CHPR    performs the hermitian rank 1 operation

   A := alpha*x*conjg( x' ) + A,

where alpha is a real scalar, x is an n element vector and A is an
n by n hermitian matrix, supplied in packed form.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the matrix A is supplied in the packed
         array AP as follows:

            UPLO = 'U' or 'u'   The upper triangular part of A is
                                supplied in AP.

            UPLO = 'L' or 'l'   The lower triangular part of A is
                                supplied in AP.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - REAL            .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

AP     - COMPLEX          array of DIMENSION at least
         ( ( n*( n + 1 ) )/2 ).
         Before entry with  UPLO = 'U' or 'u', the array AP must
         contain the upper triangular part of the hermitian matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
         and a( 2, 2 ) respectively, and so on. On exit, the array
         AP is overwritten by the upper triangular part of the
         updated matrix.
         Before entry with UPLO = 'L' or 'l', the array AP must
         contain the lower triangular part of the hermitian matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
         and a( 3, 1 ) respectively, and so on. On exit, the array
         AP is overwritten by the lower triangular part of the
         updated matrix.
         Note that the imaginary parts of the diagonal elements need
         not be set, they are assumed to be zero, and on exit they
         are set to zero.


SUBROUTINE CHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)

CHPR2  performs the hermitian rank 2 operation

   A := alpha*x*conjg( y' ) + conjg( alpha )*y*conjg( x' ) + A,

where alpha is a scalar, x and y are n element vectors and A is an
n by n hermitian matrix, supplied in packed form.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the upper or lower
         triangular part of the matrix A is supplied in the packed
         array AP as follows:

            UPLO = 'U' or 'u'   The upper triangular part of A is
                                supplied in AP.

            UPLO = 'L' or 'l'   The lower triangular part of A is
                                supplied in AP.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

ALPHA  - COMPLEX         .
         On entry, ALPHA specifies the scalar alpha.
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x.
         Unchanged on exit.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.

Y      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCY ) ).
         Before entry, the incremented array Y must contain the n
         element vector y.
         Unchanged on exit.

INCY   - INTEGER.
         On entry, INCY specifies the increment for the elements of
         Y. INCY must not be zero.
         Unchanged on exit.

AP     - COMPLEX          array of DIMENSION at least
         ( ( n*( n + 1 ) )/2 ).
         Before entry with  UPLO = 'U' or 'u', the array AP must
         contain the upper triangular part of the hermitian matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
         and a( 2, 2 ) respectively, and so on. On exit, the array
         AP is overwritten by the upper triangular part of the
         updated matrix.
         Before entry with UPLO = 'L' or 'l', the array AP must
         contain the lower triangular part of the hermitian matrix
         packed sequentially, column by column, so that AP( 1 )
         contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
         and a( 3, 1 ) respectively, and so on. On exit, the array
         AP is overwritten by the lower triangular part of the
         updated matrix.
         Note that the imaginary parts of the diagonal elements need
         not be set, they are assumed to be zero, and on exit they
         are set to zero.


SUBROUTINE CTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)

CTBMV  performs one of the matrix-vector operations

   x := A*x,   or   x := A'*x,   or   x := conjg( A' )*x,

where x is an n element vector and  A is an n by n unit, or non-unit,
upper or lower triangular band matrix, with ( k + 1 ) diagonals.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the matrix is an upper or
         lower triangular matrix as follows:

            UPLO = 'U' or 'u'   A is an upper triangular matrix.

            UPLO = 'L' or 'l'   A is a lower triangular matrix.

         Unchanged on exit.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the operation to be performed as
         follows:

            TRANS = 'N' or 'n'   x := A*x.

            TRANS = 'T' or 't'   x := A'*x.

            TRANS = 'C' or 'c'   x := conjg( A' )*x.

         Unchanged on exit.

DIAG   - CHARACTER*1.
         On entry, DIAG specifies whether or not A is unit
         triangular as follows:

            DIAG = 'U' or 'u'   A is assumed to be unit triangular.

            DIAG = 'N' or 'n'   A is not assumed to be unit
                                triangular.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

K      - INTEGER.
         On entry with UPLO = 'U' or 'u', K specifies the number of
         super-diagonals of the matrix A.
         On entry with UPLO = 'L' or 'l', K specifies the number of
         sub-diagonals of the matrix A.
         K must satisfy  0 .le. K.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
         by n part of the array A must contain the upper triangular
         band part of the matrix of coefficients, supplied column by
         column, with the leading diagonal of the matrix in row
         ( k + 1 ) of the array, the first super-diagonal starting at
         position 2 in row k, and so on. The top left k by k triangle
         of the array A is not referenced.
         The following program segment will transfer an upper
         triangular band matrix from conventional full matrix storage
         to band storage:

               DO 20, J = 1, N
                  M = K + 1 - J
                  DO 10, I = MAX( 1, J - K ), J
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
         by n part of the array A must contain the lower triangular
         band part of the matrix of coefficients, supplied column by
         column, with the leading diagonal of the matrix in row 1 of
         the array, the first sub-diagonal starting at position 1 in
         row 2, and so on. The bottom right k by k triangle of the
         array A is not referenced.
         The following program segment will transfer a lower
         triangular band matrix from conventional full matrix storage
         to band storage:

               DO 20, J = 1, N
                  M = 1 - J
                  DO 10, I = J, MIN( N, J + K )
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Note that when DIAG = 'U' or 'u' the elements of the array A
         corresponding to the diagonal elements of the matrix are not
         referenced, but are assumed to be unity.
         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         ( k + 1 ).
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x. On exit, X is overwritten with the
         tranformed vector x.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.


SUBROUTINE CTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)

CTBSV  solves one of the systems of equations

   A*x = b,   or   A'*x = b,   or   conjg( A' )*x = b,

where b and x are n element vectors and A is an n by n unit, or
non-unit, upper or lower triangular band matrix, with ( k + 1 )
diagonals.

No test for singularity or near-singularity is included in this
routine. Such tests must be performed before calling this routine.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the matrix is an upper or
         lower triangular matrix as follows:

            UPLO = 'U' or 'u'   A is an upper triangular matrix.

            UPLO = 'L' or 'l'   A is a lower triangular matrix.

         Unchanged on exit.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the equations to be solved as
         follows:

            TRANS = 'N' or 'n'   A*x = b.

            TRANS = 'T' or 't'   A'*x = b.

            TRANS = 'C' or 'c'   conjg( A' )*x = b.

         Unchanged on exit.

DIAG   - CHARACTER*1.
         On entry, DIAG specifies whether or not A is unit
         triangular as follows:

            DIAG = 'U' or 'u'   A is assumed to be unit triangular.

            DIAG = 'N' or 'n'   A is not assumed to be unit
                                triangular.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

K      - INTEGER.
         On entry with UPLO = 'U' or 'u', K specifies the number of
         super-diagonals of the matrix A.
         On entry with UPLO = 'L' or 'l', K specifies the number of
         sub-diagonals of the matrix A.
         K must satisfy  0 .le. K.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
         by n part of the array A must contain the upper triangular
         band part of the matrix of coefficients, supplied column by
         column, with the leading diagonal of the matrix in row
         ( k + 1 ) of the array, the first super-diagonal starting at
         position 2 in row k, and so on. The top left k by k triangle
         of the array A is not referenced.
         The following program segment will transfer an upper
         triangular band matrix from conventional full matrix storage
         to band storage:

               DO 20, J = 1, N
                  M = K + 1 - J
                  DO 10, I = MAX( 1, J - K ), J
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
         by n part of the array A must contain the lower triangular
         band part of the matrix of coefficients, supplied column by
         column, with the leading diagonal of the matrix in row 1 of
         the array, the first sub-diagonal starting at position 1 in
         row 2, and so on. The bottom right k by k triangle of the
         array A is not referenced.
         The following program segment will transfer a lower
         triangular band matrix from conventional full matrix storage
         to band storage:

               DO 20, J = 1, N
                  M = 1 - J
                  DO 10, I = J, MIN( N, J + K )
                     A( M + I, J ) = matrix( I, J )
            10    CONTINUE
            20 CONTINUE

         Note that when DIAG = 'U' or 'u' the elements of the array A
         corresponding to the diagonal elements of the matrix are not
         referenced, but are assumed to be unity.
         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         ( k + 1 ).
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element right-hand side vector b. On exit, X is overwritten
         with the solution vector x.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.


SUBROUTINE CTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)

CTPMV  performs one of the matrix-vector operations

   x := A*x,   or   x := A'*x,   or   x := conjg( A' )*x,

where x is an n element vector and  A is an n by n unit, or non-unit,
upper or lower triangular matrix, supplied in packed form.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the matrix is an upper or
         lower triangular matrix as follows:

            UPLO = 'U' or 'u'   A is an upper triangular matrix.

            UPLO = 'L' or 'l'   A is a lower triangular matrix.

         Unchanged on exit.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the operation to be performed as
         follows:

            TRANS = 'N' or 'n'   x := A*x.

            TRANS = 'T' or 't'   x := A'*x.

            TRANS = 'C' or 'c'   x := conjg( A' )*x.

         Unchanged on exit.

DIAG   - CHARACTER*1.
         On entry, DIAG specifies whether or not A is unit
         triangular as follows:

            DIAG = 'U' or 'u'   A is assumed to be unit triangular.

            DIAG = 'N' or 'n'   A is not assumed to be unit
                                triangular.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

AP     - COMPLEX          array of DIMENSION at least
         ( ( n*( n + 1 ) )/2 ).
         Before entry with  UPLO = 'U' or 'u', the array AP must
         contain the upper triangular matrix packed sequentially,
         column by column, so that AP( 1 ) contains a( 1, 1 ),
         AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
         respectively, and so on.
         Before entry with UPLO = 'L' or 'l', the array AP must
         contain the lower triangular matrix packed sequentially,
         column by column, so that AP( 1 ) contains a( 1, 1 ),
         AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
         respectively, and so on.
         Note that when  DIAG = 'U' or 'u', the diagonal elements of
         A are not referenced, but are assumed to be unity.
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x. On exit, X is overwritten with the
         tranformed vector x.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.


SUBROUTINE CTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)

CTPSV  solves one of the systems of equations

   A*x = b,   or   A'*x = b,   or   conjg( A' )*x = b,

where b and x are n element vectors and A is an n by n unit, or
non-unit, upper or lower triangular matrix, supplied in packed form.

No test for singularity or near-singularity is included in this
routine. Such tests must be performed before calling this routine.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the matrix is an upper or
         lower triangular matrix as follows:

            UPLO = 'U' or 'u'   A is an upper triangular matrix.

            UPLO = 'L' or 'l'   A is a lower triangular matrix.

         Unchanged on exit.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the equations to be solved as
         follows:

            TRANS = 'N' or 'n'   A*x = b.

            TRANS = 'T' or 't'   A'*x = b.

            TRANS = 'C' or 'c'   conjg( A' )*x = b.

         Unchanged on exit.

DIAG   - CHARACTER*1.
         On entry, DIAG specifies whether or not A is unit
         triangular as follows:

            DIAG = 'U' or 'u'   A is assumed to be unit triangular.

            DIAG = 'N' or 'n'   A is not assumed to be unit
                                triangular.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

AP     - COMPLEX          array of DIMENSION at least
         ( ( n*( n + 1 ) )/2 ).
         Before entry with  UPLO = 'U' or 'u', the array AP must
         contain the upper triangular matrix packed sequentially,
         column by column, so that AP( 1 ) contains a( 1, 1 ),
         AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
         respectively, and so on.
         Before entry with UPLO = 'L' or 'l', the array AP must
         contain the lower triangular matrix packed sequentially,
         column by column, so that AP( 1 ) contains a( 1, 1 ),
         AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
         respectively, and so on.
         Note that when  DIAG = 'U' or 'u', the diagonal elements of
         A are not referenced, but are assumed to be unity.
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element right-hand side vector b. On exit, X is overwritten
         with the solution vector x.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.


SUBROUTINE CTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)

CTRMV  performs one of the matrix-vector operations

   x := A*x,   or   x := A'*x,   or   x := conjg( A' )*x,

where x is an n element vector and  A is an n by n unit, or non-unit,
upper or lower triangular matrix.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the matrix is an upper or
         lower triangular matrix as follows:

            UPLO = 'U' or 'u'   A is an upper triangular matrix.

            UPLO = 'L' or 'l'   A is a lower triangular matrix.

         Unchanged on exit.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the operation to be performed as
         follows:

            TRANS = 'N' or 'n'   x := A*x.

            TRANS = 'T' or 't'   x := A'*x.

            TRANS = 'C' or 'c'   x := conjg( A' )*x.

         Unchanged on exit.

DIAG   - CHARACTER*1.
         On entry, DIAG specifies whether or not A is unit
         triangular as follows:

            DIAG = 'U' or 'u'   A is assumed to be unit triangular.

            DIAG = 'N' or 'n'   A is not assumed to be unit
                                triangular.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry with  UPLO = 'U' or 'u', the leading n by n
         upper triangular part of the array A must contain the upper
         triangular matrix and the strictly lower triangular part of
         A is not referenced.
         Before entry with UPLO = 'L' or 'l', the leading n by n
         lower triangular part of the array A must contain the lower
         triangular matrix and the strictly upper triangular part of
         A is not referenced.
         Note that when  DIAG = 'U' or 'u', the diagonal elements of
         A are not referenced either, but are assumed to be unity.
         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, n ).
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element vector x. On exit, X is overwritten with the
         tranformed vector x.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.


SUBROUTINE CTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)

CTRSV  solves one of the systems of equations

   A*x = b,   or   A'*x = b,   or   conjg( A' )*x = b,

where b and x are n element vectors and A is an n by n unit, or
non-unit, upper or lower triangular matrix.

No test for singularity or near-singularity is included in this
routine. Such tests must be performed before calling this routine.

UPLO   - CHARACTER*1.
         On entry, UPLO specifies whether the matrix is an upper or
         lower triangular matrix as follows:

            UPLO = 'U' or 'u'   A is an upper triangular matrix.

            UPLO = 'L' or 'l'   A is a lower triangular matrix.

         Unchanged on exit.

TRANS  - CHARACTER*1.
         On entry, TRANS specifies the equations to be solved as
         follows:

            TRANS = 'N' or 'n'   A*x = b.

            TRANS = 'T' or 't'   A'*x = b.

            TRANS = 'C' or 'c'   conjg( A' )*x = b.

         Unchanged on exit.

DIAG   - CHARACTER*1.
         On entry, DIAG specifies whether or not A is unit
         triangular as follows:

            DIAG = 'U' or 'u'   A is assumed to be unit triangular.

            DIAG = 'N' or 'n'   A is not assumed to be unit
                                triangular.

         Unchanged on exit.

N      - INTEGER.
         On entry, N specifies the order of the matrix A.
         N must be at least zero.
         Unchanged on exit.

A      - COMPLEX          array of DIMENSION ( LDA, n ).
         Before entry with  UPLO = 'U' or 'u', the leading n by n
         upper triangular part of the array A must contain the upper
         triangular matrix and the strictly lower triangular part of
         A is not referenced.
         Before entry with UPLO = 'L' or 'l', the leading n by n
         lower triangular part of the array A must contain the lower
         triangular matrix and the strictly upper triangular part of
         A is not referenced.
         Note that when  DIAG = 'U' or 'u', the diagonal elements of
         A are not referenced either, but are assumed to be unity.
         Unchanged on exit.

LDA    - INTEGER.
         On entry, LDA specifies the first dimension of A as declared
         in the calling (sub) program. LDA must be at least
         max( 1, n ).
         Unchanged on exit.

X      - COMPLEX          array of dimension at least
         ( 1 + ( n - 1 )*abs( INCX ) ).
         Before entry, the incremented array X must contain the n
         element right-hand side vector b. On exit, X is overwritten
         with the solution vector x.

INCX   - INTEGER.
         On entry, INCX specifies the increment for the elements of
         X. INCX must not be zero.
         Unchanged on exit.


This material was reproduced for educational use only from the Pittsburgh Supercomputing Center and is copyrighted © by the PSC.