aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/products
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-02-19 11:32:04 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-02-19 11:32:04 +0100
commitb3a07eecc5ad19f418f15d70d1517f8b7e07dc1b (patch)
treea3673791f5a921617baed2c1d4dd4de4b6b35aa2 /Eigen/src/Core/products
parentc16b80746aaa0bb865d55b2d1cefac0f54f7cd3e (diff)
Fix CoeffReadCost of products to handle Dynamic costs
Diffstat (limited to 'Eigen/src/Core/products')
-rw-r--r--Eigen/src/Core/products/CoeffBasedProduct.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/products/CoeffBasedProduct.h b/Eigen/src/Core/products/CoeffBasedProduct.h
index de06108da..77f291ab9 100644
--- a/Eigen/src/Core/products/CoeffBasedProduct.h
+++ b/Eigen/src/Core/products/CoeffBasedProduct.h
@@ -90,7 +90,7 @@ struct traits<CoeffBasedProduct<LhsNested,RhsNested,NestingFlags> >
// TODO enable vectorization for mixed types
| (SameType && (CanVectorizeLhs || CanVectorizeRhs) ? PacketAccessBit : 0),
- CoeffReadCost = InnerSize == Dynamic ? Dynamic
+ 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,