FLINT3.7.0-dev

d_mat_mul_classical

Synopsis#include <flint/d_mat.h>
void d_mat_mul_classical(d_mat_t C, const d_mat_t A, const d_mat_t B)source

Sets C = AB using the classical algorithm in double-precision arithmetic. Throws an exception unless C has as many rows as A and as many columns as B; the number of columns of A must equal the number of rows of B (not checked). Aliasing of C with A or B is allowed.

The function transposes B and then forms the dot products of rows of A and rows of B^T in blocks of 8 columns, so that the inner loop runs over contiguous memory. Each entry is accumulated from partial sums of at most 8 terms, so the result can differ in the last bits from a straightforward loop. If C is aliased with A or B, the product is computed into a temporary matrix and swapped into C, and the dimensions of C are not checked.

Cite this page

The FLINT team, “d_mat_mul_classical (d_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/d_mat/d_mat_mul_classical.html (generated 2026-10-20).