aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2009-10-15 21:07:14 +0200
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2009-10-15 21:07:14 +0200
commitd177c1f3aca150d36d17c8116504e3ea1e7b30cf (patch)
treec4dc53de569bd71ccbadac806bf8dcd96577e3f1 /Eigen
parent15030439816910327478b98ba1a253e18cc6165f (diff)
Inlining fixes + fixed typo.
Removed ei_assert in presence of static assert.
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/CwiseNullaryOp.h1
-rw-r--r--Eigen/src/Core/Redux.h12
2 files changed, 11 insertions, 2 deletions
diff --git a/Eigen/src/Core/CwiseNullaryOp.h b/Eigen/src/Core/CwiseNullaryOp.h
index 61ce51885..7c1984be6 100644
--- a/Eigen/src/Core/CwiseNullaryOp.h
+++ b/Eigen/src/Core/CwiseNullaryOp.h
@@ -147,7 +147,6 @@ EIGEN_STRONG_INLINE const CwiseNullaryOp<CustomNullaryOp, Derived>
MatrixBase<Derived>::NullaryExpr(int size, const CustomNullaryOp& func)
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
- ei_assert(IsVectorAtCompileTime);
if(RowsAtCompileTime == 1) return CwiseNullaryOp<CustomNullaryOp, Derived>(1, size, func);
else return CwiseNullaryOp<CustomNullaryOp, Derived>(size, 1, func);
}
diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h
index f437208c0..0df095750 100644
--- a/Eigen/src/Core/Redux.h
+++ b/Eigen/src/Core/Redux.h
@@ -112,6 +112,16 @@ struct ei_redux_novec_unroller<Func, Derived, Start, 1>
}
};
+// This is actually dead code and will never be called. It is required
+// to prevent false warnings regarding failed inlining though
+// for 0 length run() will never be called at all.
+template<typename Func, typename Derived, int Start>
+struct ei_redux_novec_unroller<Func, Derived, Start, 0>
+{
+ typedef typename Derived::Scalar Scalar;
+ EIGEN_STRONG_INLINE static Scalar run(const Derived&, const Func&) { return Scalar(); }
+};
+
/*** vectorization ***/
template<typename Func, typename Derived, int Start, int Length>
@@ -297,7 +307,7 @@ struct ei_redux_impl<Func, Derived, LinearVectorization, CompleteUnrolling>
/** \returns the result of a full redux operation on the whole matrix or vector using \a func
*
* The template parameter \a BinaryOp is the type of the functor \a func which must be
- * an assiociative operator. Both current STL and TR1 functor styles are handled.
+ * an associative operator. Both current STL and TR1 functor styles are handled.
*
* \sa MatrixBase::sum(), MatrixBase::minCoeff(), MatrixBase::maxCoeff(), MatrixBase::colwise(), MatrixBase::rowwise()
*/