From 5cc7251188110f2d24425eac3ce00d051d2b2c55 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 8 Oct 2015 15:22:04 +0200 Subject: Some cleaning in evaluators --- Eigen/src/Core/CoreEvaluators.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'Eigen/src/Core/CoreEvaluators.h') diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h index 2cbb6cd44..214114ebe 100644 --- a/Eigen/src/Core/CoreEvaluators.h +++ b/Eigen/src/Core/CoreEvaluators.h @@ -98,9 +98,6 @@ struct evaluator template struct evaluator_base : public noncopyable { - // FIXME is it really usefull? - typedef typename traits::StorageIndex StorageIndex; - // 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; @@ -636,13 +633,16 @@ struct evaluator > HasNoStride = HasNoInnerStride && HasNoOuterStride, IsDynamicSize = PlainObjectType::SizeAtCompileTime==Dynamic, - PacketAlignment = unpacket_traits::alignment, - - KeepsPacketAccess = bool(HasNoInnerStride) - && ( bool(IsDynamicSize) - || HasNoOuterStride - || ( OuterStrideAtCompileTime!=Dynamic - && ((static_cast(sizeof(Scalar))*OuterStrideAtCompileTime) % PacketAlignment)==0 ) ), + // FIXME I don't get the code below, in particular why outer-stride-at-compile-time should have any effect on PacketAccessBit... + // Let's remove the code below for 3.4 if no issue occur +// PacketAlignment = unpacket_traits::alignment, +// KeepsPacketAccess = bool(HasNoInnerStride) +// && ( bool(IsDynamicSize) +// || HasNoOuterStride +// || ( OuterStrideAtCompileTime!=Dynamic +// && ((static_cast(sizeof(Scalar))*OuterStrideAtCompileTime) % PacketAlignment)==0 ) ), + KeepsPacketAccess = bool(HasNoInnerStride), + Flags0 = evaluator::Flags, Flags1 = (bool(HasNoStride) || bool(PlainObjectType::IsVectorAtCompileTime)) ? int(Flags0) : int(Flags0 & ~LinearAccessBit), @@ -825,14 +825,14 @@ struct block_evaluator(block) { - // FIXME this should be an internal assertion + // TODO: for the 3.3 release, this should be turned to an internal assertion, but let's keep it as is for the beta lifetime eigen_assert(((size_t(block.data()) % EIGEN_PLAIN_ENUM_MAX(1,evaluator::Alignment)) == 0) && "data is not aligned"); } }; // -------------------- Select -------------------- -// TODO shall we introduce a ternary_evaluator? +// NOTE shall we introduce a ternary_evaluator? // TODO enable vectorization for Select template @@ -957,7 +957,7 @@ struct unary_evaluator > } protected: - const ArgTypeNested m_arg; // FIXME is it OK to store both the argument and its evaluator?? (we have the same situation in evaluator_product) + const ArgTypeNested m_arg; evaluator m_argImpl; const variable_if_dynamic m_rows; const variable_if_dynamic m_cols; -- cgit v1.2.3