?imatcopy
Store the in-place matrix transposition result or copy scaling result to original address space.

The value of op(X) may be
. alpha is a multiplication coefficient, and AB is an m*n matrix.
Interface Definition
C interface:
void cblas_simatcopy(const enum CBLAS_ORDER cblasOrder, const enum CBLAS_TRANSPOSE Trans, const BLASINT M, const BLASINT N, const float alpha, float *AB, const BLASINT lda, const BLASINT ldb);
void cblas_dimatcopy(const enum CBLAS_ORDER cblasOrder, const enum CBLAS_TRANSPOSE Trans, const BLASINT M, const BLASINT N, const float alpha, float *AB, const BLASINT lda, const BLASINT ldb);
void cblas_cimatcopy(const enum CBLAS_ORDER cblasOrder, const enum CBLAS_TRANSPOSE Trans, const BLASINT M, const BLASINT N, const float alpha, float *AB, const BLASINT lda, const BLASINT ldb);
void cblas_zimatcopy(const enum CBLAS_ORDER cblasOrder, const enum CBLAS_TRANSPOSE Trans, const BLASINT M, const BLASINT N, const float alpha, float *AB, const BLASINT lda, const BLASINT ldb);
Fortran interface:
CALL SIMATCOPY(ORDER, TRANS, M, N, ALPHA, AB, LDA, LDB)
CALL DIMATCOPY(ORDER, TRANS, M, N, ALPHA, AB, LDA, LDB)
CALL CIMATCOPY(ORDER, TRANS, M, N, ALPHA, AB, LDA, LDB)
CALL ZIMATCOPY(ORDER, TRANS, M, N, ALPHA, AB, LDA, LDB)
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
order |
Enumeration type CBLAS_ORDER |
Indicates whether the matrix is in row- or column-major order. |
Input |
Trans |
Enumeration type CBLAS_TRANSPOSE |
Indicates whether the matrix A is a conventional matrix, a transpose matrix, or a conjugate matrix.
|
Input |
M |
Integer |
Number of rows in matrix AB |
Input |
N |
Integer |
Number of columns in matrix AB |
Input |
alpha |
|
Multiplication coefficient |
Input |
AB |
|
Matrix AB |
Input/Output |
lda |
Integer |
Leading dimension of matrix AB
|
Input |
ldb |
Integer |
Leading dimension of the output result
|
Input |
Dependencies
#include "kblas.h"
Examples
int m = 4;
int k = 3;
int lda = 4;
int ldb = 4;
float alpha[2] = {1.0, 2.0};
/**
* AB:
* 0.340188, -0.105617, -0.222225, 0.053970, 0.135712, 0.217297
* 0.283099, 0.298440, -0.022603, 0.128871, -0.358397, 0.106969
* 0.411647, -0.302449, -0.135216, 0.013401, -0.483699, -0.257113
* -0.164777, 0.268230, 0.452230, 0.416195, -0.362768, 0.304177
*/
float ab[24] = {0.340188, -0.105617, 0.283099, 0.298440, 0.411647, -0.302449, -0.164777, 0.268230,
-0.222225, 0.053970, -0.022603, 0.128871, -0.135216, 0.013401, 0.452230, 0.416195,
0.135712, 0.217297, -0.358397, 0.109, -0.483699, -0.257113, -0.362768, 0.304177};
cblas_cimatcopy(CblasColMajor, CblasNoTrans, m, k, alpha, ab, lda, ldb);
/**
* Output AB:
* 0.551422, 0.574759, -0.313781, 0.864638, 1.016545, 0.520845
* -0.701237, -0.061324, -0.330165, -0.390480, -0.280345, 0.083665
* -0.162018, -0.257031, -0.380160, 1.320655, -0.298882, 0.488721
* -0.576397, -0.607794, 0.030527, -1.224511, -0.971122, -0.421359
*/
Fortran interface:
PROGRAM OMATCOPY
INTEGER :: M=4, K=3
INTEGER :: LDA=4, LDB=4
COMPLEX(4) :: ALPHA=(1.0, 2.0)
COMPLEX(4) :: AB(4, 3)
DATA AB/(0.340188, -0.105617), (0.283099, 0.298440),
$ (0.411647, -0.302449), (-0.164777, 0.268230),
$ (-0.222225, 0.053970), (-0.022603, 0.128871),
$ (-0.135216, 0.013401), (0.452230, 0.416195),
$ (0.135712, 0.217297), (-0.358397, 0.109),
$ (-0.483699, -0.257113), (-0.362768, 0.304177)/
EXTERNAL CIMATCOPY
CALL CIMATCOPY('C', 'N', M, K, ALPHA, AB, LDA, LDB)
END
* Output AB:
* (0.551422000,0.574759007) (-0.313781023,0.864637971) (1.01654494,0.520844996)
* (-0.701236963,-6.132400036E-02) (-0.330164999,-0.390479982) (-0.280344993,8.366499841E-02)
* (-0.162018001,-0.257030994) (-0.380160004,1.32065499) (-0.298882008,0.488721013)
* (-0.576397002,-0.607794046) (3.052702546E-02,-1.22451103) (-0.971121967,-0.421359003)



