Level 2 BLAS-like Matrix-Vector Operations APIs#
LASCL#
- group lascl
Functions
-
template<typename T>
void lascl(char *type, integer *kl, integer *ku, T *cfrom, T *cto, integer *m, integer *n, T *a, integer *lda, integer *info)# LASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
Purpose:
LASCL multiplies the M by N real matrix A by the real scalar CTO/CFROM. This is done without over/underflow as long as the final result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that A may be full, upper triangular, lower triangular, upper Hessenberg, or banded.
- Parameters:
TYPE – [in]
TYPE is CHARACTER*1
TYPE indices the storage type of the input matrix.
= ‘G’: A is a full matrix.
= ‘L’: A is a lower triangular matrix.
= ‘U’: A is an upper triangular matrix.
= ‘H’: A is an upper Hessenberg matrix.
= ‘B’: A is a symmetric band matrix with lower bandwidth KL and upper bandwidth KU and with the only the lower half stored.
= ‘Q’: A is a symmetric band matrix with lower bandwidth KL and upper bandwidth KU and with the only the upper half stored.
= ‘Z’: A is a band matrix with lower bandwidth KL and upper bandwidth KU. See SGBTRF for storage details.KL – [in]
KL is INTEGER
The lower bandwidth of A. Referenced only if TYPE = ‘B’, ‘Q’ or ‘Z’.
KU – [in]
KU is INTEGER
The upper bandwidth of A. Referenced only if TYPE = ‘B’, ‘Q’ or ‘Z’.
CFROM – [in] CFROM is REAL
CTO – [in]
CTO is REAL
The matrix A is multiplied by CTO/CFROM. A(I,J) is computed without over/underflow if the final result CTO*A(I,J)/CFROM can be represented without over/underflow. CFROM must be nonzero.
M – [in]
M is INTEGER
The number of rows of the matrix A. M >= 0.
N – [in]
N is INTEGER
The number of columns of the matrix A. N >= 0.
A – [inout]
A is REAL array, dimension (LDA,N)
The matrix to be multiplied by CTO/CFROM. See TYPE for the storage type.
LDA – [in]
LDA is INTEGER
The leading dimension of the array A.
If TYPE = ‘G’, ‘L’, ‘U’, ‘H’, LDA >= fla_max(1,M);
TYPE = ‘B’, LDA >= KL+1;
TYPE = ‘Q’, LDA >= KU+1;
TYPE = ‘Z’, LDA >= 2*KL+KU+1.
INFO – [out]
INFO is INTEGER
0 - successful exit
<0 - if INFO = -i, the i-th argument had an illegal value.
-
template<typename T>
LAGEAMV#
- group lageamv
Functions
-
template<typename T>
void la_geamv(integer *trans, integer *m, integer *n, T *alpha, T *a, integer *lda, T *x, integer *incx, T *beta, T *y, integer *incy)# LA_GEAMV computes a matrix-vector product using a general matrix to calculate error bounds.
Purpose:
LA_GEAMV performs one of the matrix-vector operations y := alpha*abs(A)*abs(x) + beta*abs(y), or y := alpha*abs(A)**T*abs(x) + beta*abs(y), where alpha and beta are scalars, x and y are vectors and A is an m by n matrix. This function is primarily used in calculating error bounds. To protect against underflow during evaluation, components in the resulting vector are perturbed away from zero by (N+1) times the underflow threshold. To prevent unnecessarily large errors for block-structure embedded in general matrices, "symbolically" zero components are not perturbed. A zero entry is considered "symbolic" if all multiplications involved in computing that entry have at least one zero multiplicand. Level 2 Blas routine.
- Parameters:
TRANS – [in]
TRANS is INTEGER
On entry, TRANS specifies the operation to be performed as follows:
BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
Unchanged on exit.
M – [in]
M is INTEGER
On entry, M specifies the number of rows of the matrix A. M must be at least zero.
Unchanged on exit.N – [in]
N is INTEGER
On entry, N specifies the number of columns of the matrix A. N 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, n)
Before entry, the leading m by n part of the array A must contain the matrix of coefficients.
Unchanged on exit.LDA – [in]
LDA is INTEGER
On entry, LDA specifies the first dimension of A as declared in the calling (sub) program. LDA must be at least fla_max(1, m).
Unchanged on exit.X – [in]
X is REAL array, dimension (1 + (n - 1)*abs(INCX)) when TRANS = ‘N’ or ‘n’
and at least (1 + (m - 1)*abs(INCX)) otherwise.
Before entry, the incremented array X must contain the vector x.
Unchanged on exit.
INCX – [in]
INCX is INTEGER
On entry, INCX specifies the increment for the elements of X. INCX must not be zero.
Unchanged on exit.BETA – [in]
BETA is REAL
On entry, BETA specifies the scalar beta. When BETA is supplied as zero then Y need not be set on input.
Unchanged on exit.Y – [inout]
Y is REAL array, dimension at least (1 + (m - 1)*abs(INCY)) when TRANS = ‘N’ or ‘n’
and at least (1 + (n - 1)*abs(INCY)) otherwise.
Before entry with BETA non-zero, the incremented array Y must contain the vector y. On exit, Y is overwritten by the updated vector y.INCY – [in]
INCY is INTEGER
On entry, INCY specifies the increment for the elements of Y. INCY must not be zero.
Unchanged on exit.
-
template<typename T>
LAGEAMB#
- group lageamb
Functions
-
template<typename T>
void la_gbamv(integer *trans, integer *m, integer *n, integer *kl, integer *ku, T *alpha, T *ab, integer *ldab, T *x, integer *incx, T *beta, T *y, integer *incy)# LA_GBAMV performs a matrix-vector operation to calculate error bounds.
Purpose:
LA_GBAMV performs one of the matrix-vector operations y := alpha*abs(A)*abs(x) + beta*abs(y), or y := alpha*abs(A)**T*abs(x) + beta*abs(y), where alpha and beta are scalars, x and y are vectors and A is an m by n matrix. This function is primarily used in calculating error bounds. To protect against underflow during evaluation, components in the resulting vector are perturbed away from zero by (N+1) times the underflow threshold. To prevent unnecessarily large errors for block-structure embedded in general matrices, "symbolically" zero components are not perturbed. A zero entry is considered "symbolic" if all multiplications involved in computing that entry have at least one zero multiplicand. Level 2 Blas routine.
- Parameters:
TRANS – [in]
TRANS is INTEGER
On entry, TRANS specifies the operation to be performed as follows:
BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
Unchanged on exit.
M – [in]
M is INTEGER
On entry, M specifies the number of rows of the matrix A. M must be at least zero.
Unchanged on exit.N – [in]
N is INTEGER
On entry, N specifies the number of columns of the matrix A. N must be at least zero.
Unchanged on exit.KL – [in]
KL is INTEGER
The number of subdiagonals within the band of A. KL >= 0.
KU – [in]
KU is INTEGER
The number of superdiagonals within the band of A. KU >= 0.
ALPHA – [in]
ALPHA is REAL
On entry, ALPHA specifies the scalar alpha. Unchanged on exit.
AB – [in]
AB is REAL array, dimension (LDAB, n)
Before entry, the leading m by n part of the array AB must contain the matrix of coefficients.
Unchanged on exit.LDAB – [in]
LDAB is INTEGER
On entry, LDA specifies the first dimension of AB as declared in the calling (sub) program. LDAB must be at least fla_max(1, m).
Unchanged on exit.X – [in]
X is REAL array, dimension (1 + (n - 1)*abs(INCX)) when TRANS = ‘N’ or ‘n’
and at least (1 + (m - 1)*abs(INCX)) otherwise. Before entry, the incremented array X must contain the vector x.
Unchanged on exit.INCX – [in]
INCX is INTEGER
On entry, INCX specifies the increment for the elements of X. INCX must not be zero.
Unchanged on exit.BETA – [in]
BETA is REAL
On entry, BETA specifies the scalar beta. When BETA is supplied as zero then Y need not be set on input.
Unchanged on exit.Y – [inout]
Y is REAL array, dimension (1 + (m - 1)*abs(INCY)) when TRANS = ‘N’ or ‘n’
and at least (1 + (n - 1)*abs(INCY)) otherwise.
Before entry with BETA non-zero, the incremented array Y must contain the vector y. On exit, Y is overwritten by the updated vector y.INCY – [in]
INCY is INTEGER
On entry, INCY specifies the increment for the elements of Y. INCY must not be zero.
Unchanged on exit.
-
template<typename T>
LA_HEAMV#
- group la_heamv
Functions
-
template<typename T, typename Ta>
void la_heamv(integer *uplo, integer *n, Ta *alpha, T *a, integer *lda, T *x, integer *incx, Ta *beta, Ta *y, integer *incy)# LA_HEAMV computes a matrix-vector product using a Hermitian indefinite matrix to calculate error bounds.
Purpose:
LA_HEAMV performs the matrix-vector operation y := alpha*abs(A)*abs(x) + beta*abs(y), where alpha and beta are scalars, x and y are vectors and A is an n by n symmetric matrix. This function is primarily used in calculating error bounds. To protect against underflow during evaluation, components in the resulting vector are perturbed away from zero by (N+1) times the underflow threshold. To prevent unnecessarily large errors for block-structure embedded in general matrices, "symbolically" zero components are not perturbed. A zero entry is considered "symbolic" if all multiplications involved in computing that entry have at least one zero multiplicand.
- Parameters:
UPLO – [in]
UPLO is INTEGER
On entry, UPLO specifies whether the upper or lower triangular part of the array A is to be referenced as follows:
UPLO = BLAS_UPPER Only the upper triangular part of A is to be referenced.
UPLO = BLAS_LOWER Only the lower triangular part of A is to be referenced.
Unchanged on exit.N – [in]
N is INTEGER
On entry, N specifies the number of columns of the matrix A. N 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 COMPLEX array, dimension (LDA, n).
Before entry, the leading m by n part of the array A must contain the matrix of coefficients.
Unchanged on exit.LDA – [in]
LDA is INTEGER
On entry, LDA specifies the first dimension of A as declared in the calling (sub) program. LDA must be at least fla_max(1, n).
Unchanged on exit.X – [in]
X is COMPLEX array, dimension (1 + (n - 1)*abs(INCX))
Before entry, the incremented array X must contain the vector x.
Unchanged on exit.INCX – [in]
INCX is INTEGER
On entry, INCX specifies the increment for the elements of X. INCX must not be zero.
Unchanged on exit.BETA – [in]
BETA is REAL.
On entry, BETA specifies the scalar beta. When BETA is supplied as zero then Y need not be set on input. Unchanged on exit.
Y – [inout]
Y is REAL array, dimension (1 + (n - 1)*abs(INCY))
Before entry with BETA non-zero, the incremented array Y must contain the vector y. On exit, Y is overwritten by the updated vector y.
INCY – [in]
INCY is INTEGER
On entry, INCY specifies the increment for the elements of Y. INCY must not be zero.
Unchanged on exit.
-
template<typename T, typename Ta>
LASCL2#
- group lascl2
Functions
-
template<typename T>
void lascl2(integer *m, integer *n, T *d, T *x, integer *ldx)# LASCL2 performs diagonal scaling on a vector.
Purpose:
LASCL2 performs a diagonal scaling on a vector: x <-- D * x where the diagonal matrix D is stored as a vector. Eventually to be replaced by BLAS_sge_diag_scale in the new BLAS standard.
- Parameters:
M – [in]
M is INTEGER
The number of rows of D and X. M >= 0.
N – [in]
N is INTEGER
The number of columns of X. N >= 0.
D – [in]
D is REAL array, length M
Diagonal matrix D, stored as a vector of length M.
X – [inout]
X is REAL array, dimension (LDX,N)
On entry, the vector X to be scaled by D. On exit, the scaled vector.
LDX – [in]
LDX is INTEGER
The leading dimension of the vector X. LDX >= M.
-
template<typename T>
LARSCL2#
- group larscl2
Functions
-
template<typename T>
void larscl2(integer *m, integer *n, T *d, T *x, integer *ldx)# LARSCL2 performs reciprocal diagonal scaling on a vector.
Purpose:
LARSCL2 performs a reciprocal diagonal scaling on an vector: x <-- inv(D) * x where the diagonal matrix D is stored as a vector. Eventually to be replaced by BLAS_sge_diag_scale in the new BLAS standard.
- Parameters:
M – [in]
M is INTEGER
The number of rows of D and X. M >= 0.
N – [in]
N is INTEGER
The number of columns of X. N >= 0.
D – [in]
D is REAL array, length M
Diagonal matrix D, stored as a vector of length M.
X – [inout]
X is REAL array, dimension (LDX,N)
On entry, the vector X to be scaled by D. On exit, the scaled vector.
LDX – [in]
LDX is INTEGER
The leading dimension of the vector X. LDX >= M.
-
template<typename T>
LA_WWADDW#
- group la_wwaddw
Functions
-
template<typename T>
void la_wwaddw(integer *n, T *x, T *y, T *w)# LA_WWADDW adds a vector into a doubled-single vector.
Purpose:
LA_WWADDW adds a vector W into a doubled-single vector (X, Y). This works for all extant IBM's hex and binary floating point arithmetic, but not for decimal.
- Parameters:
N – [in]
N is INTEGER
The length of vectors X, Y, and W.
X – [inout]
X is REAL array, dimension (N)
The first part of the doubled-single accumulation vector.
Y – [inout]
Y is REAL array, dimension (N)
The second part of the doubled-single accumulation vector.
W – [in]
W is REAL array, dimension (N)
The vector to be added.
-
template<typename T>