Developer Reference for Intel® oneAPI Math Kernel Library for C
mkl_?imatcopy
Performs scaling and in-place transposition/copying of matrices.
Syntax
void mkl_simatcopy(const char ordering, const char trans, size_t rows, size_t cols,
const float alpha, float *AB, size_t lda, size_t ldb);
void mkl_dimatcopy(const char ordering, const char trans, size_t rows, size_t cols,
const double alpha, double *AB, size_t lda, size_t ldb);
void mkl_cimatcopy(const char ordering, const char trans, size_t rows, size_t cols,
const MKL_Complex8 alpha, MKL_Complex8 *AB, size_t lda, size_t ldb);
void mkl_zimatcopy(const char ordering, const char trans, size_t rows, size_t cols,
const MKL_Complex16 alpha, MKL_Complex16 *AB, size_t lda, size_t ldb);
Include Files
mkl.h
Description
The mkl_?imatcopy routine performs scaling and in-place transposition/copying of matrices. A transposition operation can be a normal matrix copy, a transposition, a conjugate transposition, or just a conjugation. The operation is defined as follows:
AB := alpha*op(AB).
Parameter descriptions are common for all implemented interfaces with the exception of data types that refer here to the FORTRAN 77 standard types. Data types specific to the different interfaces are described in the section “Interfaces” below.
Input Parameters
ordering
Ordering of the matrix storage.
If ordering = ‘R’ or ‘r’ , the ordering is row-major. If ordering = ‘C’ or ‘c’ , the ordering is column-major.
trans
Parameter that specifies the operation type.
If trans = ‘N’ or ‘n’ , op(AB)=AB and the matrix AB is assumed unchanged on input. If trans = ‘T’ or ‘t’ , it is assumed that AB should be transposed. If trans = ‘C’ or ‘c’ , it is assumed that AB should be conjugate transposed. If trans = ‘R’ or ‘r’ , it is assumed that AB should be only conjugated. If the data is real, then trans = ‘R’ is the same as trans = ‘N’ , and trans = ‘C’ is the same as trans = ‘T’ .
rows
The number of rows in matrix AB before the transpose operation.
cols
The number of columns in matrix AB before the transpose operation.
- ab
-
REAL for mkl_simatcopy . DOUBLE PRECISION for mkl_dimatcopy . COMPLEX for mkl_cimatcopy . DOUBLE COMPLEX for mkl_zimatcopy .
Array .
- alpha
-
REAL for mkl_simatcopy . DOUBLE PRECISION for mkl_dimatcopy . COMPLEX for mkl_cimatcopy . DOUBLE COMPLEX for mkl_zimatcopy . This parameter scales the input matrix by alpha .
lda
Distance between the first elements in adjacent columns (in the case of the column-major order) or rows (in the case of the row-major order) in the source matrix; measured in the number of elements.
This parameter must be at least rows if ordering = ‘C’ or ‘c’ , and max(1,cols) otherwise.
ldb
Distance between the first elements in adjacent columns (in the case of the column-major order) or rows (in the case of the row-major order) in the destination matrix; measured in the number of elements.
To determine the minimum value of ldb on output, consider the following guideline: If ordering = ‘C’ or ‘c’ , then If trans = ‘T’ or ‘t’ or ‘C’ or ‘c’ , this parameter must be at least max(1,cols) If trans = ‘N’ or ‘n’ or ‘R’ or ‘r’ , this parameter must be at least max(1,rows) If ordering = ‘R’ or ‘r’ , then If trans = ‘T’ or ‘t’ or ‘C’ or ‘c’ , this parameter must be at least max(1,rows) If trans = ‘N’ or ‘n’ or ‘R’ or ‘r’ , this parameter must be at least max(1,cols)
Output Parameters
- ab
-
REAL for mkl_simatcopy . DOUBLE PRECISION for mkl_dimatcopy . COMPLEX for mkl_cimatcopy . DOUBLE COMPLEX for mkl_zimatcopy .
Array .
Contains the matrix AB .
Application Notes
For threading to be active in mkl_?imatcopy , the pointer AB must be aligned on the 64-byte boundary. This requirement can be met by allocating AB with mkl_malloc .
Interfaces
FORTRAN 77:
SUBROUTINE mkl_simatcopy ( ordering, trans, rows, cols, alpha, ab, lda, ldb )
CHARACTER*1 ordering, trans
INTEGER rows, cols, src_ld, dst_ld
REAL ab(*), alpha*
SUBROUTINE mkl_dimatcopy ( ordering, trans, rows, cols, alpha, ab, lda, ldb )
CHARACTER*1 ordering, trans
INTEGER rows, cols, src_ld, dst_ld
DOUBLE PRECISION ab(*), alpha*
SUBROUTINE mkl_cimatcopy ( ordering, trans, rows, cols, alpha, ab, lda, ldb )
CHARACTER*1 ordering, trans
INTEGER rows, cols, src_ld, dst_ld
COMPLEX ab(*), alpha*
SUBROUTINE mkl_zimatcopy ( ordering, trans, rows, cols, alpha, ab, lda, ldb )
CHARACTER*1 ordering, trans
INTEGER rows, cols, src_ld, dst_ld
DOUBLE COMPLEX ab(*), alpha*