## Developer Reference

• 2020.2
• 07/15/2020
• Public Content
Contents

# ?gemm_compute

Computes a matrix-matrix product with general matrices where one or both input matrices are stored in a packed data structure and adds the result to a scalar-matrix product.

## Syntax

Include Files
• mkl.fi
Description
The
?gemm_compute
routine is one of a set of related routines that enable use of an internal packed storage. After calling
?gemm_pack
call
?gemm_compute
to compute
C
:= op(
A
)*op(
B
) +
beta
*
C
,
where:

op(
X
)
is one of the operations
op(
X
) =
X
,
op(
X
) =
X
T
, or
op(
X
) =
X
H
,

beta
is a scalar,

A
,
B
, and
C
are matrices:

op(
A
)
is an
m
-by-
k
matrix,

op(
B
)
is a
k
-by-
n
matrix,

C
is an
m
-by-
n
matrix.

For best performance, use the same number of threads for packing and for computing.
If packing for both
A
and
B
matrices, you must use the same number of threads for packing
A
as for packing
B
.
Input Parameters
transa
CHARACTER*1
.
Specifies the form of
op(
A
)
used in the matrix multiplication:
If
transa
=
'N'
or
'n'

op(
A
) =
A
.
If
transa
=
'T'
or
't'

op(
A
) =
A
T
.
If
transa
=
'C'
or
'c'

op(
A
) =
A
H
.
If
transa
=
'P'
or
'p'
the matrix in array
a
is packed and
lda
is ignored.
transb
CHARACTER*1
.
Specifies the form of
op(
B
)
used in the matrix multiplication:
If
transb
=
'N'
or
'n'

op(
B
) =
B
.
If
transb
=
'T'
or
't'
op(
B
) =
B
T
.
If
transb
=
'C'
or
'c'
op(
B
) =
B
H
.
If
transb
=
'P'
or
'p'
the matrix in array
b
is packed and
ldb
is ignored.
m
INTEGER
.
Specifies the number of rows of the matrix
op(
A
)
and of the matrix
C
. The value of
m
must be at least zero.
n
INTEGER
.
Specifies the number of columns of the matrix
op(
B
)
and the number of columns of the matrix
C
. The value of
n
must be at least zero.
k
INTEGER
.
Specifies the number of columns of the matrix
op(
A
)
and the number of rows of the matrix
op(
B
)
. The value of
k
must be at least zero.
a
REAL
for
sgemm_compute