SSPR/DSPR/CHPR/ZHPR

Rank-1 update

Name SSPR/DSPR/CHPR/ZHPR

Rank-1 update

Purpose These subprograms compute the real symmetric or complex Hermitian rank-1 update

A axx* + A,

where A is an n-by-nreal symmetric or complex Hermitian matrix stored in packed form as described in “Matrix Storage,” α is a real scalar, x is a real or complex n-vector, and x* is the conjugate transpose of x. (The conjugate transpose of a real vector is simply the transpose.)

The structure of A is indicated by the name of the subprogram used:

SSPR

or

DSPR

A is a real symmetric matrix

CHPR

or

ZHPR

A is a complex Hermitian matrix

Refer to “F_SSPR/F_DSPR/F_CSPR/F_ZSPR” on page 384, and

“F_CHPR/F_ZHPR” on page 350 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 column-by-column in packed form in a 1-dimensional array.

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 column-by-column into an array ap as follows:

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).

254HP MLIB User’s Guide