Symmetric packed rank-1 update

F_SSPR/F_DSPR/F_CSPR/F_ZSPR

 

INTEGER*8

INCX, N, UPLO

 

REAL*8

ALPHA, BETA, AP( * ), X( * )

 

SUBROUTINE F_DSPR (UPLO, N, ALPHA, X, INCX, BETA, AP)

 

INTEGER*8

INCX, N, UPLO

 

COMPLEX*8

ALPHA, BETA, AP( * ), X( * )

 

SUBROUTINE F_CSPR (UPLO, N, ALPHA, X, INCX, BETA, AP)

 

INTEGER*8

INCX, N, UPLO

 

COMPLEX*16

ALPHA, BETA, AP( * ), X( * )

 

SUBROUTINE F_ZSPR (UPLO, N, ALPHA, X, INCX, BETA, AP)

Input

UPLO

Specifies whether a triangular matrix is upper or lower

 

 

triangular. Use either BLAS_UPPER or BLAS_LOWER.

 

N

Number of elements of vector x.

 

ALPHA

The scalar ALPHA.

 

X

REAL or COMPLEX array, minimum length

 

 

(N - 1) x incx + 1.

 

INCX

Increment for the array x. A vector x having component

 

 

xi, i = 1,..., n, is stored in an array X() with increment

 

 

argument incx. If incx > 0 then xi is stored in

 

 

X (1 + (i - 1) x incx). If incx < 0 then xiis stored in

 

 

X (1 + (N - i) x incx). incx = 0 is an illegal value.

 

BETA

The scalar BETA.

 

AP

Array containing the upper or lower triangle, as

 

 

specified by uplo of an n-by-nreal symmetric or

 

 

complex Hermitian matrix A, stored by columns in

 

 

packed form.

Output

AP

The upper or lower triangle of the updated A matrix, as

 

 

specified by uplo, replaces the input.

A ← αxxT + βA with A=AT

Chapter 3 Basic Matrix Operations 385