Solve triangular system | STPSV/DTPSV/CTPSV/ZTPSV |
Notes These subprograms conform to specifications of the Level 2 BLAS.
The subprograms do not check for singularity of matrix A. A is singular if diag = ’N’ or ’n’ and some aii = 0. This condition causes a division by zero to
occur. Therefore, the program must detect singularity and take appropriate action to avoid a problem before calling any of these subprograms.
If an error in the arguments is detected, the subprograms call error handler XERBLA, which writes an error message onto the standard error file and terminates execution. The standard version of XERBLA (refer to the end of this chapter) can be replaced with a
uplo ≠ ’L’ or ’l’ or ’U’ or ’u’
trans ≠ ’N’ or ’n’ or ’T’ or ’t’ or ’C’ or ’c’ diag ≠ ’N’ or ’n’ or ’U’ or ’u’
n < 0 incx = 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 trans argument as ’NORMAL’ or ’NONTRANS’ for ’N’, ’TRANSPOSE’ for ’T’, or ’CTRANS’ for ’C’. Refer to “Example 2.”
Example 1 Perform REAL*4 forward elimination using a
CHARACTER*1 UPLO,TRANS,DIAG
INTEGER*4 N,INCX
REAL*4 AP(5500),X(100)
UPLO = ’L’
TRANS = ’N’
DIAG = ’U’
N = 75
INCX = 1
CALL STPSV (UPLO,TRANS,DIAG,N,AP,X,INCX)
Example 2 Perform REAL*4 back substitution using a
INTEGER*4 | N |
REAL*4 | AP(5500),X(100) |
N = 75 |
|
CALL STPSV (’UPPER’,’NONTRANS’,’NONUNIT’,N,AP,X,1)
Chapter 3 Basic Matrix Operations 317