Skip to content

num::blas::gemm

Defined in header <blas/matrix_ops.hpp>

void gemm(real alpha, const real *A, idx lda, bool transA, const real *B, idx ldb,
          bool transB, real beta, real *C, idx ldc, idx m, idx n, idx k);  // (1)

void gemm(real alpha, const mat<real> &A, bool transA, const mat<real> &B, bool transB,
          real beta, mat<real> &C);  // (2)

(1) C <- alpha op(A) op(B) + beta C on row-major storage with leading dimensions, where op transposes when the flag is set: op(A) is m x k, op(B) is k x n, C is m x n. No operand is copied.

(2) C <- alpha op(A) op(B) + beta C for matrices; C must already be m x n.