diff --git a/Eigen/src/Core/Solve.h b/Eigen/src/Core/Solve.h index c28789968..a1501c259 100644 --- a/Eigen/src/Core/Solve.h +++ b/Eigen/src/Core/Solve.h @@ -99,6 +99,15 @@ private: Scalar coeff(Index i) const; }; +#ifdef EIGEN_TEST_EVALUATORS +// Generic API dispatcher +template +class SolveImpl : public internal::generic_xpr_base, MatrixXpr, StorageKind>::type +{ + public: + typedef typename internal::generic_xpr_base, MatrixXpr, StorageKind>::type Base; +}; +#endif namespace internal { 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 +struct Assignment, internal::assign_op, Sparse2Sparse, Scalar> +{ + typedef Solve SrcXprType; + static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op &) + { + src.dec()._solve_impl(src.rhs(), dst); + } +}; + } // end namespace internal #endif // EIGEN_TEST_EVALUATORS diff --git a/Eigen/src/SparseCore/SparseUtil.h b/Eigen/src/SparseCore/SparseUtil.h index 0183907a1..28bf89bca 100644 --- a/Eigen/src/SparseCore/SparseUtil.h +++ b/Eigen/src/SparseCore/SparseUtil.h @@ -156,6 +156,14 @@ template struct plain_matrix_type typedef SparseMatrix<_Scalar, _Options, _Index> type; }; +#ifdef EIGEN_TEST_EVALUATORS +template +struct solve_traits +{ + typedef typename sparse_eval::type PlainObject; +}; +#endif + template struct generic_xpr_base {