FLINT3.7.0-dev

acb_mat_mul_classical, acb_mat_mul_threaded, acb_mat_mul_reorder, acb_mat_mul

Synopsis#include <flint/acb_mat.h>
void acb_mat_mul_classical(acb_mat_t res, const acb_mat_t mat1, const acb_mat_t mat2, slong prec)source
void acb_mat_mul_threaded(acb_mat_t res, const acb_mat_t mat1, const acb_mat_t mat2, slong prec)source
void acb_mat_mul_reorder(acb_mat_t res, const acb_mat_t mat1, const acb_mat_t mat2, slong prec)source
void acb_mat_mul(acb_mat_t res, const acb_mat_t mat1, const acb_mat_t mat2, slong prec)source

Set res to the matrix product. The classical version computes each entry with acb_dot, and the threaded version does the same with the rows of the output distributed over flint_get_num_threads() threads. The reorder version writes the operands as A = A_r + iA_i, B = B_r + iB_i with real matrices and computes the product with real matrix multiplications by arb_mat_mul (one if both operands are real, two if one is, otherwise four, A_r B_r - A_i B_i and A_r B_i + A_i B_r), which benefits from the block algorithm of arb_mat_mul_block.

acb_mat_mul uses the reorder version if the inner dimension and the number of columns of B are at least 20, the midpoints have fewer than 8000 bits and these dimensions are at least 5 + b/64, where b is the smaller of prec and the largest midpoint size of the entries; otherwise the threaded version if several threads are available and the work is large enough, and the classical version otherwise.

Cite this page

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