GEMM¶
General matrix multiplication functions for locally computing \( C \leftarrow \alpha OP(A) OP(B) + \beta C \).
Functions
-
SplaError spla_sgemm(SplaOperation opA, SplaOperation opB, int m, int n, int k, float alpha, const float *A, int lda, const float *B, int ldb, float beta, float *C, int ldc, SplaContext ctx)¶
Computes a local general matrix multiplication of the form \( C \leftarrow \alpha op(A) op(B) + \beta C \) in single precision.
If context with processing unit set to GPU, pointers to matrices can be any combination of host and device pointers.
- Parameters
opA – [in] Operation applied when reading matrix \(A\).
opB – [in] Operation applied when reading matrix \(B\).
m – [in] Number of rows of \(OP(A)\)
n – [in] Number of columns of \(OP(B)\)
k – [in] Number rows of \(OP(B)\) and number of columns of \(OP(A)\)
alpha – [in] Scaling of multiplication of \(A^H\) and \(B\)
A – [in] Pointer to matrix \(A\).
lda – [in] Leading dimension of \(A\).
B – [in] Pointer to matrix \(B\).
ldb – [in] Leading dimension of \(B\).
beta – [in] Scaling of \(C\) before summation.
C – [out] Pointer to matrix \(C\).
ldc – [in] Leading dimension of \(C\).
ctx – [in] Context handle, which provides configuration settings and reusable resources.
-
SplaError spla_dgemm(SplaOperation opA, SplaOperation opB, int m, int n, int k, double alpha, const double *A, int lda, const double *B, int ldb, double beta, double *C, int ldc, SplaContext ctx)¶
Computes a local general matrix multiplication of the form \( C \leftarrow \alpha OP(A) OP(B) + \beta C \) in double precision.
See documentation above.
-
SplaError spla_cgemm(SplaOperation opA, SplaOperation opB, int m, int n, int k, const void *alpha, const void *A, int lda, const void *B, int ldb, const void *beta, void *C, int ldc, SplaContext ctx)¶
Computes a local general matrix multiplication of the form \( C \leftarrow \alpha OP(A) OP(B) + \beta C \) in single precision complex types.
See documentation above.
-
SplaError spla_zgemm(SplaOperation opA, SplaOperation opB, int m, int n, int k, const void *alpha, const void *A, int lda, const void *B, int ldb, const void *beta, void *C, int ldc, SplaContext ctx)¶
Computes a local general matrix multiplication of the form \( C \leftarrow \alpha OP(A) OP(B) + \beta C \) in double precision complex types.
See documentation above.