Commit Graph

3 Commits

Author SHA1 Message Date
Sameer Agarwal f217ccfb69 Use MatrixTransposeMatrix multiply from small_blas.h
Prior to this Cheng Wang had to work the MatrixTransposeMatrixMultiply
function in inner_product_computer because of its lagging performance.

Now that the implementation of MatrixTransposeMatrixMultiply
has been updated to match the implementation in inner_product_computer
this CL removes the redundancy.

This CL also includes a fix to MatrixTransposeMatrixMultiply
which was missed in the earlier refactoring, because the test
coverage for small_blas is broken. The tests for InnerProductComputer
caught the problem.

Change-Id: Ia8890010da058c2d9fe738dc77f0be34af5618ab
2018-02-25 20:53:10 -08:00
Sameer Agarwal f7957e29ec Build cleanup
1. Remove unused variable.
2. Make inner_product_computer compatible with older versions of Eigen,
   which don't have a named enum for Eigen::Upper/Lower.

Change-Id: I927af297f93fc74f7f4b29b39e400ef2d75edbd4
2017-06-22 00:49:11 -07:00
Sameer Agarwal b5b394c738 Add InnerProductComputer
Add a class that given a block sparse matrix m will compute
the product m'*m efficiently.

This code is refactoring and cleanup of the code in
CompressedRowSparseMatrix devoted to computing the inner product.

In that class, the code is mistakenly said to be computing
the outer product. It is also devoted to computing the inner
product of a CompressedRowSparseMatrix with itself.

This code works with BlockSparseMatrix objects instead, which
are simpler to deal with as they are better structured to handle
block sparse matrices.

Change-Id: I920fee1a396bb0fcae9e6f7e46a308c7391d21aa
2017-06-21 23:17:54 -07:00