diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-04-03 11:10:17 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-04-03 11:10:17 +0000 |
commit | d1a29d6319d6919e0c3d1c624ad45d8202be1942 (patch) | |
tree | b9882a823c7d08819037d341f7e61971304eeadf /Eigen/src/Core/Redux.h | |
parent | e74fbfb2bc13dee268950361a957aea73bcefc21 (diff) |
-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
Diffstat (limited to 'Eigen/src/Core/Redux.h')
-rw-r--r-- | Eigen/src/Core/Redux.h | 10 |
1 files changed, 5 insertions, 5 deletions
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<typename BinaryOp, typename Derived, int Start, int Length> struct ei_redux_unroller { @@ -95,7 +94,8 @@ struct ei_traits<PartialRedux<Direction, BinaryOp, MatrixType> > 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 Derived> typename ei_traits<Derived>::Scalar MatrixBase<Derived>::sum() const { - return this->redux(Eigen::ei_scalar_sum_op()); + return this->redux(Eigen::ei_scalar_sum_op<Scalar>()); } /** \returns the trace of \c *this, i.e. the sum of the coefficients on the main diagonal. @@ -220,7 +220,7 @@ template<typename Derived> typename ei_traits<Derived>::Scalar MatrixBase<Derived>::minCoeff() const { - return this->redux(Eigen::ei_scalar_min_op()); + return this->redux(Eigen::ei_scalar_min_op<Scalar>()); } /** \returns the maximum of all coefficients of *this @@ -229,7 +229,7 @@ template<typename Derived> typename ei_traits<Derived>::Scalar MatrixBase<Derived>::maxCoeff() const { - return this->redux(Eigen::ei_scalar_max_op()); + return this->redux(Eigen::ei_scalar_max_op<Scalar>()); } #endif // EIGEN_REDUX_H |