** Padding zeros approach is used **
This contains a relatively simple sample implementation of the Strassen Algorithm for matrix multiplication, written in C++. Also provided are some wrapper classes for matrices and other matrix multiplication methods which can be used for comparison.
See http://en.wikipedia.org/wiki/Strassen_algorithm or section 28.2 of CLRS for more information on the algorithm.
Most of the functionality is implemented in templated header files, under src/strassen. There is a test source file at src/test/test_strassen_matrix.cpp demonstrating how to use the matrix wrapper classes and the matrixm multipliers.
A matrix object uses a matrix_multiplier object to perform its matrix multiplication. This defaults to the strassen_matrix_multiplier, but can be customized by passing a different type to the matrix constructor. For example,
strassen::matrix A (123, 456); // Default strassen_matrix_multiplier strassen::matrix B (123, 456, new strassen::parallel_strassen_matrix_multiplier ()); // Uses custom matrix multiplier A.mult (B) // A now equals A * B