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=ABC = AB using the classical algorithm in double-precision arithmetic. Throws an exception unless CC has as many rows as AA and as many columns as BB; the number of columns of AA must equal the number of rows of BB (not checked). Aliasing of CC with AA or BB is allowed.

The function transposes BB and then forms the dot products of rows of AA and rows of BTB^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 CC is aliased with AA or BB, the product is computed into a temporary matrix and swapped into CC, and the dimensions of CC 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-11-02).