HP MLIB User's Guide Vol. 1 7th Ed.
308 HP MLIB User’s Guide
STPMV/DTPMV/CTPMV/ZTPMV Matrix-vector multiply
Name STPMV/DTPMV/CTPMV/ZTPMV
Matrix-vector multiply
Purpose Given an n-by-n upper- or lower-triangular matrix A stored in packed form as
described in “Matrix Storage” and an n-vector x, these subprograms compute
the matrix-vector products Ax, A
T
x, and A*x, where A
T
is the transpose of A,
and A* is the conjugate transpose of A. Specifically, these subprograms compute
matrix-vector products of the forms
Refer to “F_STPMV/F_DTPMV/F_CTPMV/F_ZTPMV” on page 403 for a
description of the equivalent BLAS Standard subprograms.
Matrix
Storage
You supply the upper or lower triangle of A, stored column-by-column in packed
form in a 1-dimensional array. This saves memory compared to storing the
entire matrix.
The following examples illustrate the packed storage of a triangular matrix.
Upper triangular matrix
If A is
then A is packed column by column into an array ap as follows:
Upper-triangular matrix element a
ij
is stored in array element ap(i+(j×(j−1))/2).
Lower triangular matrix
If A is
xAx← xA
T
x← and xA*x.←,,
11 12 13 14
0222324
0 0 33 34
00044
k 12345678910
ap(k) 11122213233314243444
11 0 0 0
21 22 0 0
31 32 33 0
41 42 43 44