Optimize reduxions for Homogeneous

This commit is contained in:
Gael Guennebaud
2014-08-01 17:00:20 +02:00
parent f25338f4d7
commit 4dd55a2958
3 changed files with 16 additions and 5 deletions

View File

@@ -138,6 +138,13 @@ template<typename MatrixType,int _Direction> class Homogeneous
}
#endif
template<typename Func>
EIGEN_STRONG_INLINE typename internal::result_of<Func(Scalar)>::type
redux(const Func& func) const
{
return func(m_matrix.redux(func), Scalar(1));
}
protected:
typename MatrixType::Nested m_matrix;
};