Performs matrix-vector operation with general matrices.
BLAS Library (libblas.a)
SUBROUTINE SGEMV(TRANS, M, N, ALPHA, A, LDA, X,
INCX, BETA, Y, INCY)
REAL ALPHA, BETA
INTEGER INCX, INCY, LDA, M, N
CHARACTER*1 TRANS
REAL A(LDA,*), X(*), Y(*)
SUBROUTINE DGEMV(TRANS, M, N, ALPHA, A, LDA, X,
INCX, BETA, Y, INCY)
DOUBLE PRECISION ALPHA,BETA
INTEGER INCX,INCY,LDA,M,N
CHARACTER*1 TRANS
DOUBLE PRECISION A(LDA,*), X(*), Y(*)
SUBROUTINE CGEMV(TRANS, M, N, ALPHA, A, LDA, X,
INCX, BETA, Y, INCY)
COMPLEX ALPHA,BETA
INTEGER INCX,INCY,LDA,M,N
CHARACTER*1 TRANS
COMPLEX A(LDA,*), X(*), Y(*)
SUBROUTINE ZGEMV(TRANS, M, N, ALPHA, A, LDA, X,
INCX, BETA, Y, INCY)
COMPLEX*16 ALPHA,BETA
INTEGER INCX,INCY,LDA,M,N
CHARACTER*1 TRANS
COMPLEX*16 A(LDA,*), X(*), Y(*)
The SGEMV, DGEMV, CGEMV, or ZGEMV subroutine performs one of the following 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.
Item | Description |
---|---|
TRANS | On entry, TRANS specifies the operation to be performed
as follows:
Unchanged on exit. |
M | On entry, M specifies the number of rows of the matrix A; M must be at least 0; unchanged on exit. |
N | On entry, N specifies the number of columns of the matrix A; N must be at least 0; unchanged on exit. |
ALPHA | On entry, ALPHA specifies the scalar alpha; unchanged on exit. |
A | An array of dimension ( LDA, N ); on entry, the leading M by N part of the array A must contain the matrix of coefficients; unchanged on exit. |
LDA | 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 | A vector of dimension at least (1 + (N-1) * abs( INCX ) ) when TRANS = 'N' or 'n', otherwise, at least (1 + (M-1) * abs( INCX ) ); on entry, the incremented array X must contain the vector x; unchanged on exit. |
INCX | On entry, INCX specifies the increment for the elements of X; INCX must not be 0; unchanged on exit. |
BETA | On entry, BETA specifies the scalar beta; when BETA is supplied as 0, Y need not be set on input; unchanged on exit. |
Y | A vector of dimension at least 1 + (M-1) * abs( INCY ) ) when TRANS = 'N' or 'n', otherwise at least (1 + (N-1) * abs( INCY ) ); on entry, with BETA nonzero, the incremented array Y must contain the vector y; on exit, Y is overwritten by the updated vector y. |
INCY | On entry, INCY specifies the increment for the elements of Y; INCY must not be 0; unchanged on exit. |