Developer Reference

  • 0.10
  • 10/21/2020
  • Public Content
Contents

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
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
that have been stored in compact format. The operation is defined for each matrix as:
C
c
:=
alpha
*op(
A
c
)*op(
B
c
) +
beta
*
C
c
Where
  • op(
    X
    c
    ) is one of op(
    X
    c
    ) =
    X
    c
    , or op(
    X
    c
    ) =
    X
    c
    T
    , or op(
    X
    c
    ) =
    X
    c
    H
    ,
  • alpha
    and
    beta
    are scalars,
  • A
    c
    ,
    B
    c
    , and
    C
    c
    are matrices that have been stored in compact format,
  • op(
    A
    c
    ) is an
    m
    -by-
    k
    matrix for each matrix in the group,
  • op(
    B
    c
    ) is a
    k
    -by-
    n
    matrix for each matrix in the group,
  • and
    C
    c
    is an
    m
    -by-
    n
    matrix.
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
transa
=
MKL_NOTRANS
, then
op(
A
c
):=
A
c
.
If
transa
=
MKL_TRANS
, then
op(
A
c
):=
A
c
T
.
If
transa
=
MKL_CONJTRANS
, then
op(
A
c
):=
A
c
H
.
transb
Specifies the operation:
If
transb
=
MKL_NOTRANS
, then
op(
B
c
):=
B
c
.
If
transb
=
MKL_TRANS
, then
op(
B
c
):=
B
c
T
.
If
transb
=
MKL_CONJTRANS
, then
op(
B
c
):=
B
c
H
.
m
The number of rows of the matrices op(
A
c
), m >= 0.
n
The number of columns of matrices op(
B
c
) and
C
c
.
n
0
.
k
The number of columns of matrices op(
A
c
) and the number of rows of matrices
op(
B
c
)
.
k
0
.
alpha
Specifies the scalar
alpha
.
ap
Points to the beginning of the array that stores the
nm
A
c
matrices. See Compact Format for more details.
transa
=
MKL_NOTRANS
transa
=
MKL_TRANS
or
transa
=
MKL_CONJTRANS
layout
=
MKL_COL_MAJOR
ap
has size
ldap
*
k
*
nm
.
ap
has size
ldap
*
m
*
nm
.
layout
=
MKL_ROW_MAJOR
ap
has size
ldap
*
m
*
nm
.
ap
has size
ldap
*
k
*
nm
.
ldap
Specifies the leading dimension of
A
c
.
bp
Points to the beginning of the array that stores the
nm
B
c
matrices. See Compact Format for more details.
transb
=
MKL_NOTRANS
transb
=
MKL_TRANS
or
transb
=
MKL_CONJTRANS
layout
=
MKL_COL_MAJOR
bp
has size
ldbp
*
n
*
nm
.
bp
has size
ldbp
*
k
*
nm
.
layout
=
MKL_ROW_MAJOR
bp
has size
ldbp
*
k
*
nm
.
bp
has size
ldbp
*
n
*
nm
.
ldbp
Specifies the leading dimension of
B
c
.
beta
Specifies the scalar
beta
.
cp
Before entry,
cp
points to the beginning of the array that stores the
nm
C
c
matrices, except when beta is equal to zero, in which case
cp
need not be set on entry.
layout
=
MKL_COL_MAJOR
cp
has size
ldap
*
n
*
nm
.
layout
=
MKL_ROW_MAJOR
cp
has size
ldap
*
m
*
nm
.
ldcp
Specifies the leading dimension of
C
c
.
layout
=
MKL_COL_MAJOR
ldcp
must be at least max (1,
m
).
layout
=
MKL_ROW_MAJOR
ldcp
must 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 matrix
C
c
is overwritten by the
m
-by-
n
matrix (
alpha
*op(
A
c
)*op(
B
c
) +
beta
*
C
c
).

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information reg