diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-03-12 16:18:34 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-03-12 16:18:34 +0100 |
commit | a6be1952f4d345b10011c605a833e609bcc695e7 (patch) | |
tree | 4cac1cc7603b99bccc370c96700b1a31f2e9a74e /Eigen/src/Core | |
parent | 0bd5671b9e0fe85a7de50d316688b83927900bca (diff) |
Fix a few regression when moving the flags
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r-- | Eigen/src/Core/AssignEvaluator.h | 4 | ||||
-rw-r--r-- | Eigen/src/Core/CoreEvaluators.h | 8 | ||||
-rw-r--r-- | Eigen/src/Core/Matrix.h | 3 | ||||
-rw-r--r-- | Eigen/src/Core/PlainObjectBase.h | 4 | ||||
-rw-r--r-- | Eigen/src/Core/Product.h | 8 |
5 files changed, 23 insertions, 4 deletions
diff --git a/Eigen/src/Core/AssignEvaluator.h b/Eigen/src/Core/AssignEvaluator.h index 05816094c..62ab531f0 100644 --- a/Eigen/src/Core/AssignEvaluator.h +++ b/Eigen/src/Core/AssignEvaluator.h @@ -126,6 +126,10 @@ public: EIGEN_DEBUG_VAR(PacketSize) EIGEN_DEBUG_VAR(StorageOrdersAgree) EIGEN_DEBUG_VAR(MightVectorize) + std::cerr.setf(std::ios::hex, std::ios::basefield); + EIGEN_DEBUG_VAR(DstFlags) + EIGEN_DEBUG_VAR(SrcFlags) + std::cerr.unsetf(std::ios::hex); EIGEN_DEBUG_VAR(MayLinearize) EIGEN_DEBUG_VAR(MayInnerVectorize) EIGEN_DEBUG_VAR(MayLinearVectorize) diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h index a5de3593c..5f2d742f8 100644 --- a/Eigen/src/Core/CoreEvaluators.h +++ b/Eigen/src/Core/CoreEvaluators.h @@ -779,10 +779,10 @@ struct evaluator<Block<ArgType, BlockRows, BlockCols, InnerPanel> > MaskAlignedBit = (InnerPanel && (OuterStrideAtCompileTime!=Dynamic) && (((OuterStrideAtCompileTime * int(sizeof(Scalar))) % 16) == 0)) ? AlignedBit : 0, FlagsLinearAccessBit = (RowsAtCompileTime == 1 || ColsAtCompileTime == 1) ? LinearAccessBit : 0, FlagsRowMajorBit = XprType::Flags&RowMajorBit, - Flags0 = traits<XprType>::Flags & ( (HereditaryBits & ~RowMajorBit) | - DirectAccessBit | - MaskPacketAccessBit | - MaskAlignedBit), + Flags0 = evaluator<ArgType>::Flags & ( (HereditaryBits & ~RowMajorBit) | + DirectAccessBit | + MaskPacketAccessBit | + MaskAlignedBit), Flags = Flags0 | FlagsLinearAccessBit | FlagsRowMajorBit }; typedef block_evaluator<ArgType, BlockRows, BlockCols, InnerPanel> block_evaluator_type; diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index f84db0dc2..cd4913525 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -117,6 +117,9 @@ struct traits<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> > Flags = compute_matrix_flags<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::ret, #ifndef EIGEN_TEST_EVALUATORS CoeffReadCost = NumTraits<Scalar>::ReadCost, +#else + // FIXME, the following flag in only used to define NeedsToAlign in PlainObjectBase + EvaluatorFlags = compute_matrix_evaluator_flags<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::ret, #endif Options = _Options, InnerStrideAtCompileTime = 1, diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index 4f456804c..c31bfbc8c 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -128,7 +128,11 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type DenseStorage<Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options> m_storage; public: +#ifndef EIGEN_TEST_EVALUATORS enum { NeedsToAlign = SizeAtCompileTime != Dynamic && (internal::traits<Derived>::Flags & AlignedBit) != 0 }; +#else + enum { NeedsToAlign = SizeAtCompileTime != Dynamic && (internal::traits<Derived>::EvaluatorFlags & AlignedBit) != 0 }; +#endif EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) EIGEN_DEVICE_FUNC diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 453180049..2785847a6 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -51,6 +51,14 @@ struct traits<Product<Lhs, Rhs, Option> > MaxRowsAtCompileTime = LhsCleaned::MaxRowsAtCompileTime, MaxColsAtCompileTime = RhsCleaned::MaxColsAtCompileTime, + // FIXME: only needed by GeneralMatrixMatrixTriangular + InnerSize = EIGEN_SIZE_MIN_PREFER_FIXED(LhsCleaned::ColsAtCompileTime, RhsCleaned::RowsAtCompileTime), + +#ifndef EIGEN_TEST_EVALUATORS + // dummy, for evaluators unit test only + CoeffReadCost = Dynamic, +#endif + // The storage order is somewhat arbitrary here. The correct one will be determined through the evaluator. Flags = (MaxRowsAtCompileTime==1 ? RowMajorBit : 0) }; |