Re-enable products with triangular views of sparse matrices: we simply have to treat them as a sparse matrix.

This commit is contained in:
Gael Guennebaud
2014-10-06 16:11:26 +02:00
parent 893bfcf95f
commit d44d432baa
5 changed files with 49 additions and 8 deletions

View File

@@ -146,6 +146,11 @@ struct generic_product_impl<Lhs, Rhs, SparseShape, DenseShape, ProductType>
}
};
template<typename Lhs, typename Rhs, int ProductType>
struct generic_product_impl<Lhs, Rhs, SparseTriangularShape, DenseShape, ProductType>
: generic_product_impl<Lhs, Rhs, SparseShape, DenseShape, ProductType>
{};
template<typename Lhs, typename Rhs, int ProductType>
struct generic_product_impl<Lhs, Rhs, DenseShape, SparseShape, ProductType>
{
@@ -158,12 +163,17 @@ struct generic_product_impl<Lhs, Rhs, DenseShape, SparseShape, ProductType>
RhsNested rhsNested(rhs);
dst.setZero();
// transpoe everything
// transpose everything
Transpose<Dest> dstT(dst);
internal::sparse_time_dense_product(rhsNested.transpose(), lhsNested.transpose(), dstT, typename Dest::Scalar(1));
}
};
template<typename Lhs, typename Rhs, int ProductType>
struct generic_product_impl<Lhs, Rhs, DenseShape, SparseTriangularShape, ProductType>
: generic_product_impl<Lhs, Rhs, DenseShape, SparseShape, ProductType>
{};
template<typename LhsT, typename RhsT, bool NeedToTranspose>
struct sparse_dense_outer_product_evaluator
{