subroutine stbmv ( uplo, trans, diag, n, k, a, lda, x, incx ) * .. scalar arguments .. integer incx, k, lda, n character*1 diag, trans, uplo * .. array arguments .. real a( lda, * ), x( * ) * .. * * purpose * ======= * * 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. * * parameters * ========== * * 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. * * * level 2 blas routine. * * -- written on 22-october-1986. * jack dongarra, argonne national lab. * jeremy du croz, nag central office. * sven hammarling, nag central office. * richard hanson, sandia national labs. *