mkl_?gemm_compact
mkl_?gemm_compact
Computes a matrix-matrix product of a set of compact format general matrices.
Syntax
void
mkl_sgemm_compact
(
MKL_LAYOUT
layout
,
MKL_TRANSPOSE
transa
,
MKL_TRANSPOSE
transb
,
MKL_INT
m
,
MKL_INT
n
,
MKL_INT
k
,
float
alpha
,
const
float
*ap
,
MKL_INT
ldap
,
const
float
*bp
,
MKL_INT
ldbp
,
float
beta
,
float
*cp
,
MKL_INT
ldcp
,
MKL_COMPACT_PACK
format
,
MKL_INT
nm
);
void
mkl_dgemm_compact
(
MKL_LAYOUT
layout
,
MKL_TRANSPOSE
transa
,
MKL_TRANSPOSE
transb
,
MKL_INT
m
,
MKL_INT
n
,
MKL_INT
k
,
double
alpha
,
const
double
*ap
,
MKL_INT
ldap
,
const
double
*bp
,
MKL_INT
ldbp
,
double
beta
,
double
*cp
,
MKL_INT
ldcp
,
MKL_COMPACT_PACK
format
,
MKL_INT
nm
);
void
mkl_cgemm_compact
(
MKL_LAYOUT
layout
,
MKL_TRANSPOSE
transa
,
MKL_TRANSPOSE
transb
,
MKL_INT
m
,
MKL_INT
n
,
MKL_INT
k
,
mkl_compact_complex_float
*alpha
,
const
float
*ap
,
MKL_INT
ldap
,
const
float
*bp
,
MKL_INT
ldbp
,
mkl_compact_complex_float
*beta
,
float
*cp
,
MKL_INT
ldcp
,
MKL_COMPACT_PACK
format
,
MKL_INT
nm
);
void
mkl_zgemm_compact
(
MKL_LAYOUT
layout
,
MKL_TRANSPOSE
transa
,
MKL_TRANSPOSE
transb
,
MKL_INT
m
,
MKL_INT
n
,
MKL_INT
k
,
mkl_compact_complex_double
*alpha
,
const
double
*ap
,
MKL_INT
ldap
,
const
double
*bp
,
MKL_INT
ldbp
,
mkl_compact_complex_double
*beta
,
double
*cp
,
MKL_INT
ldcp
,
MKL_COMPACT_PACK
format
,
MKL_INT
nm
);
Description
The that have been stored in compact format. The operation
is defined for each matrix as:
mkl_?gemm_compact
routine computes a scalar-matrix-matrix product and adds
the result to a scalar-matrix product for a group of nm
general
matrices A
c
C
c
alpha
*op(A
c
B
c
beta
*C
c
Where
- op(X) is one of op(cX) =cX, or op(cX) =cXcT, or op(X) =cXcH,
- alphaandbetaare scalars,
- A,cB, andcCare matrices that have been stored in compact format,c
- op(A) is ancm-by-kmatrix for each matrix in the group,
- op(B) is ack-by-nmatrix for each matrix in the group,
- andCis ancm-by-nmatrix.
Input Parameters
- layout
- Specifies whether two-dimensional array storage is row-major (MKL_ROW_MAJOR) or column-major (MKL_COL_MAJOR).
- transa
- Specifies the operation:If, thentransa=MKL_NOTRANSop(.A):=cAcIf, thentransa=MKL_TRANSop(.A):=cAcTIf, thentransa=MKL_CONJTRANSop(.A):=cAcH
- transb
- Specifies the operation:If, thentransb=MKL_NOTRANSop(.B):=cBcIf, thentransb=MKL_TRANSop(.B):=cBcTIf, thentransb=MKL_CONJTRANSop(.B):=cBcH
- m
- The number of rows of the matrices op(A), m >= 0.c
- n
- The number of columns of matrices op(B) andcC.c.n≥0
- k
- The number of columns of matrices op(A) and the number of rows of matricescop(.B)c.k≥0
- alpha
- Specifies the scalaralpha.
- ap
- Points to the beginning of the array that stores thenmAmatrices. See Compact Format for more details.ctransa=MKL_NOTRANStransa=MKL_TRANSortransa=MKL_CONJTRANSlayout=MKL_COL_MAJORaphas sizeldap*k*nm.aphas sizeldap*m*nm.layout=MKL_ROW_MAJORaphas sizeldap*m*nm.aphas sizeldap*k*nm.
- ldap
- Specifies the leading dimension ofA.c
- bp
- Points to the beginning of the array that stores thenmBmatrices. See Compact Format for more details.ctransb=MKL_NOTRANStransb=MKL_TRANSortransb=MKL_CONJTRANSlayout=MKL_COL_MAJORbphas sizeldbp*n*nm.bphas sizeldbp*k*nm.layout=MKL_ROW_MAJORbphas sizeldbp*k*nm.bphas sizeldbp*n*nm.
- ldbp
- Specifies the leading dimension ofB.c
- beta
- Specifies the scalarbeta.
- cp
- Before entry,cppoints to the beginning of the array that stores thenmCmatrices, except when beta is equal to zero, in which caseccpneed not be set on entry.layout=MKL_COL_MAJORcphas sizeldap*n*nm.layout=MKL_ROW_MAJORcphas sizeldap*m*nm.
- ldcp
- Specifies the leading dimension ofC.clayout=MKL_COL_MAJORldcpmust be at least max (1,m).layout=MKL_ROW_MAJORldcpmust be at least max (1,n).
- format
- Specifies the format of the compact matrices. See Compact Format or mkl_get_format_compact for details.
- nm
- Total number of matrices stored in compact format in the group of matrices.
The values of
ldap
, ldbp
, and ldcp
used in mkl_?gemm_compact
must be consistent with the values used in mkl_?get_size_compact
, mkl_?gepack_compact
, and mkl_?geunpack_compact
.Output Parameters
- cp
- Each matrixCis overwritten by thecm-by-nmatrix (alpha*op(A)*op(cB) +cbeta*C).c