From ae405839652dc72935821bdaed163e7be04b3082 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 11 Mar 2014 11:47:14 +0100 Subject: [PATCH] Fix CoeffReadCost issues --- Eigen/src/Core/PermutationMatrix.h | 9 ++++++++- Eigen/src/LU/FullPivLU.h | 8 ++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Eigen/src/Core/PermutationMatrix.h b/Eigen/src/Core/PermutationMatrix.h index 6a26af3a5..9add80c54 100644 --- a/Eigen/src/Core/PermutationMatrix.h +++ b/Eigen/src/Core/PermutationMatrix.h @@ -60,7 +60,9 @@ class PermutationBase : public EigenBase typedef typename Traits::IndicesType IndicesType; enum { Flags = Traits::Flags, +#ifndef EIGEN_TEST_EVALUATORS CoeffReadCost = Traits::CoeffReadCost, +#endif RowsAtCompileTime = Traits::RowsAtCompileTime, ColsAtCompileTime = Traits::ColsAtCompileTime, MaxRowsAtCompileTime = Traits::MaxRowsAtCompileTime, @@ -473,8 +475,11 @@ struct traits > ColsAtCompileTime = _IndicesType::SizeAtCompileTime, MaxRowsAtCompileTime = IndicesType::MaxRowsAtCompileTime, MaxColsAtCompileTime = IndicesType::MaxColsAtCompileTime, - Flags = 0, + Flags = 0 +#ifndef EIGEN_TEST_EVALUATORS + , CoeffReadCost = _IndicesType::CoeffReadCost +#endif }; }; } @@ -626,7 +631,9 @@ class Transpose > typedef typename Derived::DenseMatrixType DenseMatrixType; enum { Flags = Traits::Flags, +#ifndef EIGEN_TEST_EVALUATORS CoeffReadCost = Traits::CoeffReadCost, +#endif RowsAtCompileTime = Traits::RowsAtCompileTime, ColsAtCompileTime = Traits::ColsAtCompileTime, MaxRowsAtCompileTime = Traits::MaxRowsAtCompileTime, diff --git a/Eigen/src/LU/FullPivLU.h b/Eigen/src/LU/FullPivLU.h index e0236fd9e..a06f5702c 100644 --- a/Eigen/src/LU/FullPivLU.h +++ b/Eigen/src/LU/FullPivLU.h @@ -16,11 +16,7 @@ namespace internal { template struct traits > : traits<_MatrixType> { - typedef traits<_MatrixType> BaseTraits; - enum { - Flags = BaseTraits::Flags & RowMajorBit, - CoeffReadCost = Dynamic - }; + enum { Flags = 0 }; }; } // end namespace internal @@ -755,7 +751,7 @@ void FullPivLU<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const namespace internal { -#ifdef EIGEN_TEST_EVALUATORS +#ifndef EIGEN_TEST_EVALUATORS template struct solve_retval, Rhs> : solve_retval_base, Rhs>