SGEMV/DGEMV/CGEMV/ZGEMV

Matrix-vector multiply

Name SGEMV/DGEMV/CGEMV/ZGEMV

Matrix-vector multiply

Purpose These subprograms compute the matrix-vector products Ax, ATx, and A*x,

where A is an m-by-nmatrix, AT is the transpose of A, and A* is the conjugate transpose of A. The product can be stored in the result array or added to or subtracted from it. This is handled in a convenient, but general, way by two scalar arguments, α and β, which are used as multipliers of the matrix-vector product and the result vector. Specifically, these subprograms compute matrix-vector products of the forms:

y aAx + βy, y a AT x + βy, and y aA*x + βy.

Refer to “F_SGEMV/F_DGEMV/F_CGEMV/F_ZGEMV” on page 365 for a description of the BLAS Standard subprograms for a triangular matrix-vector multiply.

Usage

VECLIB:

 

 

CHARACTER*1

trans

 

INTEGER*4

m, n, lda, incx, incy

 

REAL*4

alpha, beta, a(lda, n), x(lenx), y(leny)

CALL SGEMV(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)

CHARACTER*1

trans

INTEGER*4

m, n, lda, incx, incy

REAL*8

alpha, beta, a(lda, n), x(lenx), y(leny)

CALL DGEMV(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)

CHARACTER*1

trans

INTEGER*4

m, n, lda, incx, incy

COMPLEX*8

alpha, beta, a(lda, n), x(lenx), y(leny)

CALL CGEMV(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)

CHARACTER*1

trans

INTEGER*4

m, n, lda, incx, incy

COMPLEX*16

alpha, beta, a(lda, n), x(lenx), y(leny)

CALL ZGEMV(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)

VECLIB8:

CHARACTER*1

trans

INTEGER*8

m, n, lda, incx, incy

REAL*4

alpha, beta, a(lda, n), x(lenx), y(leny)

CALL SGEMV(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)

232HP MLIB User’s Guide