From 1b5de5a37b47ef2738e5bdf4135777f00ac5967d Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 18 Feb 2014 13:30:16 +0100 Subject: Add evaluator for Ref --- Eigen/src/Core/CoreEvaluators.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'Eigen') diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h index ef900e236..d02bac0a8 100644 --- a/Eigen/src/Core/CoreEvaluators.h +++ b/Eigen/src/Core/CoreEvaluators.h @@ -587,7 +587,7 @@ struct evaluator > CoeffReturnType coeff(Index index) const { return coeff(RowsAtCompileTime == 1 ? 0 : index, - RowsAtCompileTime == 1 ? index : 0); + RowsAtCompileTime == 1 ? index : 0); } Scalar& coeffRef(Index row, Index col) @@ -598,7 +598,7 @@ struct evaluator > Scalar& coeffRef(Index index) { return coeffRef(RowsAtCompileTime == 1 ? 0 : index, - RowsAtCompileTime == 1 ? index : 0); + RowsAtCompileTime == 1 ? index : 0); } template @@ -612,7 +612,7 @@ struct evaluator > PacketReturnType packet(Index index) const { return packet(RowsAtCompileTime == 1 ? 0 : index, - RowsAtCompileTime == 1 ? index : 0); + RowsAtCompileTime == 1 ? index : 0); } template @@ -626,8 +626,8 @@ struct evaluator > void writePacket(Index index, const PacketScalar& x) { return writePacket(RowsAtCompileTime == 1 ? 0 : index, - RowsAtCompileTime == 1 ? index : 0, - x); + RowsAtCompileTime == 1 ? index : 0, + x); } protected: @@ -647,6 +647,19 @@ struct evaluator > { } }; +// -------------------- Ref -------------------- + +template +struct evaluator > + : public evaluator > > +{ + typedef Ref XprType; + + evaluator(const XprType& map) + : evaluator >(map) + { } +}; + // -------------------- Block -------------------- template