SSPMV/DSPMV/CHPMV/ZHPMV |
Name SSPMV/DSPMV/CHPMV/ZHPMV
Purpose These subprograms compute the
y ← aAx + βy.
The structure of A is indicated by the name of the subprogram used:
SSPMV | or | DSPMV | A is a real symmetric matrix |
CHPMV | or | ZHPMV | A is a complex Hermitian matrix |
Refer to “F_SSPMV/F_DSPMV/F_CSPMV/F_ZSPMV” on page 381 and
“F_CHPMV/F_ZHPMV” on page 348 for a description of the equivalent BLAS Standard 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
The following examples illustrate the packed storage of symmetric or
Hermitian matrices.
Upper triangular storage
If the upper triangle of A is
11 12 13 14
22 23 24
33 34
44
then A is packed
k | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
ap(k) | 11 | 12 | 22 | 13 | 23 | 33 | 14 | 24 | 34 | 44 |
|
|
|
|
|
|
|
|
|
|
|
Upper triangular matrix element aij is stored in array element ap(i+(j⋅(j−1))/2).
Chapter 3 Basic Matrix Operations 249