Matrix-vector multiply

STPMV/DTPMV/CTPMV/ZTPMV

then A is packed column by column into an array ap as follows:

k

1

2

3

4

5

6

7

8

9

10

ap(k)

11

21

31

41

22

32

42

33

43

44

 

 

 

 

 

 

 

 

 

 

 

Lower-triangular matrix element aij is stored in array element ap(i+((j−1)⋅(2nj))/2).

Usage

VECLIB:

 

 

CHARACTER*1

uplo, trans, diag

 

INTEGER*4

n, incx

 

REAL*4

ap(lenap), x(lenx)

CALL STPMV(uplo, trans, diag, n, ap, x, incx)

CHARACTER*1

uplo, trans, diag

INTEGER*4

n, incx

REAL*8

ap(lenap), x(lenx)

CALL DTPMV(uplo, trans, diag, n, ap, x, incx)

CHARACTER*1

uplo, trans, diag

INTEGER*4

n, incx

COMPLEX*8

ap(lenap), x(lenx)

CALL CTPMV(uplo, trans, diag, n, ap, x, incx)

CHARACTER*1

uplo, trans, diag

INTEGER*4

n, incx

COMPLEX*16

ap(lenap), x(lenx)

CALL ZTPMV(uplo, trans, diag, n, ap, x, incx)

VECLIB8:

CHARACTER*1

uplo, trans, diag

INTEGER*8

n, incx

REAL*4

ap(lenap), x(lenx)

CALL STPMV(uplo, trans, diag, n, ap, x, incx)

CHARACTER*1

uplo, trans, diag

INTEGER*8

n, incx

REAL*8

ap(lenap), x(lenx)

CALL DTPMV(uplo, trans, diag, n, ap, x, incx)

CHARACTER*1

uplo, trans, diag

INTEGER*8

n, incx

COMPLEX*8

ap(lenap), x(lenx)

CALL CTPMV(uplo, trans, diag, n, ap, x, incx)

Chapter 3 Basic Matrix Operations 309