aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseCore/SparseProduct.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-05-18 16:53:28 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-05-18 16:53:28 +0200
commit8456bbbadb8175a9e20d804b61de4da7d951d7f7 (patch)
treed1d13d8c0a3ed74127eb51ab4ab012921a9007da /Eigen/src/SparseCore/SparseProduct.h
parentb507b8232643c2054397cbf58da3ec55c10d9133 (diff)
bug #1224: fix regression in (dense*dense).sparseView() by specializing evaluator<SparseView<Product>> for sparse products only.
Diffstat (limited to 'Eigen/src/SparseCore/SparseProduct.h')
-rw-r--r--Eigen/src/SparseCore/SparseProduct.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Eigen/src/SparseCore/SparseProduct.h b/Eigen/src/SparseCore/SparseProduct.h
index cbd0db71b..b23003bb1 100644
--- a/Eigen/src/SparseCore/SparseProduct.h
+++ b/Eigen/src/SparseCore/SparseProduct.h
@@ -131,14 +131,14 @@ struct Assignment<DstXprType, Product<Lhs,Rhs,AliasFreeProduct>, internal::sub_a
};
template<typename Lhs, typename Rhs, int Options>
-struct evaluator<SparseView<Product<Lhs, Rhs, Options> > >
+struct unary_evaluator<SparseView<Product<Lhs, Rhs, Options> >, IteratorBased>
: public evaluator<typename Product<Lhs, Rhs, DefaultProduct>::PlainObject>
{
typedef SparseView<Product<Lhs, Rhs, Options> > XprType;
typedef typename XprType::PlainObject PlainObject;
typedef evaluator<PlainObject> Base;
-
- explicit evaluator(const XprType& xpr)
+
+ explicit unary_evaluator(const XprType& xpr)
: m_result(xpr.rows(), xpr.cols())
{
using std::abs;
@@ -147,13 +147,13 @@ struct evaluator<SparseView<Product<Lhs, Rhs, Options> > >
typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;
LhsNested lhsNested(xpr.nestedExpression().lhs());
RhsNested rhsNested(xpr.nestedExpression().rhs());
-
+
internal::sparse_sparse_product_with_pruning_selector<typename remove_all<LhsNested>::type,
typename remove_all<RhsNested>::type, PlainObject>::run(lhsNested,rhsNested,m_result,
abs(xpr.reference())*xpr.epsilon());
}
-
-protected:
+
+protected:
PlainObject m_result;
};