mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Reduce the matrix size.
This commit is contained in:
parent
d0185256ff
commit
729e874a34
@ -343,7 +343,7 @@ class Matrix {
|
|||||||
// multiplication, or the matrix is of odd size, then go with the naive
|
// multiplication, or the matrix is of odd size, then go with the naive
|
||||||
// multiplication route;
|
// multiplication route;
|
||||||
// else; go with the strassen's method.
|
// else; go with the strassen's method.
|
||||||
if (size <= 128ULL || (size & 1ULL)) {
|
if (size <= 64ULL || (size & 1ULL)) {
|
||||||
return this->naive_multiplication(other);
|
return this->naive_multiplication(other);
|
||||||
} else {
|
} else {
|
||||||
const Matrix<Number>
|
const Matrix<Number>
|
||||||
@ -425,7 +425,7 @@ class Matrix {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
static void test() {
|
static void test() {
|
||||||
const size_t s = 2048;
|
const size_t s = 512;
|
||||||
auto matrix_demo =
|
auto matrix_demo =
|
||||||
divide_and_conquer::strassens_multiplication::Matrix<size_t>(s, s);
|
divide_and_conquer::strassens_multiplication::Matrix<size_t>(s, s);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user