Level 3 BLAS-like Matrix-Matrix Operations APIs#
LAGTM#
- group lagtm
Functions
-
template<typename T>
void lagtm(char *trans, integer *n, integer *nrhs, T *alpha, T *dl, T *d, T *du, T *x, integer *ldx, T *beta, T *b, integer *ldb)# LAGTM performs a matrix-matrix product of the form C = αAB+βC, where A is a
tridiagonal matrix, B and C are rectangular matrices, and α and β are scalars,
which may be 0, 1, or -1.Purpose:
LAGTM performs a matrix-vector product of the form B := alpha * A * X + beta * B where A is a tridiagonal matrix of order N, B and X are N by NRHS matrices, and alpha and beta are real scalars, each of which may be 0., 1., or -1.
- Parameters:
TRANS – [in]
TRANS is CHARACTER*1
Specifies the operation applied to A.
= ‘N’: No transpose, B := alpha * A * X + beta * B
= ‘T’: Transpose, B := alpha * A’* X + beta * B
= ‘C’: Conjugate transpose = TransposeN – [in]
N is INTEGER
The order of the matrix A. N >= 0.
NRHS – [in]
NRHS is INTEGER
The number of right hand sides, i.e., the number of columns of the matrices X and B.
ALPHA – [in]
ALPHA is REAL
The scalar alpha. ALPHA must be 0., 1., or -1.; otherwise, it is assumed to be 0.
DL – [in]
DL is REAL array, dimension (N-1)
The (n-1) sub-diagonal elements of T.
D – [in]
D is REAL array, dimension (N)
The diagonal elements of T.
DU – [in]
DU is REAL array, dimension (N-1)
The (n-1) super-diagonal elements of T.
X – [in]
X is REAL array, dimension (LDX,NRHS)
The N by NRHS matrix X.
LDX – [in]
LDX is INTEGER
The leading dimension of the array X. LDX >= fla_max(N,1).
BETA – [in]
BETA is REAL
The scalar beta. BETA must be 0., 1., or -1.; otherwise, it is assumed to be 1.
B – [inout]
B is REAL array, dimension (LDB,NRHS)
On entry, the N by NRHS matrix B. On exit, B is overwritten by the matrix expression
B := alpha * A * X + beta * B.LDB – [in]
LDB is INTEGER
The leading dimension of the array B. LDB >= fla_max(N,1).
-
template<typename T>
LACRM#
- group lacrm
Functions
-
template<typename T, typename Ta>
void lacrm(integer *m, integer *n, T *a, integer *lda, Ta *b, integer *ldb, T *c, integer *ldc, T *rwork)# LACRM multiplies a complex matrix by a square real matrix.
Purpose:
LACRM performs a very simple matrix-matrix multiplication: C := A * B, where A is M by N and complex; B is N by N and real; C is M by N and complex.
- Parameters:
M – [in]
M is INTEGER
The number of rows of the matrix A and of the matrix C. M >= 0.
N – [in]
N is INTEGER
The number of columns and rows of the matrix B and the number of columns of the matrix C. N >= 0.
A – [in]
A is COMPLEX array, dimension (LDA, N)
On entry, A contains the M by N matrix A.
LDA – [in]
LDA is INTEGER
The leading dimension of the array A. LDA >=max(1,M).
B – [in]
B is REAL array, dimension (LDB, N)
On entry, B contains the N by N matrix B.
LDB – [in]
LDB is INTEGER
The leading dimension of the array B. LDB >=max(1,N).
C – [out]
C is COMPLEX array, dimension (LDC, N)
On exit, C contains the M by N matrix C.
LDC – [in]
LDC is INTEGER
The leading dimension of the array C. LDC >=max(1,N).
RWORK – [out] RWORK is REAL array, dimension (2*M*N)
-
template<typename T, typename Ta>
LARCM#
- group larcm
Functions
-
template<typename T, typename Ta>
void larcm(integer *m, integer *n, Ta *a, integer *lda, T *b, integer *ldb, T *c, integer *ldc, Ta *rwork)# LARCM copies all or part of a real two-dimensional array to a complex array.
Purpose:
LARCM performs a very simple matrix-matrix multiplication: C := A * B, where A is M by M and real; B is M by N and complex; C is M by N and complex.
- Parameters:
M – [in]
M is INTEGER
The number of rows of the matrix A and of the matrix C. M >= 0.
N – [in]
N is INTEGER
The number of columns and rows of the matrix B and the number of columns of the matrix C. N >= 0.
A – [in]
A is REAL array, dimension (LDA, M)
On entry, A contains the M by M matrix A.
LDA – [in]
LDA is INTEGER
The leading dimension of the array A. LDA >=max(1,M).
B – [in]
B is COMPLEX array, dimension (LDB, N)
On entry, B contains the M by N matrix B.
LDB – [in]
LDB is INTEGER
The leading dimension of the array B. LDB >=max(1,M).
C – [out]
C is COMPLEX array, dimension (LDC, N)
On exit, C contains the M by N matrix C.
LDC – [in]
LDC is INTEGER
The leading dimension of the array C. LDC >=max(1,M).
RWORK – [out] RWORK is REAL array, dimension (2*M*N)
-
template<typename T, typename Ta>
HFRK#
- group hfrk
Functions
-
template<typename T>
void sfrk(char *transr, char *uplo, char *trans, integer *n, integer *k, T *alpha, T *a, integer *lda, T *beta, T *c)# SFRK performs a symmetric rank-k operation for matrix in RFP format.
Purpose:
Level 3 BLAS like routine for C in RFP Format. SSFRK performs one of the symmetric rank--k operations C := alpha*A*A**T + beta*C, or C := alpha*A**T*A + beta*C, where alpha and beta are real scalars, C is an n--by--n symmetric matrix and A is an n--by--k matrix in the first case and a k--by--n matrix in the second case.
- Parameters:
TRANSR – [in]
TRANSR is CHARACTER*1
= ‘N’: The Normal Form of RFP A is stored;
= ‘T’: The Transpose Form of RFP A is stored.UPLO – [in]
UPLO is CHARACTER*1
On entry, UPLO specifies whether the upper or lower triangular part of the array C is to be referenced as follows:
UPLO = ‘U’ or ‘u’ Only the upper triangular part of C is to be referenced.
UPLO = ‘L’ or ‘l’ Only the lower triangular part of C is to be referenced.
Unchanged on exit.TRANS – [in]
TRANS is CHARACTER*1
On entry, TRANS specifies the operation to be performed as follows:
TRANS = ‘N’ or ‘n’ C := alpha*A*A**T + beta*C.
TRANS = ‘T’ or ‘t’ C := alpha*A**T*A + beta*C.
Unchanged on exit.N – [in]
N is INTEGER
On entry, N specifies the order of the matrix C. N must be at least zero.
Unchanged on exit.K – [in]
K is INTEGER
On entry with TRANS = ‘N’ or ‘n’, K specifies the number of columns of the matrix A, and on entry with TRANS = ‘T’ or ‘t’, K specifies the number of rows of the matrix A. K must be at least zero.
Unchanged on exit.ALPHA – [in]
ALPHA is REAL
On entry, ALPHA specifies the scalar alpha. Unchanged on exit.
A – [in]
A is REAL array, dimension (LDA,ka)
where KA is K when TRANS = ‘N’ or ‘n’, and is N otherwise. Before entry with TRANS = ‘N’ or ‘n’, the leading N
—by—K part of the array A must contain the matrix A, otherwise the leading K—by—N part of the array A must contain the matrix A. Unchanged on exit.LDA – [in]
LDA is INTEGER
On entry, LDA specifies the first dimension of A as declared in the calling (sub) program. When TRANS = ‘N’ or ‘n’ then LDA must be at least fla_max( 1, n), otherwise LDA must be at least fla_max( 1, k). Unchanged on exit.
BETA – [in]
BETA is REAL
On entry, BETA specifies the scalar beta. Unchanged on exit.
C – [inout]
C is REAL array, dimension (NT)
NT = N*(N+1)/2. On entry, the symmetric matrix C in RFP Format. RFP Format is described by TRANSR, UPLO and N.
-
template<typename T>
TFSM#
- group tfsm
Functions
-
template<typename T>
void tfsm(char *transr, char *side, char *uplo, char *trans, char *diag, integer *m, integer *n, T *alpha, T *a, T *b, integer *ldb)# TFSM solves a matrix equation (one operand is a triangular matrix in RFP format).
Purpose:
TFSM solves the matrix equation op( A)*X = alpha*B or X*op( A) = alpha*B 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) = A or op( A) = A**T. A is in Rectangular Full Packed (RFP) Format. The matrix X is overwritten on B.
- Parameters:
TRANSR – [in]
TRANSR is CHARACTER*1
= ‘N’: The Normal Form of RFP A is stored;
= ‘T’: The Transpose Form of RFP A is stored.SIDE – [in]
SIDE is CHARACTER*1
On entry, SIDE specifies whether op( A) appears on the left or right of X as follows:
SIDE = ‘L’ or ‘l’ op( A)*X = alpha*B.
SIDE = ‘R’ or ‘r’ X*op( A) = alpha*B.
Unchanged on exit.UPLO – [in]
UPLO is CHARACTER*1
On entry, UPLO specifies whether the RFP matrix A came from an upper or lower triangular matrix as follows:
UPLO = ‘U’ or ‘u’ RFP A came from an upper triangular matrix
UPLO = ‘L’ or ‘l’ RFP A came from a lower triangular matrix
Unchanged on exit.TRANS – [in]
TRANS is CHARACTER*1
On entry, TRANS specifies the form of op( A) to be used in the matrix multiplication as follows:
TRANS = ‘N’ or ‘n’ op( A) = A.
TRANS = ‘T’ or ‘t’ op( A) = A’.
Unchanged on exit.DIAG – [in]
DIAG is CHARACTER*1
On entry, DIAG specifies whether or not RFP A is unit triangular as follows:
DIAG = ‘U’ or ‘u’ A is assumed to be unit triangular.
DIAG = ‘N’ or ‘n’ A is not assumed to be unit triangular.
Unchanged on exit.M – [in]
M is INTEGER
On entry, M specifies the number of rows of B. M must be at least zero. Unchanged on exit.
N – [in]
N is INTEGER
On entry, N specifies the number of columns of B. N must be at least zero.
Unchanged on exit.ALPHA – [in]
ALPHA is 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 – [in]
A is 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=’N’ 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 = ‘T’ then RFP is the transpose of RFP A as defined when TRANSR = ‘N’. The contents of RFP A are defined by UPLO as follows: If UPLO = ‘U’ the RFP A contains the NT elements of upper packed A either in normal or transpose Format. If UPLO = ‘L’ 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 = ‘T’. When TRANSR is ‘N’ 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 – [inout]
B is 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 – [in]
LDB is INTEGER
On entry, LDB specifies the first dimension of B as declared in the calling (sub) program. LDB must be at least fla_max( 1, m).
Unchanged on exit.
-
template<typename T>