HP MLIB User's Guide Vol. 1 7th Ed.
282 HP MLIB User’s Guide
SSYR2/DSYR2/CHER2/ZHER2 Rank-2 update
incy = 0
Actual character arguments in a subroutine call can be longer than the
corresponding dummy arguments. Therefore, readability of the CALL
statement may be improved by coding the uplo argument as ’LOWER’ for ’L’ or
’UPPER’ for ’U’.
Example 1 Apply a REAL*4 symmetric rank-2 update xy
T
+x
T
y to A, where A is a 9-by-9
real symmetric matrix whose upper triangle is stored in the upper triangle of
an array A whose dimensions are 10-by-10, x is a real vector 9 elements long
stored in an array X of dimension 10, and y is a real vector 9 elements long
stored in an array Y also of dimension 10.
CHARACTER*1 UPLO
INTEGER*4 N,LDA,INCX,INCY
REAL*4 ALPHA,A(10,10),X(10),Y(10)
UPLO = ’U’
N = 9
ALPHA = 1.0
LDA = 10
INCX = 1
INCY = 1
CALL SSYR2 (UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)