Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
?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
call sgemm_compute(transa, transb, m, n, k, a, lda, b, ldb, beta, C, ldc)
call dgemm_compute(transa, transb, m, n, k, a, lda, b, ldb, beta, C, ldc)
Include Files
mkl.fi
Description
The ?gemm_computecblas_?gemm_compute routine is one of a set of related routines that enable use of an internal packed storage. After calling ?gemm_packcblas_?gemm_pack call ?gemm_computecblas_?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
- Layout
-
Specifies whether two-dimensional array storage is row-major ( CblasRowMajor ) or column-major ( CblasColMajor ).
- transa
-
CHARACTER*1 . Specifies the form of op(A) used in the matrix multiplication :
If transa = 'N' or 'n' CblasNoTrans op(A) = A .
If transa = 'T' or 't' CblasTrans op(A) = A^{T} .
If transa = 'C' or 'c' CblasConjTrans op(A) = A^{H} .
If transa = 'P' or 'p' CblasPacked 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' CblasNoTrans op(B) = B .
If transb = 'T' or 't' CblasTrans op(B) = B^{T} .
If transb = 'C' or 'c' CblasConjTrans op(B) = B^{H} .
If transb = 'P' or 'p' CblasPacked 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 DOUBLE PRECISION for dgemm_compute Array:
- lda
-
INTEGER . Specifies the leading dimension of a as declared in the calling (sub)program.
If transa = 'N' or 'n' , lda must be at least max (1, m) . If transa = 'T' , 't' , 'C' , or 'c' , lda must be at least max (1, k) . If transa = 'P' or 'p' , lda is ignored.
- b
-
REAL for sgemm_compute DOUBLE PRECISION for dgemm_compute Array:
- ldb
-
INTEGER . Specifies the leading dimension of b as declared in the calling (sub)program.
If transb = 'N' or 'n' , ldb must be at least max (1, k) . If transb = 'T' , 't' , 'C' , or 'c' , ldb must be at least max (1, n) . If transb = 'P' or 'p' , ldb is ignored.
- beta
-
REAL for sgemm_compute DOUBLE PRECISION for dgemm_compute Specifies the scalar beta . When beta is equal to zero, then c need not be set on input.
- c
-
REAL for sgemm_compute DOUBLE PRECISION for dgemm_compute Array, size ldc by n . Before entry, the leading m -by- n part of the array c must contain the matrix C , except when beta is equal to zero, in which case c need not be set on entry. Array:
- ldc
-
INTEGER . Specifies the leading dimension of c as declared in the calling (sub)program.
The value of ldc must be at least max (1, m) .
Output Parameters
- c
-
Overwritten by the m -by- n matrix op(A)*op(B) + beta*C .