aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/products
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-03-10 23:24:40 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-03-10 23:24:40 +0100
commitda6ec812820259b7474bff49c8fc0443c88900e5 (patch)
treebbe0b06e88926f0700626b342adc3303ebc868b0 /Eigen/src/Core/products
parent354bd8a42837ac405a142281fca2c4ac59ff701f (diff)
Move CoeffReadCost mechanism to evaluators
Diffstat (limited to 'Eigen/src/Core/products')
-rw-r--r--Eigen/src/Core/products/CoeffBasedProduct.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/products/CoeffBasedProduct.h b/Eigen/src/Core/products/CoeffBasedProduct.h
index 77f291ab9..94099b7d3 100644
--- a/Eigen/src/Core/products/CoeffBasedProduct.h
+++ b/Eigen/src/Core/products/CoeffBasedProduct.h
@@ -47,8 +47,6 @@ struct traits<CoeffBasedProduct<LhsNested,RhsNested,NestingFlags> >
typename traits<_RhsNested>::Index>::type Index;
enum {
- LhsCoeffReadCost = traits<_LhsNested>::CoeffReadCost,
- RhsCoeffReadCost = traits<_RhsNested>::CoeffReadCost,
LhsFlags = traits<_LhsNested>::Flags,
RhsFlags = traits<_RhsNested>::Flags,
@@ -89,11 +87,13 @@ struct traits<CoeffBasedProduct<LhsNested,RhsNested,NestingFlags> >
| (CanVectorizeRhs ? (RhsFlags & AlignedBit) : 0)
// TODO enable vectorization for mixed types
| (SameType && (CanVectorizeLhs || CanVectorizeRhs) ? PacketAccessBit : 0),
-
+#ifndef EIGEN_TEST_EVALUATORS
+ LhsCoeffReadCost = traits<_LhsNested>::CoeffReadCost,
+ RhsCoeffReadCost = traits<_RhsNested>::CoeffReadCost,
CoeffReadCost = (InnerSize == Dynamic || LhsCoeffReadCost==Dynamic || RhsCoeffReadCost==Dynamic || NumTraits<Scalar>::AddCost==Dynamic || NumTraits<Scalar>::MulCost==Dynamic) ? Dynamic
: InnerSize * (NumTraits<Scalar>::MulCost + LhsCoeffReadCost + RhsCoeffReadCost)
+ (InnerSize - 1) * NumTraits<Scalar>::AddCost,
-
+#endif
/* CanVectorizeInner deserves special explanation. It does not affect the product flags. It is not used outside
* of Product. If the Product itself is not a packet-access expression, there is still a chance that the inner
* loop of the product might be vectorized. This is the meaning of CanVectorizeInner. Since it doesn't affect