diff options
Diffstat (limited to 'Eigen/src')
-rw-r--r-- | Eigen/src/Array/VectorwiseOp.h | 20 | ||||
-rw-r--r-- | Eigen/src/Core/Block.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/DenseStorageBase.h | 6 | ||||
-rw-r--r-- | Eigen/src/Core/Dot.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/MatrixStorage.h | 4 | ||||
-rw-r--r-- | Eigen/src/Core/Redux.h | 4 |
6 files changed, 20 insertions, 18 deletions
diff --git a/Eigen/src/Array/VectorwiseOp.h b/Eigen/src/Array/VectorwiseOp.h index f495aae40..8926e7a04 100644 --- a/Eigen/src/Array/VectorwiseOp.h +++ b/Eigen/src/Array/VectorwiseOp.h @@ -92,7 +92,7 @@ class PartialReduxExpr : ei_no_assignment_operator, Index rows() const { return (Direction==Vertical ? 1 : m_matrix.rows()); } Index cols() const { return (Direction==Horizontal ? 1 : m_matrix.cols()); } - const Scalar coeff(Index i, Index j) const + EIGEN_STRONG_INLINE const Scalar coeff(Index i, Index j) const { if (Direction==Vertical) return m_functor(m_matrix.col(j)); @@ -113,15 +113,15 @@ class PartialReduxExpr : ei_no_assignment_operator, const MemberOp m_functor; }; -#define EIGEN_MEMBER_FUNCTOR(MEMBER,COST) \ - template <typename ResultType> \ - struct ei_member_##MEMBER { \ - EIGEN_EMPTY_STRUCT_CTOR(ei_member_##MEMBER) \ - typedef ResultType result_type; \ - template<typename Scalar, int Size> struct Cost \ - { enum { value = COST }; }; \ - template<typename XprType> \ - inline ResultType operator()(const XprType& mat) const \ +#define EIGEN_MEMBER_FUNCTOR(MEMBER,COST) \ + template <typename ResultType> \ + struct ei_member_##MEMBER { \ + EIGEN_EMPTY_STRUCT_CTOR(ei_member_##MEMBER) \ + typedef ResultType result_type; \ + template<typename Scalar, int Size> struct Cost \ + { enum { value = COST }; }; \ + template<typename XprType> \ + EIGEN_STRONG_INLINE ResultType operator()(const XprType& mat) const \ { return mat.MEMBER(); } \ } diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index bb1b8a6b9..59a0f72bc 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -162,7 +162,7 @@ template<typename XprType, int BlockRows, int BlockCols, bool HasDirectAccess> c .coeffRef(row + m_startRow.value(), col + m_startCol.value()); } - inline const CoeffReturnType coeff(Index row, Index col) const + EIGEN_STRONG_INLINE const CoeffReturnType coeff(Index row, Index col) const { return m_xpr.coeff(row + m_startRow.value(), col + m_startCol.value()); } diff --git a/Eigen/src/Core/DenseStorageBase.h b/Eigen/src/Core/DenseStorageBase.h index a9c4607b7..211984973 100644 --- a/Eigen/src/Core/DenseStorageBase.h +++ b/Eigen/src/Core/DenseStorageBase.h @@ -159,7 +159,7 @@ class DenseStorageBase : public ei_dense_xpr_base<Derived>::type * * \sa resize(Index) for vectors, resize(NoChange_t, Index), resize(Index, NoChange_t) */ - inline void resize(Index rows, Index cols) + EIGEN_STRONG_INLINE void resize(Index rows, Index cols) { #ifdef EIGEN_INITIALIZE_MATRICES_BY_ZERO Index size = rows*cols; @@ -471,7 +471,9 @@ class DenseStorageBase : public ei_dense_xpr_base<Derived>::type template<typename OtherDerived> EIGEN_STRONG_INLINE Derived& _set_noalias(const DenseBase<OtherDerived>& other) { - _resize_to_match(other); + // I don't think we need this resize call since the lazyAssign will anyways resize + // and lazyAssign will be called by the assign selector. + //_resize_to_match(other); // the 'false' below means to enforce lazy evaluation. We don't use lazyAssign() because // it wouldn't allow to copy a row-vector into a column-vector. return ei_assign_selector<Derived,OtherDerived,false>::run(this->derived(), other.derived()); diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index 6e54dac3c..dfa313e89 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -85,7 +85,7 @@ MatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const * \sa dot(), norm() */ template<typename Derived> -inline typename NumTraits<typename ei_traits<Derived>::Scalar>::Real MatrixBase<Derived>::squaredNorm() const +EIGEN_STRONG_INLINE typename NumTraits<typename ei_traits<Derived>::Scalar>::Real MatrixBase<Derived>::squaredNorm() const { return ei_real((*this).cwiseAbs2().sum()); } diff --git a/Eigen/src/Core/MatrixStorage.h b/Eigen/src/Core/MatrixStorage.h index aff83a64c..0165966f4 100644 --- a/Eigen/src/Core/MatrixStorage.h +++ b/Eigen/src/Core/MatrixStorage.h @@ -243,7 +243,7 @@ template<typename T, int _Rows, int _Options> class ei_matrix_storage<T, Dynamic m_data = ei_conditional_aligned_realloc_new<T,(_Options&DontAlign)==0>(m_data, size, _Rows*m_cols); m_cols = cols; } - void resize(DenseIndex size, DenseIndex, DenseIndex cols) + EIGEN_STRONG_INLINE void resize(DenseIndex size, DenseIndex, DenseIndex cols) { if(size != _Rows*m_cols) { @@ -279,7 +279,7 @@ template<typename T, int _Cols, int _Options> class ei_matrix_storage<T, Dynamic m_data = ei_conditional_aligned_realloc_new<T,(_Options&DontAlign)==0>(m_data, size, m_rows*_Cols); m_rows = rows; } - void resize(DenseIndex size, DenseIndex rows, DenseIndex) + EIGEN_STRONG_INLINE void resize(DenseIndex size, DenseIndex rows, DenseIndex) { if(size != m_rows*_Cols) { diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h index 3fd5de74c..4d40a2029 100644 --- a/Eigen/src/Core/Redux.h +++ b/Eigen/src/Core/Redux.h @@ -177,7 +177,7 @@ struct ei_redux_impl<Func, Derived, DefaultTraversal, NoUnrolling> { typedef typename Derived::Scalar Scalar; typedef typename Derived::Index Index; - static Scalar run(const Derived& mat, const Func& func) + static EIGEN_STRONG_INLINE Scalar run(const Derived& mat, const Func& func) { ei_assert(mat.rows()>0 && mat.cols()>0 && "you are using a non initialized matrix"); Scalar res; @@ -307,7 +307,7 @@ struct ei_redux_impl<Func, Derived, LinearVectorizedTraversal, CompleteUnrolling */ template<typename Derived> template<typename Func> -inline typename ei_result_of<Func(typename ei_traits<Derived>::Scalar)>::type +EIGEN_STRONG_INLINE typename ei_result_of<Func(typename ei_traits<Derived>::Scalar)>::type DenseBase<Derived>::redux(const Func& func) const { typedef typename ei_cleantype<typename Derived::Nested>::type ThisNested; |