SSYR2K/DSYR2K/CHER2K/CSYR2K/ZHER2K/ZSYR2K |
Error conditions are:
uplo ≠ ’L’ or ’l’ or ’U’ or ’u’
trans ≠ ’N’ or ’n’ or ’T’ or ’t’ or ’C’ or ’c’ n < 0
k < 0
lda too small ldb too small ldc < max(m,1)
Also, note that some of the values of trans listed above are invalid in subprograms CHER2K, CSYR2K, ZHER2K, and ZSYR2K.
Actual character arguments in a subroutine call can be longer than the corresponding dummy arguments. Therefore, readability of the CALL statement may be improved, for example, by coding the uplo argument as ’LOWER’ for ’L’ or ’UPPER’ for ’U’. Refer to “Example 2.”
Example 1 Apply a REAL*4
CHARACTER*1 UPLO,TRANS
INTEGER*4 N,K,LDA,LDB,LDC
REAL*4 ALPHA,BETA,A(10,10),B(10,10),C(10,10)
UPLO = ’U’
TRANS = ’N’
N = 8
K = 3
ALPHA = 1.0
BETA = 1.0
LDA = 10
LDB = 10
LDC = 10
CALL SSYR2K (UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
Example 2 Apply a COMPLEX*8 Hermitian
INTEGER*4 N,K,LDA,LDB,LDC
COMPLEX*8 A(10,10),B(10,10),C(10,10)
N = 9
K = 2
LDA = 10
LDB = 10
LDC = 10
CALL CHER2K
&1.0,C,LDC)
288HP MLIB User’s Guide