Sample implementation of the Strassen Algorithm for matrix multiplication
Latest commit b5b6d28 Feb 20, 2011 @mikecvet - More doc in the README
Failed to load latest commit information.
src - Added some documentation Feb 20, 2011
CMakeLists.txt - Adding source files Feb 20, 2011
README - More doc in the README Feb 20, 2011


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 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<T> object uses a matrix_multiplier<T> object to perform its matrix multiplication. This defaults to the strassen_matrix_multiplier<T>, but can be customized by passing a different type to the matrix constructor. For example,

strassen::matrix<int> A (123, 456); // Default strassen_matrix_multiplier<int>
strassen::matrix<int> B (123, 456, new strassen::parallel_strassen_matrix_multiplier<int> ()); // Uses custom matrix multiplier
A.mult (B) // A now equals A * B