From c86911ac7358058aad4366a69de2db1aa5c44c49 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 30 Jan 2017 13:38:24 +0100 Subject: bug #1384: fix evaluation of "sparse/scalar" that used the wrong evaluation path. --- Eigen/src/SparseCore/SparseCwiseBinaryOp.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Eigen/src/SparseCore') diff --git a/Eigen/src/SparseCore/SparseCwiseBinaryOp.h b/Eigen/src/SparseCore/SparseCwiseBinaryOp.h index 145a7389e..c41c07af1 100644 --- a/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +++ b/Eigen/src/SparseCore/SparseCwiseBinaryOp.h @@ -357,6 +357,16 @@ struct binary_evaluator, Lhs, Rhs>, Itera explicit binary_evaluator(const XprType& xpr) : Base(xpr) {} }; +// "sparse ./ dense" +template +struct binary_evaluator, Lhs, Rhs>, IteratorBased, IndexBased> + : sparse_conjunction_evaluator, Lhs, Rhs> > +{ + typedef CwiseBinaryOp, Lhs, Rhs> XprType; + typedef sparse_conjunction_evaluator Base; + explicit binary_evaluator(const XprType& xpr) : Base(xpr) {} +}; + // "sparse && sparse" template struct binary_evaluator, IteratorBased, IteratorBased> -- cgit v1.2.3