{S,D}SPMV (uplo, n, alpha, ap, x, incx, beta, y, incy) {C,Z}HPMV (uplo, n, alpha, ap, x, incx, beta, y, incy)
uplo character*1 On entry, specifies whether the upper- or lower- triangular part of the matrix A is supplied in the packed array AP: If uplo = 'U' or 'u', the upper-triangular part of A is supplied. If uplo = 'L' or 'l', the lower-triangular part of A is supplied. On exit, uplo is unchanged. n integer*4 On entry, the order of the matrix A; n >= 0. On exit, n is unchanged. alpha real*4 | real*8 | complex*8 | complex*16 On entry, the scalar alpha*. On exit, alpha is unchanged. ap real*4 | real*8 | complex*8 | complex*16 On entry, a one-dimensional array AP of length at least n(n + 1)/2. If uplo specifies the upper triangular part of the matrix A, the array contains those elements of the matrix, packed sequentially, column by column, so that AP(1) contains a(11), AP(2) and AP(3) contain a(12) and a(22) respectively, and so on. If uplo specifies the lower triangular part to the matrix A, the array contains those elements of the matrix, also packed sequentially, so that AP(1) contains a(11), AP(2) and AP(3) contain a(21) and a(31) respectively, and so on. For CHPMV and ZHPMV routines, the imaginary parts of the diagonal elements are not accessed, need not be set, and are assumed to be zero. On exit, ap 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 unchanged. incx integer*4 On entry, the increment for the elements of X; incx must not equal zero. On exit, incx is unchanged. beta real*4 | real*8 | complex*8 | complex*16 On entry, the scalar beta. On exit, beta is unchanged. y real*4 | real*8 | complex*8 | complex*16 On entry, a one-dimensional array Y of length at least (1+(n-1)*|incy|). If beta= 0, y need not be set. If beta is not equal to zero, the incremented array Y must contain the vector y. On exit, y is overwritten by the updated vector y. incy integer*4 On entry, the increment for the elements of Y; incy must not equal zero. On exit, incy is unchanged.
SSPMV and DSPMV compute a matrix-vector product for a real symmetric matrix stored in packed form. CHPMV and ZHPMV compute a matrix-vector product for a complex Hermitian matrix stored in packed form. Both products are described by the following operation: y = alpha*Ax + beta*y alpha and beta are scalars, and x and y are vectors with n elements. A is an n by n matrix. In the case of SSPMV and DSPMV, matrix A is a symmetric matrix and in the case of CHPMV and ZHPMV, matrix A is a Hermitian matrix.
COMPLEX*16 AP(250), X(20), Y(20), alpha, beta N = 20 alpha = (2.3D0, 8.4D0) INCX = 1 beta = (4.0D0, 3.3D0) INCY = 1 CALL ZHPMV('L',N,alpha,AP,X,INCX,beta,Y,INCY) This FORTRAN code computes the product y = alpha*Ax + beta*y where A is a Hermitian matrix with its lower-triangular part stored in packed form in AP.