diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-11-07 14:02:47 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-11-07 14:02:47 +0100 |
commit | 5887e82729958f2b07ac7564a2929d26f3bf3a83 (patch) | |
tree | 80d4ae52d33c33785d13ca5211e29eee3bb0b2c4 /Eigen | |
parent | af9851d1d73b3aae5804f62d2d9e690be33bc3a5 (diff) |
Clean evaluator_impl_base. It will probably be removed in the future
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/CoreEvaluators.h | 59 |
1 files changed, 1 insertions, 58 deletions
diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h index 082c00df4..3b9dfee7a 100644 --- a/Eigen/src/Core/CoreEvaluators.h +++ b/Eigen/src/Core/CoreEvaluators.h @@ -74,6 +74,7 @@ struct evaluator<const T> // ---------- base class for all writable evaluators ---------- +// TODO this class does not seem to be necessary anymore template<typename ExpressionType> 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<ExpressionType> ExpressionTraits; - template<typename OtherEvaluatorType> - void copyCoeff(Index row, Index col, const OtherEvaluatorType& other) - { - derived().coeffRef(row, col) = other.coeff(row, col); - } - - template<typename OtherEvaluatorType> - 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<typename OtherEvaluatorType> - void copyCoeff(Index index, const OtherEvaluatorType& other) - { - derived().coeffRef(index) = other.coeff(index); - } - - template<int StoreMode, int LoadMode, typename OtherEvaluatorType> - void copyPacket(Index row, Index col, const OtherEvaluatorType& other) - { - derived().template writePacket<StoreMode>(row, col, - other.template packet<LoadMode>(row, col)); - } - - template<int StoreMode, int LoadMode, typename OtherEvaluatorType> - void copyPacketByOuterInner(Index outer, Index inner, const OtherEvaluatorType& other) - { - Index row = rowIndexByOuterInner(outer, inner); - Index col = colIndexByOuterInner(outer, inner); - derived().template copyPacket<StoreMode, LoadMode>(row, col, other); - } - - template<int StoreMode, int LoadMode, typename OtherEvaluatorType> - void copyPacket(Index index, const OtherEvaluatorType& other) - { - derived().template writePacket<StoreMode>(index, - other.template packet<LoadMode>(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<ExpressionType>& derived() { return *static_cast<evaluator_impl<ExpressionType>*>(this); |