{S,D,C,Z}TRMV (uplo, trans, diag, n, a, lda, x, incx)
uplo character*1 On entry, specifies whether the matrix A is an upper- or lower-triangular matrix: If uplo = 'U' or 'u', A is an upper-triangular matrix. If uplo = 'L' or On exit, uplo is unchanged. trans character*1 On entry, specifies the operation to be performed: If trans = 'N' or 'n', the operation is y = alpha*Ax + beta*y. If trans = 'T' or 't', the operation is y = alpha*transp(A)*x + beta*y. If trans = 'C' or 'c', the operation is y = alpha*conjug_transp(A)*x + beta*y. On exit, trans is unchanged. .IP "diag" 20 character*1 On entry, specifies whether the matrix A is unit- triangular: If diag = 'U' or 'u', A is a unit-triangular matrix. If diag = 'N' or 'n', A is not a unit-triangular matrix. On exit, diag is unchanged. n integer*4 On entry, the order of the matrix A; n >= 0. On exit, n is unchanged. a real*4 | real*8 | complex*8 | complex*16 On entry, a two-dimensional array with dimensions lda by n. When uplo specifies the upper portion of the matrix, the leading n by n part of the array contains the upper-triangular part of the matrix, and the lower-triangular part of array A is not referenced. When uplo specifies the lower portion of the matrix, the leading n by n part of the array contains the lower-triangular part of the matrix, and the upper-triangular part of array A is not referenced. If diag is equal to 'U' or 'u', the diagonal elements of A are also not referenced, but are assumed to be unity. On exit, a is unchanged. lda integer*4 On entry, the first dimension of array A; lda >= MAX(1,n). On exit, lda is unchanged. x real*4 | real*8 | complex*8 | complex*16 On entry, a one-dimensional array X of length at least (1+(n-1)*|incx|). Array X contains the vector x. On exit, x is overwritten with the transformed vector x. incx integer*4 On entry, the increment for the elements of X; incx must not equal zero. On exit, incx is unchanged.
The _TRMV subprograms compute a matrix-vector product for a triangular matrix or its transpose: x = Ax or x = transp(A)*x . In addition to these operations, the CTRMV and ZTRMV subprograms compute a matrix-vector product for conjugate transpose: x = conjug_transp(A)*x . x is a vector with n elements, and A is an n by n, unit or non-unit, upper- or lower-triangular matrix.
REAL*4 A(50,20), X(20) INCX = 1 N = 20 LDA = 50 CALL STRMV('U','N','N',N,A,LDA,X,INCX) This FORTRAN code computes the product x = Ax where A is an upper- triangular matrix, of order 20, with a non-unit diagonal.