From 729e874a34412edd85fba715afde914104b40027 Mon Sep 17 00:00:00 2001 From: Ashish Bhanu Daulatabad Date: Fri, 13 Jan 2023 18:11:50 +0000 Subject: [PATCH] Reduce the matrix size. --- divide_and_conquer/strassen_matrix_multiplication.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/divide_and_conquer/strassen_matrix_multiplication.cpp b/divide_and_conquer/strassen_matrix_multiplication.cpp index 1d06bf5a8..47498c966 100644 --- a/divide_and_conquer/strassen_matrix_multiplication.cpp +++ b/divide_and_conquer/strassen_matrix_multiplication.cpp @@ -343,7 +343,7 @@ class Matrix { // multiplication, or the matrix is of odd size, then go with the naive // multiplication route; // else; go with the strassen's method. - if (size <= 128ULL || (size & 1ULL)) { + if (size <= 64ULL || (size & 1ULL)) { return this->naive_multiplication(other); } else { const Matrix @@ -425,7 +425,7 @@ class Matrix { * @returns void */ static void test() { - const size_t s = 2048; + const size_t s = 512; auto matrix_demo = divide_and_conquer::strassens_multiplication::Matrix(s, s);