aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Redux.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-10-28 13:39:02 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-10-28 13:39:02 +0100
commit85313048581d22901c7940a46bd41b19e88ff47c (patch)
tree76853fb284423331dd4254b742c148f6cc418d11 /Eigen/src/Core/Redux.h
parent1f11dd6cedc223f92f9ce99a22080dd267fcb488 (diff)
Simplify cost computations based on HugeCost being smaller that unrolling limit
Diffstat (limited to 'Eigen/src/Core/Redux.h')
-rw-r--r--Eigen/src/Core/Redux.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h
index fcf0ba76a..d170cae29 100644
--- a/Eigen/src/Core/Redux.h
+++ b/Eigen/src/Core/Redux.h
@@ -50,20 +50,14 @@ public:
public:
enum {
- Cost = ( Derived::SizeAtCompileTime == Dynamic
- || Derived::CoeffReadCost >= HugeCost
- || (Derived::SizeAtCompileTime!=1 && functor_traits<Func>::Cost >= HugeCost)
- ) ? HugeCost
- : Derived::SizeAtCompileTime * Derived::CoeffReadCost
- + (Derived::SizeAtCompileTime-1) * functor_traits<Func>::Cost,
+ Cost = Derived::SizeAtCompileTime == Dynamic ? HugeCost
+ : Derived::SizeAtCompileTime * Derived::CoeffReadCost + (Derived::SizeAtCompileTime-1) * functor_traits<Func>::Cost,
UnrollingLimit = EIGEN_UNROLLING_LIMIT * (int(Traversal) == int(DefaultTraversal) ? 1 : int(PacketSize))
};
public:
enum {
- Unrolling = Cost < HugeCost && Cost <= UnrollingLimit
- ? CompleteUnrolling
- : NoUnrolling
+ Unrolling = Cost <= UnrollingLimit ? CompleteUnrolling : NoUnrolling
};
#ifdef EIGEN_DEBUG_ASSIGN