F_SSPR2/F_DSPR2/F_CSPR2/F_ZSPR2

 

 

 

Symmetric rank-2 update

Name

F_SSPR2/F_DSPR2/F_CSPR2/F_ZSPR2

 

Symmetric rank-2 update

Purpose

F_xSPR2 performs the symmetric rank-2 update

 

 

A ← αx yT +

α

yxT + βA with A=AT

 

where A is an n-by-nreal symmetric matrix stored in packed form, α and β are

 

real or complex scalar,

α

is the complex conjugate of α, x and y are real or

 

complex n-vectors, and xT and yT are transposes of x and y, respectively.

 

This F_xSPR2 interface encompasses the legacy BLAS routine SSPR2 with

 

added functionality for complex symmetric matrices. Refer to

 

“SSPR2/DSPR2/CHPR2/ZHPR2” on page 259 for a description of the HP MLIB

 

legacy BLAS subprograms and an illustration of the packed storage of

 

symmetric or Hermitian matrices.

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 the AP

 

matrix).

 

 

 

 

Usage

VECLIB

 

 

 

 

 

INTEGER*4

 

INCX, INCY, N, UPLO

 

REAL*4

 

ALPHA, BETA

 

REAL*4

 

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

 

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

 

INTEGER*4

 

INCX, INCY, N, UPLO

 

REAL*8

 

ALPHA, BETA

 

REAL*8

 

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

 

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

 

INTEGER*4

 

INCX, INCY, N, UPLO

 

COMPLEX*8

 

ALPHA, BETA

 

COMPLEX*8

 

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

 

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

 

INTEGER*4

 

INCX, INCY, N, UPLO

 

COMPLEX*16

 

ALPHA, BETA

 

COMPLEX*16

 

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

 

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

VECLIB*8

386HP MLIB User’s Guide