cutoffs for using mat_sqr_classical

This commit is contained in:
fredrik 2018-08-28 15:54:25 +02:00
parent 41176f59db
commit ce12934875
2 changed files with 4 additions and 2 deletions

View file

@ -16,7 +16,8 @@ acb_mat_mul_classical(acb_mat_t C, const acb_mat_t A, const acb_mat_t B, slong p
{
slong ar, ac, br, bc, i, j, k;
if (A == B)
if (A == B && (acb_mat_nrows(A) <= 2 ||
(prec >= 1024 && acb_mat_nrows(A) < 8)))
{
acb_mat_sqr_classical(C, A, prec);
return;

View file

@ -16,7 +16,8 @@ arb_mat_mul_classical(arb_mat_t C, const arb_mat_t A, const arb_mat_t B, slong p
{
slong ar, ac, br, bc, i, j, k;
if (A == B)
if (A == B && (arb_mat_nrows(A) <= 2 ||
(prec >= 1024 && arb_mat_nrows(A) < 8)))
{
arb_mat_sqr_classical(C, A, prec);
return;