Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
?gemm_pack_get_size , gemm_*_pack_get_size
Returns the number of bytes required to store the packed matrix.
Syntax
dest = sgemm_pack_get_size(identifier, m, n, k)
dest = dgemm_pack_get_size(identifier, m, n, k)
dest = gemm_s8u8s32_pack_get_size(identifier, m, n, k)
dest = gemm_s16s16s32_pack_get_size(identifier, m, n, k)
Include Files
mkl.fi
Description
The ?gemm_pack_get_size and gemm_*_pack_get_size routines belong to a set of related routines that enable the use of an internal packed storage. Call the ?gemm_pack_get_size and gemm_*_pack_get_size routines first to query the size of storage required for a packed matrix structure to be used in subsequent calls.
Ultimately, the packed matrix structure is used to compute \(C \leftarrow \alpha \cdot op(A)\cdot op(B) + \beta\cdot C\) for bfloat16, half, single and double precision or \(C \leftarrow \alpha (op(A)+ A_offset)\cdot(op(B)+ B_offset) + \beta*C + C_offset\) for integer type.
where: \(op(X)\) is one of the operations \(op(X) = X\) or \(op(X) = X^{T}\), \(\alpha\) and \(\beta\) are scalars, \(A\), \(A_{\text{offset}}\) , \(B\) , \(B_{\text{offset}}\) , \(C\) , and \(C_{\text{offset}}\) are matrices. \(op(A)\) is an \(m\) -by- \(k\) matrix, \(op(B)\) is a \(k\) -by- \(n\) matrix and \(C\) is an \(m\) -by- \(n\) matrix. A_{text{offset}} is an \(m\) -by- \(k\) matrix. \(B_{\text{offset}}\) is an \(k\) -by- \(n\) matrix. \(C_{\text{offset}}\) is an \(m\) -by- \(n\) matrix.
Input Parameters
Parameter |
Type |
Description |
|---|---|---|
identifier |
CHARACTER*1 . |
Specifies which matrix is to be packed: If identifier = 'A' or 'a' CblasAMatrix , the size returned is the size required to store matrix A in an internal format. If identifier = 'B' or 'b' CblasBMatrix , the size returned is the size required to store matrix B in an internal format. |
m |
INTEGER. |
Specifies the number of rows of 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 matrix op( B ) and the number of columns of matrix C . The value of n must be at least zero. |
k |
INTEGER. |
Specifies the number of columns of matrix op( A ) and the number of rows of matrix op( B ). The value of k must be at least zero. |
Return Values
Parameter |
Type |
Description |
|---|---|---|
size |
INTEGER. |
Returns the size (in bytes) required to store the matrix when packed into the internal format of Intel® oneAPI Math Kernel Library (oneMKL) . |