Skip to content
fn

dgemm

void dgemm(bool transA, bool transB, int M, int N, int K, double alpha, const double * A, int lda, const double * B, int ldb, double beta, double * C, int ldc)

Double-precision general matrix multiply (GEMM).

Identical contract to sgemm but operates on double buffers and dispatches to cblas_dgemm.

Math

Cij←α∑k=0K−1AikBkj+βCijC_{ij} \leftarrow \alpha \sum_{k=0}^{K-1} A_{ik} B_{kj} + \beta C_{ij}

References

Accelerate.framework cblas_dgemm.

Parameters

transA, transBbool
Whether AA or BB should be transposed before the multiply.
M, N, Kint
C∈RM×NC \in \mathbb{R}^{M \times N}, A∈RM×KA \in \mathbb{R}^{M \times K}, B∈RK×NB \in \mathbb{R}^{K \times N} before optional transposition.
alpha, betadouble
Linear-combination coefficients.
A, Bconst double*
Row-major operand buffers.
Cdouble*
Row-major output buffer.
lda, ldb, ldcint
Leading dimensions.