These subroutines solve the system AX = B for X, using multiple right-hand sides, where X and B are general matrices and:
|SPOSM, DPOSM, CPOSM, and ZPOSM use the results of the factorization of matrix A, produced by a preceding call to SPOF/SPOFCD, DPOF/DPOFCD, CPOF, or ZPOF, respectively.
|SPOTRS, DPOTRS, CPOTRS, and ZPOTRS use the results of the
|factorization of matrix A, produced by a preceding call to |SPOTRF, DPOTRF, CPOTRF, or ZPOTRF, respectively.
A, B, X | Subroutine |
Short-precision real | SPOSM and SPOTRS |
Long-precision real | DPOSM and DPOTRF |
Short-precision complex | CPOSM and CPOTRF |
Long-precision complex | ZPOSM and ZPOTRF |
Fortran | CALL SPOSM | DPOSM | CPOSM | ZPOSM (uplo, a,
lda, n, b, ldb, nrhs)
CALL SPOTRS | DPOTRS | CPOTRS | ZPOTRS (uplo, n, nrhs, a, lda, b, ldb, info) |
C and C++ | sposm | dposm | cposm | zposm (uplo, a, lda,
n, b, ldb, nrhs);
spotrs | dpotrs | cpotrs | zpotrs (uplo, n, nrhs, a, lda, b, ldb, info); |
PL/I | CALL SPOSM | DPOSM | CPOSM | ZPOSM (uplo, a,
lda, n, b, ldb, nrhs);
CALL SPOTRS | DPOTRS | CPOTRS | ZPOTRS (uplo, n, nrhs, a, lda, b, ldb, info); |
If uplo = 'U', A is stored in upper storage mode.
If uplo = 'L', A is stored in lower storage mode.
Specified as: a single character. It must be 'U' or 'L'.
|If info = 0, the solve completed successfully.
The system AX = B is solved for X, using multiple right-hand sides, where X and B are general matrices, and A is a positive definite symmetric matrix for SPOSM, DPOSM, |SPOTRS, and DPOTRS, and a positive definite complex Hermitian matrix for CPOSM, ZPOSM, |CPOTRS, and ZPOTRS. These subroutines use the results of the factorization of matrix A, produced by a preceding call to |SPOF/SPOFCD/SPOTRF, DPOF/DPOFCD/DPOTRF, CPOF/CPOTRF, or |ZPOF/ZPOTRF, respectively. For a description of how A is factored, see SPPF, DPPF, SPOF, DPOF, CPOF, ZPOF, SPOTRF, DPOTRF, CPOTRF, and ZPOTRF--Positive Definite Real Symmetric or Complex Hermitian Matrix Factorization.
If n or nrhs is 0, no computation is performed. See references [8] and [36].
None
This example shows how to solve the system AX = B for two right-hand sides, where matrix A is the same matrix factored in the Example 3 for SPOF and SPOTRF.
UPLO A LDA N B LDB NRHS | | | | | | | CALL SPOSM( 'L' , A , 9 , 9 , B , 9 , 2 )
|or
| UPLO N NRHS A LDA B LDB INFO | | | | | | | | | |CALL SPOTRS( 'L' , 9 , 2 , A , 9 , B , 9 , INFO )
* * | 9.0 45.0 | | 17.0 89.0 | | 24.0 131.0 | | 30.0 170.0 | B = | 35.0 205.0 | | 39.0 235.0 | | 42.0 259.0 | | 44.0 276.0 | | 45.0 285.0 | * *
* * | 1.0 1.0 | | 1.0 2.0 | | 1.0 3.0 | | 1.0 4.0 | B = | 1.0 5.0 | | 1.0 6.0 | | 1.0 7.0 | | 1.0 8.0 | | 1.0 9.0 | * *
|INFO = 0
This example shows how to solve the system ATX = B for two right-hand sides, where matrix A is the input matrix factored in Example 4 for SPOF and SPOTRF.
UPLO A LDA N B LDB NRHS | | | | | | | CALL SPOSM( 'U' , A , 9 , 9 , B , 9 , 2 )
|or
| UPLO N NRHS A LDA B LDB INFO | | | | | | | | | |CALL SPOTRS( 'U' , 9 , 2 , A , 9 , B , 9 , INFO )
* * | 9.0 45.0 | | 17.0 89.0 | | 24.0 131.0 | | 30.0 170.0 | B = | 35.0 205.0 | | 39.0 235.0 | | 42.0 259.0 | | 44.0 276.0 | | 45.0 285.0 | * *
* * | 1.0 1.0 | | 1.0 2.0 | | 1.0 3.0 | | 1.0 4.0 | B = | 1.0 5.0 | | 1.0 6.0 | | 1.0 7.0 | | 1.0 8.0 | | 1.0 9.0 | * *
|INFO = 0
This example shows how to solve the system AX = B for two right-hand sides, where matrix A is the same matrix factored in the Example 5 for CPOF |and CPOTRF.
UPLO A LDA N B LDB NRHS | | | | | | | CALL CPOSM( 'L' , A , 3 , 3 , B , 3 , 2 )
|or
| UPLO N NRHS A LDA X LDB INFO | | | | | | | | | |CALL CPOTRS( 'L' , 3 , 2 , A , 3 , BX , 3 , INFO )
* * | (60.0, -55.0) (70.0, 10.0) | B = | (34.0, 58.0) (-51.0, 110.0) | | (13.0, -152.0) (75.0, 63.0) | * *
* * | (2.0, -1.0) ( 2.0, 0.0) | B = | (1.0, 1.0) (-1.0, 2.0) | | (0.0, -2.0) ( 1.0, 1.0) | * *
|INFO = 0
This example shows how to solve the system AX = B for two right-hand sides, where matrix A is the input matrix factored in Example 6 for CPOF |and CPOTRF.
UPLO A LDA N B LDB NRHS | | | | | | | CALL CPOSM( 'U' , A , 3 , 3 , B , 3 , 2 )
|or
| UPLO N NRHS A LDA B LDB INFO | | | | | | | | | |CALL CPOTRS( 'U' , 3 , 2 , A , 3 , B , 3 , INFO )
* * | ( 33.0, -18.0) (15.0, -3.0) | B = | ( 45.0, -45.0) ( 8.0, -2.0) | | (152.0, 1.0) (43.0, -29.0) | * *
* * | (2.0, -1.0) (2.0, 0.0) | B = | (1.0, -1.0) (0.0, 1.0) | | (3.0, 0.0) (1.0, -1.0) | * *
|INFO = 0