Intel® Math Kernel Library 2019 Developer Reference - C
Create a GEMM kernel that computes a scalar-matrix-matrix product and adds the result to a scalar-matrix product.
mkl_jit_status_t mkl_jit_create_sgemm(void** jitter, const MKL_LAYOUT layout, const MKL_TRANPOSE transa, const MKL_TRANSPOSE transb, const MKL_INT m, const MKL_INT n, const MKL_INT k, const float alpha, const MKL_INT lda, const MKL_INT ldb, const float beta, const MKL_INT ldc);
mkl_jit_status_t mkl_jit_create_dgemm(void** jitter, const MKL_LAYOUT layout, const MKL_TRANPOSE transa, const MKL_TRANSPOSE transb, const MKL_INT m, const MKL_INT n, const MKL_INT k, const double alpha, const MKL_INT lda, const MKL_INT ldb, const double beta, const MKL_INT ldc);
The mkl_jit_create_?gemm functions belong to a set of related routines that enable use of just-in-time code generation.
The mkl_jit_create_?gemm functions create a handle on a jitter and generate a GEMM kernel that computes a scalar-matrix-matrix product and adds the result to a scalar-matrix product, with general matrices. The operation of the generated GEMM kernel is defined as follows:
C := alpha*op(A)*op(B) + beta*C
Where:
Just-in-time (JIT) code generation introduces a runtime overhead when calling mkl_jit_create_?gemm. To benefit from JIT code generation, use this feature when you need to call the generated kernel many times (for example, several hundred calls).
Specifies whether two-dimensional array storage is row-major (MKL_ROW_MAJOR) or column-major (MKL_COL_MAJOR).
Specifies the form of op(A) used in the generated matrix multiplication:
Specifies the form of op(B) used in the generated matrix multiplication:
Specifies the number of rows of the matrix op(A) and of the matrix C. The value of m must be at least zero.
Specifies the number of columns of the matrix op(B) and of the matrix C. The value of n must be at least zero.
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.
Specifies the scalar alpha.
Specifies the leading dimension of a.
transa=MKL_NOTRANS | transa=MKL_TRANS | |
layout=MKL_ROW_MAJOR | lda must be at least max(1,k) |
lda must be at least max(1,m) |
layout=MKL_COL_MAJOR | lda must be at least max(1,m) |
lda must be at least max(1,k) |
Specifies the leading dimension of b:
transa=MKL_NOTRANS | transa=MKL_TRANS | |
layout=MKL_ROW_MAJOR | ldb must be at least max(1,n) |
ldb must be at least max(1,k) |
layout=MKL_COL_MAJOR | ldb must be at least max(1,k) |
ldb must be at least max(1,n) |
Specifies the scalar beta.
Specifies the leading dimension of c.
layout=MKL_ROW_MAJOR | ldc must be at least max(1,n) |
layout=MKL_COL_MAJOR | ldc must be at least max(1,m) |
jitter |
Pointer to a jitter handle. |
Returns one of the following:
MKL_JIT_ERROR if the handle cannot be created (no memory)
—or—
MKL_JIT_SUCCESS if the jitter has been created and a GEMM kernel JIT-ed
—or—
MKL_NO_JIT if the jitter has been created and the GEMM kernel will point to a standard GEMM function