aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Redux.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-05-12 17:34:46 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-05-12 17:34:46 +0000
commit678f18fce4dec90ffa97b2fb3a92d572fb64c059 (patch)
tree4f97c884205357bf63dd4692ca0060046a9385f7 /Eigen/src/Core/Redux.h
parentf0eb3d2d3b671c46d2c3b8c48037f6f8cd0100d3 (diff)
put inline keywords everywhere appropriate. So we don't need anymore to pass
-finline-limit=1000 to gcc to get good performance. By the way some cleanup.
Diffstat (limited to 'Eigen/src/Core/Redux.h')
-rw-r--r--Eigen/src/Core/Redux.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h
index cb8f4d525..5b14f5b27 100644
--- a/Eigen/src/Core/Redux.h
+++ b/Eigen/src/Core/Redux.h
@@ -203,7 +203,7 @@ MatrixBase<Derived>::redux(const BinaryOp& func) const
*/
template<typename Derived>
typename ei_traits<Derived>::Scalar
-MatrixBase<Derived>::sum() const
+inline MatrixBase<Derived>::sum() const
{
return this->redux(Eigen::ei_scalar_sum_op<Scalar>());
}
@@ -216,7 +216,7 @@ MatrixBase<Derived>::sum() const
*/
template<typename Derived>
typename ei_traits<Derived>::Scalar
-MatrixBase<Derived>::trace() const
+inline MatrixBase<Derived>::trace() const
{
return diagonal().sum();
}
@@ -225,7 +225,7 @@ MatrixBase<Derived>::trace() const
*/
template<typename Derived>
typename ei_traits<Derived>::Scalar
-MatrixBase<Derived>::minCoeff() const
+inline MatrixBase<Derived>::minCoeff() const
{
return this->redux(Eigen::ei_scalar_min_op<Scalar>());
}
@@ -234,7 +234,7 @@ MatrixBase<Derived>::minCoeff() const
*/
template<typename Derived>
typename ei_traits<Derived>::Scalar
-MatrixBase<Derived>::maxCoeff() const
+inline MatrixBase<Derived>::maxCoeff() const
{
return this->redux(Eigen::ei_scalar_max_op<Scalar>());
}
@@ -249,7 +249,7 @@ struct ei_all_unroller
row = (UnrollCount-1) % Derived::RowsAtCompileTime
};
- static bool run(const Derived &mat)
+ inline static bool run(const Derived &mat)
{
return ei_all_unroller<Derived, UnrollCount-1>::run(mat) && mat.coeff(row, col);
}
@@ -258,13 +258,13 @@ struct ei_all_unroller
template<typename Derived>
struct ei_all_unroller<Derived, 1>
{
- static bool run(const Derived &mat) { return mat.coeff(0, 0); }
+ inline static bool run(const Derived &mat) { return mat.coeff(0, 0); }
};
template<typename Derived>
struct ei_all_unroller<Derived, Dynamic>
{
- static bool run(const Derived &) { return false; }
+ inline static bool run(const Derived &) { return false; }
};
template<typename Derived, int UnrollCount>
@@ -275,7 +275,7 @@ struct ei_any_unroller
row = (UnrollCount-1) % Derived::RowsAtCompileTime
};
- static bool run(const Derived &mat)
+ inline static bool run(const Derived &mat)
{
return ei_any_unroller<Derived, UnrollCount-1>::run(mat) || mat.coeff(row, col);
}
@@ -284,13 +284,13 @@ struct ei_any_unroller
template<typename Derived>
struct ei_any_unroller<Derived, 1>
{
- static bool run(const Derived &mat) { return mat.coeff(0, 0); }
+ inline static bool run(const Derived &mat) { return mat.coeff(0, 0); }
};
template<typename Derived>
struct ei_any_unroller<Derived, Dynamic>
{
- static bool run(const Derived &) { return false; }
+ inline static bool run(const Derived &) { return false; }
};
/** \returns true if all coefficients are true