diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-06-16 07:32:44 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-06-16 07:32:44 -0400 |
commit | 404aa963d980fcaea8daed899830378b9a6da506 (patch) | |
tree | 48b954f7802eb7be8e037af3419285f42d7f452b /Eigen/src/Core/Visitor.h | |
parent | 8438719111d0e58933b305c3b6a73857e3500fd6 (diff) |
fix #138: const bool is (rightly) not considered a compile-time constant by ICC, use enum.
Diffstat (limited to 'Eigen/src/Core/Visitor.h')
-rw-r--r-- | Eigen/src/Core/Visitor.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/Visitor.h b/Eigen/src/Core/Visitor.h index 9116b9512..d6efb0495 100644 --- a/Eigen/src/Core/Visitor.h +++ b/Eigen/src/Core/Visitor.h @@ -86,11 +86,11 @@ template<typename Derived> template<typename Visitor> void DenseBase<Derived>::visit(Visitor& visitor) const { - const bool unroll = SizeAtCompileTime != Dynamic + enum { unroll = SizeAtCompileTime != Dynamic && CoeffReadCost != Dynamic && (SizeAtCompileTime == 1 || ei_functor_traits<Visitor>::Cost != Dynamic) && SizeAtCompileTime * CoeffReadCost + (SizeAtCompileTime-1) * ei_functor_traits<Visitor>::Cost - <= EIGEN_UNROLLING_LIMIT; + <= EIGEN_UNROLLING_LIMIT }; return ei_visitor_impl<Visitor, Derived, unroll ? int(SizeAtCompileTime) : Dynamic >::run(derived(), visitor); |