From d1a29d6319d6919e0c3d1c624ad45d8202be1942 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 3 Apr 2008 11:10:17 +0000 Subject: -new: recursive costs system, useful to determine automatically when to evaluate arguments and when to meta-unroll. -use it in Product to determine when to eval args. not yet used to determine when to unroll. for now, not used anywhere else but that'll follow. -fix badness of my last commit --- Eigen/src/Core/Redux.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Eigen/src/Core/Redux.h') diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h index 34eefca7c..05d73afc2 100644 --- a/Eigen/src/Core/Redux.h +++ b/Eigen/src/Core/Redux.h @@ -26,7 +26,6 @@ #ifndef EIGEN_REDUX_H #define EIGEN_REDUX_H - template struct ei_redux_unroller { @@ -95,7 +94,8 @@ struct ei_traits > MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, Flags = (RowsAtCompileTime == Dynamic || ColsAtCompileTime == Dynamic) ? (unsigned int)MatrixType::Flags - : (unsigned int)MatrixType::Flags & ~LargeBit + : (unsigned int)MatrixType::Flags & ~LargeBit, + CoeffReadCost = 1 //FIXME -- unimplemented! }; }; @@ -198,7 +198,7 @@ template typename ei_traits::Scalar MatrixBase::sum() const { - return this->redux(Eigen::ei_scalar_sum_op()); + return this->redux(Eigen::ei_scalar_sum_op()); } /** \returns the trace of \c *this, i.e. the sum of the coefficients on the main diagonal. @@ -220,7 +220,7 @@ template typename ei_traits::Scalar MatrixBase::minCoeff() const { - return this->redux(Eigen::ei_scalar_min_op()); + return this->redux(Eigen::ei_scalar_min_op()); } /** \returns the maximum of all coefficients of *this @@ -229,7 +229,7 @@ template typename ei_traits::Scalar MatrixBase::maxCoeff() const { - return this->redux(Eigen::ei_scalar_max_op()); + return this->redux(Eigen::ei_scalar_max_op()); } #endif // EIGEN_REDUX_H -- cgit v1.2.3