aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Product.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-12-31 00:25:31 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-12-31 00:25:31 +0000
commitd671205755c3d9ee472eb1351d550d78f6d83454 (patch)
tree5d3783b20f246bc4a9db50d0f581d41cade169d7 /Eigen/src/Core/Product.h
parent3958e7f751f48b2750f3e296cb737e04aec00821 (diff)
fix the nomalloc test: it didn't catch the ei_stack_alloc in
cachefriendlyproduct, that should be banned as well as depending on the platform they can give a malloc, and they could happen even with (large enough) fixed size matrices. Corresponding fix in Product.h: cachefriendly is now only used for dynamic matrices -- fixedsize, no matter how large, doesn't use the cachefriendly product. We don't need to care (in my opinion) about performance for large fixed size, as large fixed size is a bad idea in the first place and it is more important to be able to guarantee clearly that fixed size never causes a malloc.
Diffstat (limited to 'Eigen/src/Core/Product.h')
-rw-r--r--Eigen/src/Core/Product.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h
index 6587ad3e0..77c18817d 100644
--- a/Eigen/src/Core/Product.h
+++ b/Eigen/src/Core/Product.h
@@ -89,9 +89,9 @@ template<typename Lhs, typename Rhs> struct ei_product_mode
? DiagonalProduct
: (Rhs::Flags & Lhs::Flags & SparseBit)
? SparseProduct
- : Lhs::MaxColsAtCompileTime >= EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
- && ( Lhs::MaxRowsAtCompileTime >= EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
- || Rhs::MaxColsAtCompileTime >= EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD )
+ : Lhs::MaxColsAtCompileTime == Dynamic
+ && ( Lhs::MaxRowsAtCompileTime == Dynamic
+ || Rhs::MaxColsAtCompileTime == Dynamic )
&& (!(Rhs::IsVectorAtCompileTime && (Lhs::Flags&RowMajorBit) && (!(Lhs::Flags&DirectAccessBit))))
&& (!(Lhs::IsVectorAtCompileTime && (!(Rhs::Flags&RowMajorBit)) && (!(Rhs::Flags&DirectAccessBit))))
&& (ei_is_same_type<typename Lhs::Scalar, typename Rhs::Scalar>::ret)