Symmetric packed matrix-vector multiply

F_SSPMV/F_DSPMV/F_CSPMV/F_ZSPMV

Name

F_SSPMV/F_DSPMV/F_CSPMV/F_ZSPMV

 

Symmetric packed matrix-vector multiply

Purpose

F_xSPMV multiplies a vector x by a real or complex symmetric packed matrix

 

A, scales the resulting vector and adds it to the scaled vector operand y. If n is

 

less than or equal to zero, or if β is equal to one and α is equal to zero, this

 

routine returns immediately.

 

 

y ← αAx + βy with A=AT

 

Refer to “SSPMV/DSPMV/CHPMV/ZHPMV” on page 249 for a description of

 

the equivalent HP MLIB legacy BLAS subprograms.

Matrix

Because either triangle of A can be obtained from the other, you only need to

Storage

provide one triangle of A, either the upper or the lower triangle. Compared to

 

storing the entire matrix, you save memory by supplying that triangle stored

 

column-by-column in packed form in a 1-dimensional array. Refer to

 

“SSPMV/DSPMV/CHPMV/ZHPMV” on page 249 for an example of packed

 

storage for symmetric or Hermitian matrices.

Usage

VECLIB

 

 

INTEGER*4

INCX, INCY, N, UPLO

 

REAL*4

ALPHA, BETA

 

REAL*4

AP( * ), X( * ), Y( * )

 

SUBROUTINE F_SSPMV (UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY)

 

INTEGER*4

INCX, INCY, N, UPLO

 

REAL*8

ALPHA, BETA

 

REAL*8

AP( * ), X( * ), Y( * )

 

SUBROUTINE F_DSPMV (UPLO, N, ALPHA, AP, X, INCX, BETA, Y,

 

INCY)

 

 

INTEGER*4

INCX, INCY, N, UPLO

 

COMPLEX*8

ALPHA, BETA

 

COMPLEX*8

AP( * ), X( * ), Y( * )

 

SUBROUTINE F_CSPMV (UPLO, N, ALPHA, AP, X, INCX, BETA, Y,

 

INCY)

 

 

INTEGER*4

INCX, INCY, N, UPLO

 

COMPLEX*16

ALPHA, BETA

 

COMPLEX*16

AP( * ), X( * ), Y( * )

 

SUBROUTINE F_ZSPMV (UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY)

VECLIB8

Chapter 3 Basic Matrix Operations 381