aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Redux.h
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-02-04 14:26:03 +0100
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-02-04 14:26:03 +0100
commitd0b4ef81f01147532fca38c4cff2be354288a00d (patch)
tree3a93e264a5cfc2b14d5ae5fb71f9f12406c87741 /Eigen/src/Core/Redux.h
parent1a77334d5435f8edd6d7d756222207a8e3f268a6 (diff)
Prevent temporaries for reductions.
Diffstat (limited to 'Eigen/src/Core/Redux.h')
-rw-r--r--Eigen/src/Core/Redux.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h
index 09538a3bd..99fec2528 100644
--- a/Eigen/src/Core/Redux.h
+++ b/Eigen/src/Core/Redux.h
@@ -313,10 +313,9 @@ template<typename Func>
inline typename ei_result_of<Func(typename ei_traits<Derived>::Scalar)>::type
DenseBase<Derived>::redux(const Func& func) const
{
- typename Derived::Nested nested(derived());
typedef typename ei_cleantype<typename Derived::Nested>::type ThisNested;
return ei_redux_impl<Func, ThisNested>
- ::run(nested, func);
+ ::run(derived(), func);
}
/** \returns the minimum of all coefficients of *this