Matrix multiplication: Strassen vs. Standard
I tried to implement the Strassen algorithm for matrix multiplication with C++, but the result isn't that, what I expected. As you can see strassen always takes more time then standard implementation and only with a dimension from a power of 2 is as fast as standard implementation. What went wrong? matrix mult_strassen(matrix a, matrix b) { if (a.dim() <= cut) return mult_std(a, b); matrix a11 = get_part(0, 0, a); matrix a12 = get_part(0, 1, a); matrix a21 = get_part(1, 0, a); matrix a22 = get_part(1, 1, a); matrix b11 = get_part(0, 0, b); matrix b12 = get_part(0, 1, b); matrix b21 = get_part