diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h index 082c00df48..3b9dfee7a4 100644 --- a/Eigen/src/Core/CoreEvaluators.h +++ b/Eigen/src/Core/CoreEvaluators.h @@ -74,6 +74,7 @@ struct evaluator // ---------- base class for all writable evaluators ---------- +// TODO this class does not seem to be necessary anymore template struct evaluator_impl_base { @@ -81,64 +82,6 @@ struct evaluator_impl_base // TODO that's not very nice to have to propagate all these traits. They are currently only needed to handle outer,inner indices. typedef traits ExpressionTraits; - template - void copyCoeff(Index row, Index col, const OtherEvaluatorType& other) - { - derived().coeffRef(row, col) = other.coeff(row, col); - } - - template - void copyCoeffByOuterInner(Index outer, Index inner, const OtherEvaluatorType& other) - { - Index row = rowIndexByOuterInner(outer, inner); - Index col = colIndexByOuterInner(outer, inner); - derived().copyCoeff(row, col, other); - } - - template - void copyCoeff(Index index, const OtherEvaluatorType& other) - { - derived().coeffRef(index) = other.coeff(index); - } - - template - void copyPacket(Index row, Index col, const OtherEvaluatorType& other) - { - derived().template writePacket(row, col, - other.template packet(row, col)); - } - - template - void copyPacketByOuterInner(Index outer, Index inner, const OtherEvaluatorType& other) - { - Index row = rowIndexByOuterInner(outer, inner); - Index col = colIndexByOuterInner(outer, inner); - derived().template copyPacket(row, col, other); - } - - template - void copyPacket(Index index, const OtherEvaluatorType& other) - { - derived().template writePacket(index, - other.template packet(index)); - } - - Index rowIndexByOuterInner(Index outer, Index inner) const - { - return int(ExpressionType::RowsAtCompileTime) == 1 ? 0 - : int(ExpressionType::ColsAtCompileTime) == 1 ? inner - : int(ExpressionType::Flags)&RowMajorBit ? outer - : inner; - } - - Index colIndexByOuterInner(Index outer, Index inner) const - { - return int(ExpressionType::ColsAtCompileTime) == 1 ? 0 - : int(ExpressionType::RowsAtCompileTime) == 1 ? inner - : int(ExpressionType::Flags)&RowMajorBit ? inner - : outer; - } - evaluator_impl& derived() { return *static_cast*>(this);