aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseCore/SparseAssign.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-09-01 14:50:59 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-09-01 14:50:59 +0200
commitbc065c75d2a8df928cb368d0352b8fcb25791fa8 (patch)
treeb7cbf2328407c3fb09c7b6568a37aab60b8fd8dc /Eigen/src/SparseCore/SparseAssign.h
parente6cc24cbd60113c704d8f88293d4efdd1eef1b98 (diff)
Implement the missing bits to make Solve compatible with sparse rhs
Diffstat (limited to 'Eigen/src/SparseCore/SparseAssign.h')
-rw-r--r--Eigen/src/SparseCore/SparseAssign.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Eigen/src/SparseCore/SparseAssign.h b/Eigen/src/SparseCore/SparseAssign.h
index 0a29cb32f..36c9fe845 100644
--- a/Eigen/src/SparseCore/SparseAssign.h
+++ b/Eigen/src/SparseCore/SparseAssign.h
@@ -284,6 +284,18 @@ struct Assignment<DstXprType, SrcXprType, internal::assign_op<typename DstXprTyp
}
};
+// Specialization for "dst = dec.solve(rhs)"
+// NOTE we need to specialize it for Sparse2Sparse to avoid ambiguous specialization error
+template<typename DstXprType, typename DecType, typename RhsType, typename Scalar>
+struct Assignment<DstXprType, Solve<DecType,RhsType>, internal::assign_op<Scalar>, Sparse2Sparse, Scalar>
+{
+ typedef Solve<DecType,RhsType> SrcXprType;
+ static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar> &)
+ {
+ src.dec()._solve_impl(src.rhs(), dst);
+ }
+};
+
} // end namespace internal
#endif // EIGEN_TEST_EVALUATORS