stfsm (l) - Linux Manuals
stfsm: 3 BLAS like routine for A in RFP Format
NAME
STFSM - 3 BLAS like routine for A in RFP FormatSYNOPSIS
- SUBROUTINE STFSM(
- TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
- + B, LDB )
- CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
- INTEGER LDB, M, N
- REAL ALPHA
- REAL A( 0: * ), B( 0: LDB-1, 0: * )
PURPOSE
Level 3 BLAS like routine for A in RFP Format. STFSM solves the matrix equationop(
where alpha is a scalar, X and B are m by n matrices, A is a unit, or non-unit, upper or lower triangular matrix and op( A ) is one of
op(
A is in Rectangular Full Packed (RFP) Format.
The matrix X is overwritten on B.
ARGUMENTS
TRANSR - (input) CHARACTER = aqNaq: The Normal Form of RFP A is stored;= aqTaq: The Transpose Form of RFP A is stored.
- SIDE - (input) CHARACTER
- On entry, SIDE specifies whether op( A ) appears on the left or right of X as follows: SIDE = aqLaq or aqlaq op( A )*X = alpha*B. SIDE = aqRaq or aqraq X*op( A ) = alpha*B. Unchanged on exit.
- UPLO - (input) CHARACTER
- On entry, UPLO specifies whether the RFP matrix A came from an upper or lower triangular matrix as follows: UPLO = aqUaq or aquaq RFP A came from an upper triangular matrix UPLO = aqLaq or aqlaq RFP A came from a lower triangular matrix Unchanged on exit.
- TRANS - (input) CHARACTER
- On entry, TRANS specifies the form of op( A ) to be used in the matrix multiplication as follows:
- TRANS = aqNaq or aqnaq op( A ) = A.
- TRANS = aqTaq or aqtaq op( A ) = Aaq.
- Unchanged on exit.
- DIAG - (input) CHARACTER
- On entry, DIAG specifies whether or not RFP A is unit triangular as follows: DIAG = aqUaq or aquaq A is assumed to be unit triangular. DIAG = aqNaq or aqnaq A is not assumed to be unit triangular. Unchanged on exit.
- M - (input) INTEGER.
- On entry, M specifies the number of rows of B. M must be at least zero. Unchanged on exit.
- N - (input) INTEGER.
- On entry, N specifies the number of columns of B. N must be at least zero. Unchanged on exit.
- ALPHA - (input) REAL.
- On entry, ALPHA specifies the scalar alpha. When alpha is zero then A is not referenced and B need not be set before entry. Unchanged on exit.
- A - (input) REAL array, dimension (NT);
-
NT = N*(N+1)/2. On entry, the matrix A in RFP Format.
RFP Format is described by TRANSR, UPLO and N as follows:
If TRANSR=aqNaq then RFP A is (0:N,0:K-1) when N is even;
K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If TRANSR = aqTaq then RFP is the transpose of RFP A as defined when TRANSR = aqNaq. The contents of RFP A are defined by UPLO as follows: If UPLO = aqUaq the RFP A contains the NT elements of upper packed A either in normal or transpose Format. If UPLO = aqLaq the RFP A contains the NT elements of lower packed A either in normal or transpose Format. The LDA of RFP A is (N+1)/2 when TRANSR = aqTaq. When TRANSR is aqNaq the LDA is N+1 when N is even and is N when is odd. See the Note below for more details. Unchanged on exit. - B - (input/ouptut) REAL array, DIMENSION (LDB,N)
- Before entry, the leading m by n part of the array B must contain the right-hand side matrix B, and on exit is overwritten by the solution matrix X.
- LDB - (input) INTEGER.
- On entry, LDB specifies the first dimension of B as declared in the calling (sub) program. LDB must be at least max( 1, m ). Unchanged on exit.
FURTHER DETAILS
We first consider Rectangular Full Packed (RFP) Format when N is even. We give an example where N = 6.Let TRANSR = aqNaq. RFP holds AP as follows:
For UPLO = aqUaq the upper trapezoid A(0:5,0:2) consists of the last three columns of AP upper. The lower triangle A(4:6,0:2) consists of the transpose of the first three columns of AP upper.
For UPLO = aqLaq the lower trapezoid A(1:6,0:2) consists of the first three columns of AP lower. The upper triangle A(0:2,0:2) consists of the transpose of the last three columns of AP lower.
This covers the case N even and TRANSR = aqNaq.
03 04 05
13 14 15
23 24 25
33 34 35
00 44 45
01 11 55
02 12 22
Now let TRANSR = aqTaq. RFP A in both UPLO cases is just the transpose of RFP A above. One therefore gets: