diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-06-07 13:18:29 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-06-07 13:18:29 +0000 |
commit | eb7b7b2cfc4170d5a4697f3be08c1af0559ce25f (patch) | |
tree | d6c3d72f17c1d76ad1c5e734f2952145027b7b6e /Eigen/src/Core/Visitor.h | |
parent | 69980379300b035daae6de26eb4bf394651d2de3 (diff) |
* remove Cross product expression: MatrixBase::cross() now returns a temporary
which is even better optimized by the compiler.
* Quaternion no longer inherits MatrixBase. Instead it stores the coefficients
using a Matrix<> and provides only relevant methods.
Diffstat (limited to 'Eigen/src/Core/Visitor.h')
-rw-r--r-- | Eigen/src/Core/Visitor.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Core/Visitor.h b/Eigen/src/Core/Visitor.h index bd469f747..18e90ca62 100644 --- a/Eigen/src/Core/Visitor.h +++ b/Eigen/src/Core/Visitor.h @@ -26,7 +26,7 @@ #define EIGEN_VISITOR_H template<typename Visitor, typename Derived, int UnrollCount> -struct ei_visitor_unroller +struct ei_visitor_impl { enum { col = (UnrollCount-1) / Derived::RowsAtCompileTime, @@ -35,13 +35,13 @@ struct ei_visitor_unroller inline static void run(const Derived &mat, Visitor& visitor) { - ei_visitor_unroller<Visitor, Derived, UnrollCount-1>::run(mat, visitor); + ei_visitor_impl<Visitor, Derived, UnrollCount-1>::run(mat, visitor); visitor(mat.coeff(row, col), row, col); } }; template<typename Visitor, typename Derived> -struct ei_visitor_unroller<Visitor, Derived, 1> +struct ei_visitor_impl<Visitor, Derived, 1> { inline static void run(const Derived &mat, Visitor& visitor) { @@ -50,7 +50,7 @@ struct ei_visitor_unroller<Visitor, Derived, 1> }; template<typename Visitor, typename Derived> -struct ei_visitor_unroller<Visitor, Derived, Dynamic> +struct ei_visitor_impl<Visitor, Derived, Dynamic> { inline static void run(const Derived& mat, Visitor& visitor) { @@ -85,7 +85,7 @@ void MatrixBase<Derived>::visit(Visitor& visitor) const const bool unroll = SizeAtCompileTime * CoeffReadCost + (SizeAtCompileTime-1) * ei_functor_traits<Visitor>::Cost <= EIGEN_UNROLLING_LIMIT; - return ei_visitor_unroller<Visitor, Derived, + return ei_visitor_impl<Visitor, Derived, unroll ? int(SizeAtCompileTime) : Dynamic >::run(derived(), visitor); } |