diff --git a/Eigen/src/Core/Array.h b/Eigen/src/Core/Array.h index ee82214e9..7be8971ba 100644 --- a/Eigen/src/Core/Array.h +++ b/Eigen/src/Core/Array.h @@ -130,7 +130,7 @@ class Array * * \sa resize(Index,Index) */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array() : Base() { EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED diff --git a/Eigen/src/Core/ArrayBase.h b/Eigen/src/Core/ArrayBase.h index 70be252fe..28397e5cf 100644 --- a/Eigen/src/Core/ArrayBase.h +++ b/Eigen/src/Core/ArrayBase.h @@ -148,7 +148,7 @@ template class ArrayBase * \sa MatrixBase::array() */ EIGEN_DEVICE_FUNC MatrixWrapper matrix() { return MatrixWrapper(derived()); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const MatrixWrapper matrix() const { return MatrixWrapper(derived()); } // template diff --git a/Eigen/src/Core/ArrayWrapper.h b/Eigen/src/Core/ArrayWrapper.h index 34d496384..e65b8fb17 100644 --- a/Eigen/src/Core/ArrayWrapper.h +++ b/Eigen/src/Core/ArrayWrapper.h @@ -59,7 +59,7 @@ class ArrayWrapper : public ArrayBase > using Base::coeffRef; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE ArrayWrapper(ExpressionType& matrix) : m_expression(matrix) {} EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR @@ -89,10 +89,10 @@ class ArrayWrapper : public ArrayBase > } template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC inline void evalTo(Dest& dst) const { dst = m_expression; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const internal::remove_all_t& nestedExpression() const { @@ -157,7 +157,7 @@ class MatrixWrapper : public MatrixBase > using Base::coeffRef; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC explicit inline MatrixWrapper(ExpressionType& matrix) : m_expression(matrix) {} EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR @@ -186,7 +186,7 @@ class MatrixWrapper : public MatrixBase > return m_expression.coeffRef(index); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const internal::remove_all_t& nestedExpression() const { diff --git a/Eigen/src/Core/Assign.h b/Eigen/src/Core/Assign.h index 7f988ec0d..dc716d3d8 100644 --- a/Eigen/src/Core/Assign.h +++ b/Eigen/src/Core/Assign.h @@ -63,7 +63,7 @@ EIGEN_STRONG_INLINE Derived& MatrixBase::operator=(const MatrixBase& ot template template EIGEN_DEVICE_FUNC -EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Derived& MatrixBase::operator=(const DenseBase& other) +EIGEN_STRONG_INLINE Derived& MatrixBase::operator=(const DenseBase& other) { internal::call_assignment(derived(), other.derived()); return derived(); @@ -71,7 +71,7 @@ EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Derived& MatrixBase::operator=(cons template template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& MatrixBase::operator=(const EigenBase& other) { internal::call_assignment(derived(), other.derived()); diff --git a/Eigen/src/Core/AssignEvaluator.h b/Eigen/src/Core/AssignEvaluator.h index fe548b577..8fb1f813b 100644 --- a/Eigen/src/Core/AssignEvaluator.h +++ b/Eigen/src/Core/AssignEvaluator.h @@ -208,7 +208,7 @@ struct copy_using_evaluator_DefaultTraversal_CompleteUnrolling inner = Index % DstXprType::InnerSizeAtCompileTime }; - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void run(Kernel &kernel) + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel) { kernel.assignCoeffByOuterInner(outer, inner); copy_using_evaluator_DefaultTraversal_CompleteUnrolling::run(kernel); @@ -224,7 +224,7 @@ struct copy_using_evaluator_DefaultTraversal_CompleteUnrolling struct copy_using_evaluator_DefaultTraversal_InnerUnrolling { - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void run(Kernel &kernel, Index outer) + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel, Index outer) { kernel.assignCoeffByOuterInner(outer, Index_); copy_using_evaluator_DefaultTraversal_InnerUnrolling::run(kernel, outer); @@ -234,7 +234,7 @@ struct copy_using_evaluator_DefaultTraversal_InnerUnrolling template struct copy_using_evaluator_DefaultTraversal_InnerUnrolling { - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void run(Kernel&, Index) { } + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel&, Index) { } }; /*********************** @@ -276,7 +276,7 @@ struct copy_using_evaluator_innervec_CompleteUnrolling DstAlignment = Kernel::AssignmentTraits::DstAlignment }; - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void run(Kernel &kernel) + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel) { kernel.template assignPacketByOuterInner(outer, inner); enum { NextIndex = Index + unpacket_traits::size }; @@ -341,7 +341,7 @@ struct dense_assignment_loop template struct dense_assignment_loop { - EIGEN_DEVICE_FUNC static void EIGEN_STRONG_INLINE EIGEN_CONSTEXPR run(Kernel &kernel) + EIGEN_DEVICE_FUNC static void EIGEN_STRONG_INLINE run(Kernel &kernel) { for(Index outer = 0; outer < kernel.outerSize(); ++outer) { for(Index inner = 0; inner < kernel.innerSize(); ++inner) { @@ -354,7 +354,7 @@ struct dense_assignment_loop template struct dense_assignment_loop { - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void run(Kernel &kernel) + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel) { typedef typename Kernel::DstEvaluatorType::XprType DstXprType; copy_using_evaluator_DefaultTraversal_CompleteUnrolling::run(kernel); @@ -364,7 +364,7 @@ struct dense_assignment_loop template struct dense_assignment_loop { - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void run(Kernel &kernel) + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel) { typedef typename Kernel::DstEvaluatorType::XprType DstXprType; @@ -484,7 +484,7 @@ struct dense_assignment_loop template struct dense_assignment_loop { - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void run(Kernel &kernel) + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel) { typedef typename Kernel::DstEvaluatorType::XprType DstXprType; copy_using_evaluator_innervec_CompleteUnrolling::run(kernel); @@ -494,7 +494,7 @@ struct dense_assignment_loop struct dense_assignment_loop { - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void run(Kernel &kernel) + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel) { typedef typename Kernel::DstEvaluatorType::XprType DstXprType; typedef typename Kernel::AssignmentTraits Traits; @@ -630,7 +630,7 @@ public: typedef typename AssignmentTraits::PacketType PacketType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE generic_dense_assignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType& dstExpr) : m_dst(dst), m_src(src), m_functor(func), m_dstExpr(dstExpr) { @@ -650,19 +650,19 @@ public: EIGEN_DEVICE_FUNC const SrcEvaluatorType& srcEvaluator() const EIGEN_NOEXCEPT { return m_src; } /// Assign src(row,col) to dst(row,col) through the assignment functor. - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void assignCoeff(Index row, Index col) + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(Index row, Index col) { m_functor.assignCoeff(m_dst.coeffRef(row,col), m_src.coeff(row,col)); } /// \sa assignCoeff(Index,Index) - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void assignCoeff(Index index) + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(Index index) { m_functor.assignCoeff(m_dst.coeffRef(index), m_src.coeff(index)); } /// \sa assignCoeff(Index,Index) - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void assignCoeffByOuterInner(Index outer, Index inner) + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeffByOuterInner(Index outer, Index inner) { Index row = rowIndexByOuterInner(outer, inner); Index col = colIndexByOuterInner(outer, inner); @@ -671,7 +671,7 @@ public: template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void assignPacket(Index row, Index col) + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignPacket(Index row, Index col) { m_functor.template assignPacket(&m_dst.coeffRef(row,col), m_src.template packet(row,col)); } @@ -683,14 +683,14 @@ public: } template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void assignPacketByOuterInner(Index outer, Index inner) + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignPacketByOuterInner(Index outer, Index inner) { Index row = rowIndexByOuterInner(outer, inner); Index col = colIndexByOuterInner(outer, inner); assignPacket(row, col); } - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rowIndexByOuterInner(Index outer, Index inner) + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Index rowIndexByOuterInner(Index outer, Index inner) { typedef typename DstEvaluatorType::ExpressionTraits Traits; return int(Traits::RowsAtCompileTime) == 1 ? 0 @@ -699,7 +699,7 @@ public: : inner; } - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index colIndexByOuterInner(Index outer, Index inner) + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Index colIndexByOuterInner(Index outer, Index inner) { typedef typename DstEvaluatorType::ExpressionTraits Traits; return int(Traits::ColsAtCompileTime) == 1 ? 0 @@ -747,7 +747,7 @@ protected: ***************************************************************************/ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize_if_allowed(DstXprType &dst, const SrcXprType& src, const Functor &/*func*/) { EIGEN_ONLY_USED_FOR_DEBUG(dst); @@ -756,7 +756,7 @@ void resize_if_allowed(DstXprType &dst, const SrcXprType& src, const Functor &/* } template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize_if_allowed(DstXprType &dst, const SrcXprType& src, const internal::assign_op &/*func*/) { Index dstRows = src.rows(); @@ -831,13 +831,13 @@ struct Assignment; // does not has to bother about these annoying details. template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(Dst& dst, const Src& src) { call_assignment(dst, src, internal::assign_op()); } template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(const Dst& dst, const Src& src) { call_assignment(dst, src, internal::assign_op()); @@ -853,7 +853,7 @@ void call_assignment(Dst& dst, const Src& src, const Func& func, std::enable_if_ } template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(Dst& dst, const Src& src, const Func& func, std::enable_if_t::value, void*> = 0) { call_assignment_no_alias(dst, src, func); @@ -937,7 +937,7 @@ void call_assignment_no_alias_no_transpose(Dst& dst, const Src& src) } // forward declaration -template EIGEN_CONSTEXPR void check_for_aliasing(const Dst &dst, const Src &src); +template void check_for_aliasing(const Dst &dst, const Src &src); // Generic Dense to Dense assignment // Note that the last template argument "Weak" is needed to make it possible to perform @@ -945,7 +945,7 @@ template EIGEN_CONSTEXPR void check_for_aliasing(con template< typename DstXprType, typename SrcXprType, typename Functor, typename Weak> struct Assignment { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const Functor &func) { #ifndef EIGEN_NO_DEBUG diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index 24b96c73f..19c4b6893 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -116,7 +116,7 @@ template class /** Column or Row constructor */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Block(XprType& xpr, Index i) : Impl(xpr,i) { eigen_assert( (i>=0) && ( @@ -126,7 +126,7 @@ template class /** Fixed-size constructor */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Block(XprType& xpr, Index startRow, Index startCol) : Impl(xpr, startRow, startCol) { @@ -137,7 +137,7 @@ template class /** Dynamic-size constructor */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Block(XprType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols) @@ -161,9 +161,9 @@ class BlockImpl public: typedef Impl Base; EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl) - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR BlockImpl(XprType& xpr, Index i) : Impl(xpr,i) {} - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR BlockImpl(XprType& xpr, Index startRow, Index startCol) : Impl(xpr, startRow, startCol) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE BlockImpl(XprType& xpr, Index i) : Impl(xpr,i) {} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE BlockImpl(XprType& xpr, Index startRow, Index startCol) : Impl(xpr, startRow, startCol) {} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE BlockImpl(XprType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols) : Impl(xpr, startRow, startCol, blockRows, blockCols) {} }; @@ -186,7 +186,7 @@ template& nestedExpression() const { return m_xpr; @@ -344,7 +344,7 @@ class BlockImpl_dense /** Column or Row constructor */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE BlockImpl_dense(XprType& xpr, Index i) : Base(xpr.data() + i * ( ((BlockRows==1) && (BlockCols==XprType::ColsAtCompileTime) && (!XprTypeIsRowMajor)) || ((BlockRows==XprType::RowsAtCompileTime) && (BlockCols==1) && ( XprTypeIsRowMajor)) ? xpr.innerStride() : xpr.outerStride()), @@ -352,37 +352,31 @@ class BlockImpl_dense BlockCols==1 ? 1 : xpr.cols()), m_xpr(xpr), m_startRow( (BlockRows==1) && (BlockCols==XprType::ColsAtCompileTime) ? i : 0), - m_startCol( (BlockRows==XprType::RowsAtCompileTime) && (BlockCols==1) ? i : 0), - m_outerStride(internal::traits::HasSameStorageOrderAsXprType - ? m_xpr.outerStride() - : m_xpr.innerStride()) + m_startCol( (BlockRows==XprType::RowsAtCompileTime) && (BlockCols==1) ? i : 0) { + init(); } /** Fixed-size constructor */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE BlockImpl_dense(XprType& xpr, Index startRow, Index startCol) : Base(xpr.data()+xpr.innerStride()*(XprTypeIsRowMajor?startCol:startRow) + xpr.outerStride()*(XprTypeIsRowMajor?startRow:startCol)), - m_xpr(xpr), m_startRow(startRow), m_startCol(startCol), - m_outerStride(internal::traits::HasSameStorageOrderAsXprType - ? m_xpr.outerStride() - : m_xpr.innerStride()) + m_xpr(xpr), m_startRow(startRow), m_startCol(startCol) { + init(); } /** Dynamic-size constructor */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE BlockImpl_dense(XprType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols) : Base(xpr.data()+xpr.innerStride()*(XprTypeIsRowMajor?startCol:startRow) + xpr.outerStride()*(XprTypeIsRowMajor?startRow:startCol), blockRows, blockCols), - m_xpr(xpr), m_startRow(startRow), m_startCol(startCol), - m_outerStride(internal::traits::HasSameStorageOrderAsXprType - ? m_xpr.outerStride() - : m_xpr.innerStride()) + m_xpr(xpr), m_startRow(startRow), m_startCol(startCol) { + init(); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE @@ -428,15 +422,21 @@ class BlockImpl_dense /** \internal used by allowAligned() */ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE BlockImpl_dense(XprType& xpr, const Scalar* data, Index blockRows, Index blockCols) - : Base(data, blockRows, blockCols), m_xpr(xpr), - m_outerStride(internal::traits::HasSameStorageOrderAsXprType - ? m_xpr.outerStride() - : m_xpr.innerStride()) + : Base(data, blockRows, blockCols), m_xpr(xpr) { + init(); } #endif protected: + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + void init() + { + m_outerStride = internal::traits::HasSameStorageOrderAsXprType + ? m_xpr.outerStride() + : m_xpr.innerStride(); + } + XprTypeNested m_xpr; const internal::variable_if_dynamic m_startRow; const internal::variable_if_dynamic m_startCol; diff --git a/Eigen/src/Core/BooleanRedux.h b/Eigen/src/Core/BooleanRedux.h index 80d96baa0..20e5bd9ba 100644 --- a/Eigen/src/Core/BooleanRedux.h +++ b/Eigen/src/Core/BooleanRedux.h @@ -25,7 +25,7 @@ struct all_unroller j = (UnrollCount-1) % InnerSize }; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static inline bool run(const Derived &mat) + EIGEN_DEVICE_FUNC static inline bool run(const Derived &mat) { return all_unroller::run(mat) && mat.coeff(IsRowMajor ? i : j, IsRowMajor ? j : i); } @@ -34,13 +34,13 @@ struct all_unroller template struct all_unroller { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static inline bool run(const Derived &/*mat*/) { return true; } + EIGEN_DEVICE_FUNC static inline bool run(const Derived &/*mat*/) { return true; } }; template struct all_unroller { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static inline bool run(const Derived &) { return false; } + EIGEN_DEVICE_FUNC static inline bool run(const Derived &) { return false; } }; template @@ -52,7 +52,7 @@ struct any_unroller j = (UnrollCount-1) % InnerSize }; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static inline bool run(const Derived &mat) + EIGEN_DEVICE_FUNC static inline bool run(const Derived &mat) { return any_unroller::run(mat) || mat.coeff(IsRowMajor ? i : j, IsRowMajor ? j : i); } @@ -61,13 +61,13 @@ struct any_unroller template struct any_unroller { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static inline bool run(const Derived & /*mat*/) { return false; } + EIGEN_DEVICE_FUNC static inline bool run(const Derived & /*mat*/) { return false; } }; template struct any_unroller { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static inline bool run(const Derived &) { return false; } + EIGEN_DEVICE_FUNC static inline bool run(const Derived &) { return false; } }; } // end namespace internal @@ -80,7 +80,7 @@ struct any_unroller * \sa any(), Cwise::operator<() */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline bool DenseBase::all() const +EIGEN_DEVICE_FUNC inline bool DenseBase::all() const { typedef internal::evaluator Evaluator; enum { @@ -104,7 +104,7 @@ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline bool DenseBase::all() const * \sa all() */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline bool DenseBase::any() const +EIGEN_DEVICE_FUNC inline bool DenseBase::any() const { typedef internal::evaluator Evaluator; enum { @@ -128,7 +128,7 @@ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline bool DenseBase::any() const * \sa all(), any() */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Eigen::Index DenseBase::count() const +EIGEN_DEVICE_FUNC inline Eigen::Index DenseBase::count() const { return derived().template cast().template cast().sum(); } diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h index 4022d7b1b..1729507cc 100644 --- a/Eigen/src/Core/CoreEvaluators.h +++ b/Eigen/src/Core/CoreEvaluators.h @@ -92,7 +92,7 @@ template struct evaluator : public unary_evaluator { typedef unary_evaluator Base; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const T& xpr) : Base(xpr) {} }; @@ -102,7 +102,7 @@ template struct evaluator : evaluator { - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const T& xpr) : evaluator(xpr) {} }; @@ -120,10 +120,8 @@ struct evaluator_base // noncopyable: // Don't make this class inherit noncopyable as this kills EBO (Empty Base Optimization) // and make complex evaluator much larger than then should do. - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR evaluator_base() = default; -#if defined(EIGEN_GPUCC) - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ~evaluator_base() = default; -#endif + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator_base() {} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ~evaluator_base() {} private: EIGEN_DEVICE_FUNC evaluator_base(const evaluator_base&); EIGEN_DEVICE_FUNC const evaluator_base& operator=(const evaluator_base&); @@ -139,7 +137,7 @@ private: // this helper permits to completely eliminate m_outerStride if it is known at compiletime. template class plainobjectbase_evaluator_data { public: - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE plainobjectbase_evaluator_data(const Scalar* ptr, Index outerStride) : data(ptr) { #ifndef EIGEN_INTERNAL_DEBUGGING @@ -154,10 +152,9 @@ public: template class plainobjectbase_evaluator_data { public: - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR - plainobjectbase_evaluator_data(const Scalar* ptr, Index outerStride) - : data(ptr), m_outerStride(outerStride) {} - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + plainobjectbase_evaluator_data(const Scalar* ptr, Index outerStride) : data(ptr), m_outerStride(outerStride) {} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index outerStride() const { return m_outerStride; } const Scalar *data; protected: @@ -189,21 +186,21 @@ struct evaluator > : RowsAtCompileTime }; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator() : m_d(0,OuterStrideAtCompileTime) { EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const PlainObjectType& m) - : m_d(m.data(), IsVectorAtCompileTime ? 0 : m.outerStride()) + : m_d(m.data(),IsVectorAtCompileTime ? 0 : m.outerStride()) { EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const { if (IsRowMajor) @@ -212,13 +209,13 @@ struct evaluator > return m_d.data[row + col * m_d.outerStride()]; } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { return m_d.data[index]; } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index row, Index col) { if (IsRowMajor) @@ -227,7 +224,7 @@ struct evaluator > return const_cast(m_d.data)[row + col * m_d.outerStride()]; } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index index) { return const_cast(m_d.data)[index]; @@ -280,10 +277,10 @@ struct evaluator > { typedef Matrix XprType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator() {} - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const XprType& m) : evaluator >(m) { } @@ -295,10 +292,10 @@ struct evaluator > { typedef Array XprType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator() {} - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const XprType& m) : evaluator >(m) { } @@ -318,31 +315,31 @@ struct unary_evaluator, IndexBased> Alignment = evaluator::Alignment }; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit unary_evaluator(const XprType& t) : m_argImpl(t.nestedExpression()) {} typedef typename XprType::Scalar Scalar; typedef typename XprType::CoeffReturnType CoeffReturnType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const { return m_argImpl.coeff(col, row); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { return m_argImpl.coeff(index); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index row, Index col) { return m_argImpl.coeffRef(col, row); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename XprType::Scalar& coeffRef(Index index) { return m_argImpl.coeffRef(index); @@ -402,7 +399,7 @@ struct nullary_wrapper template struct nullary_wrapper { - template EIGEN_CONSTEXPR + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, IndexType=0, IndexType=0) const { return op(); } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, IndexType=0, IndexType=0) const { return op.template packetOp(); } }; @@ -411,7 +408,7 @@ template struct nullary_wrapper { template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Scalar operator()(const NullaryOp& op, IndexType i, IndexType j=0) const { return op(i,j); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, IndexType i, IndexType j=0) const { return op(i,j); } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, IndexType i, IndexType j=0) const { return op.template packetOp(i,j); } }; @@ -516,7 +513,7 @@ struct evaluator > Alignment = AlignedMax }; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR explicit evaluator(const XprType& n) + EIGEN_DEVICE_FUNC explicit evaluator(const XprType& n) : m_functor(n.functor()), m_wrapper() { EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); @@ -525,14 +522,14 @@ struct evaluator > typedef typename XprType::CoeffReturnType CoeffReturnType; template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(IndexType row, IndexType col) const { return m_wrapper(m_functor, row, col); } template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(IndexType index) const { return m_wrapper(m_functor,index); @@ -573,7 +570,7 @@ struct unary_evaluator, IndexBased > Alignment = evaluator::Alignment }; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit unary_evaluator(const XprType& op) : m_d(op) { EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits::Cost); @@ -582,13 +579,13 @@ struct unary_evaluator, IndexBased > typedef typename XprType::CoeffReturnType CoeffReturnType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const { return m_d.func()(m_d.argImpl.coeff(row, col)); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { return m_d.func()(m_d.argImpl.coeff(index)); @@ -613,9 +610,9 @@ protected: // this helper permits to completely eliminate the functor if it is empty struct Data { - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Data(const XprType& xpr) : op(xpr.functor()), argImpl(xpr.nestedExpression()) {} - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const UnaryOp& func() const { return op; } UnaryOp op; evaluator argImpl; @@ -730,7 +727,7 @@ struct evaluator > typedef CwiseBinaryOp XprType; typedef binary_evaluator > Base; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const XprType& xpr) : Base(xpr) {} }; @@ -759,7 +756,7 @@ struct binary_evaluator, IndexBased, IndexBase Alignment = plain_enum_min(evaluator::Alignment, evaluator::Alignment) }; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit binary_evaluator(const XprType& xpr) : m_d(xpr) { EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits::Cost); @@ -768,13 +765,13 @@ struct binary_evaluator, IndexBased, IndexBase typedef typename XprType::CoeffReturnType CoeffReturnType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const { return m_d.func()(m_d.lhsImpl.coeff(row, col), m_d.rhsImpl.coeff(row, col)); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { return m_d.func()(m_d.lhsImpl.coeff(index), m_d.rhsImpl.coeff(index)); @@ -801,9 +798,9 @@ protected: // this helper permits to completely eliminate the functor if it is empty struct Data { - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Data(const XprType& xpr) : op(xpr.functor()), lhsImpl(xpr.lhs()), rhsImpl(xpr.rhs()) {} - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const BinaryOp& func() const { return op; } BinaryOp op; evaluator lhsImpl; @@ -856,7 +853,7 @@ struct unary_evaluator, IndexBased> return m_d.func()(m_d.argImpl.coeffRef(row, col)); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index index) { return m_d.func()(m_d.argImpl.coeffRef(index)); @@ -867,9 +864,9 @@ protected: // this helper permits to completely eliminate the functor if it is empty struct Data { - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Data(const XprType& xpr) : op(xpr.functor()), argImpl(xpr.nestedExpression()) {} - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const UnaryOp& func() const { return op; } UnaryOp op; evaluator argImpl; @@ -899,7 +896,7 @@ struct mapbase_evaluator : evaluator_base CoeffReadCost = NumTraits::ReadCost }; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit mapbase_evaluator(const XprType& map) : m_data(const_cast(map.data())), m_innerStride(map.innerStride()), @@ -911,32 +908,32 @@ struct mapbase_evaluator : evaluator_base EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const { return m_data[col * colStride() + row * rowStride()]; } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { return m_data[index * m_innerStride.value()]; } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index row, Index col) { return m_data[col * colStride() + row * rowStride()]; } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index index) { return m_data[index * m_innerStride.value()]; } template - EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const { PointerType ptr = m_data + row * rowStride() + col * colStride(); @@ -1007,7 +1004,7 @@ struct evaluator > Alignment = int(MapOptions)&int(AlignedMask) }; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR explicit evaluator(const XprType& map) + EIGEN_DEVICE_FUNC explicit evaluator(const XprType& map) : mapbase_evaluator(map) { } }; @@ -1025,7 +1022,7 @@ struct evaluator > Alignment = evaluator >::Alignment }; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const XprType& ref) : mapbase_evaluator(ref) { } @@ -1081,7 +1078,7 @@ struct evaluator > Alignment = plain_enum_min(evaluator::Alignment, Alignment0) }; typedef block_evaluator block_evaluator_type; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const XprType& block) : block_evaluator_type(block) { EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); @@ -1095,7 +1092,7 @@ struct block_evaluator XprType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit block_evaluator(const XprType& block) : unary_evaluator(block) {} @@ -1107,7 +1104,7 @@ struct unary_evaluator, IndexBa { typedef Block XprType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit unary_evaluator(const XprType& block) : m_argImpl(block.nestedExpression()), m_startRow(block.startRow()), @@ -1123,13 +1120,13 @@ struct unary_evaluator, IndexBa ForwardLinearAccess = (InnerPanel || int(XprType::IsRowMajor)==int(ArgType::IsRowMajor)) && bool(evaluator::Flags&LinearAccessBit) }; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const { return m_argImpl.coeff(m_startRow.value() + row, m_startCol.value() + col); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { return linear_coeff_impl(index, bool_constant()); @@ -1185,12 +1182,12 @@ struct unary_evaluator, IndexBa } protected: - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType linear_coeff_impl(Index index, internal::true_type /* ForwardLinearAccess */) const { return m_argImpl.coeff(m_linear_offset.value() + index); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType linear_coeff_impl(Index index, internal::false_type /* not ForwardLinearAccess */) const { return coeff(RowsAtCompileTime == 1 ? 0 : index, RowsAtCompileTime == 1 ? index : 0); @@ -1224,7 +1221,7 @@ struct block_evaluator XprType; typedef typename XprType::Scalar Scalar; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit block_evaluator(const XprType& block) : mapbase_evaluator(block) { @@ -1392,25 +1389,25 @@ struct evaluator_wrapper_base Alignment = evaluator::Alignment }; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator_wrapper_base(const ArgType& arg) : m_argImpl(arg) {} typedef typename ArgType::Scalar Scalar; typedef typename ArgType::CoeffReturnType CoeffReturnType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const { return m_argImpl.coeff(row, col); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { return m_argImpl.coeff(index); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index row, Index col) { return m_argImpl.coeffRef(row, col); @@ -1460,7 +1457,7 @@ struct unary_evaluator > { typedef MatrixWrapper XprType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit unary_evaluator(const XprType& wrapper) : evaluator_wrapper_base >(wrapper.nestedExpression()) { } @@ -1472,7 +1469,7 @@ struct unary_evaluator > { typedef ArrayWrapper XprType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit unary_evaluator(const XprType& wrapper) : evaluator_wrapper_base >(wrapper.nestedExpression()) { } @@ -1623,7 +1620,7 @@ struct evaluator > Alignment = 0 }; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const XprType& diagonal) : m_argImpl(diagonal.nestedExpression()), m_index(diagonal.index()) @@ -1632,13 +1629,13 @@ struct evaluator > typedef typename XprType::Scalar Scalar; typedef typename XprType::CoeffReturnType CoeffReturnType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index) const { return m_argImpl.coeff(row + rowOffset(), row + colOffset()); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { return m_argImpl.coeff(index + rowOffset(), index + colOffset()); diff --git a/Eigen/src/Core/CwiseBinaryOp.h b/Eigen/src/Core/CwiseBinaryOp.h index 07105609e..21a061a00 100644 --- a/Eigen/src/Core/CwiseBinaryOp.h +++ b/Eigen/src/Core/CwiseBinaryOp.h @@ -111,7 +111,7 @@ class CwiseBinaryOp : CwiseBinaryOp(const CwiseBinaryOp&) = default; #endif - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CwiseBinaryOp(const Lhs& aLhs, const Rhs& aRhs, const BinaryOp& func = BinaryOp()) : m_lhs(aLhs), m_rhs(aRhs), m_functor(func) { @@ -130,13 +130,13 @@ class CwiseBinaryOp : } /** \returns the left hand side nested expression */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const LhsNested_& lhs() const { return m_lhs; } /** \returns the right hand side nested expression */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const RhsNested_& rhs() const { return m_rhs; } /** \returns the functor representing the binary operation */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const BinaryOp& functor() const { return m_functor; } protected: @@ -173,7 +173,7 @@ MatrixBase::operator-=(const MatrixBase &other) */ template template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Derived & +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & MatrixBase::operator+=(const MatrixBase& other) { call_assignment(derived(), other.derived(), internal::add_assign_op()); diff --git a/Eigen/src/Core/CwiseNullaryOp.h b/Eigen/src/Core/CwiseNullaryOp.h index c50972699..a62f54d4c 100644 --- a/Eigen/src/Core/CwiseNullaryOp.h +++ b/Eigen/src/Core/CwiseNullaryOp.h @@ -66,7 +66,7 @@ class CwiseNullaryOp : public internal::dense_xpr_base< CwiseNullaryOp::type Base; EIGEN_DENSE_PUBLIC_INTERFACE(CwiseNullaryOp) - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC CwiseNullaryOp(Index rows, Index cols, const NullaryOp& func = NullaryOp()) : m_rows(rows), m_cols(cols), m_functor(func) { @@ -82,7 +82,7 @@ class CwiseNullaryOp : public internal::dense_xpr_base< CwiseNullaryOp template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE #ifndef EIGEN_PARSED_BY_DOXYGEN const CwiseNullaryOp::PlainObject> #else @@ -138,7 +138,7 @@ DenseBase::NullaryExpr(Index rows, Index cols, const CustomNullaryOp& f */ template template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE #ifndef EIGEN_PARSED_BY_DOXYGEN const CwiseNullaryOp::PlainObject> #else @@ -162,7 +162,7 @@ DenseBase::NullaryExpr(Index size, const CustomNullaryOp& func) */ template template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE #ifndef EIGEN_PARSED_BY_DOXYGEN const CwiseNullaryOp::PlainObject> #else @@ -187,7 +187,7 @@ DenseBase::NullaryExpr(const CustomNullaryOp& func) * \sa class CwiseNullaryOp */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename DenseBase::ConstantReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::ConstantReturnType DenseBase::Constant(Index rows, Index cols, const Scalar& value) { return DenseBase::NullaryExpr(rows, cols, internal::scalar_constant_op(value)); @@ -209,7 +209,7 @@ DenseBase::Constant(Index rows, Index cols, const Scalar& value) * \sa class CwiseNullaryOp */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename DenseBase::ConstantReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::ConstantReturnType DenseBase::Constant(Index size, const Scalar& value) { return DenseBase::NullaryExpr(size, internal::scalar_constant_op(value)); @@ -225,7 +225,7 @@ DenseBase::Constant(Index size, const Scalar& value) * \sa class CwiseNullaryOp */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename DenseBase::ConstantReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::ConstantReturnType DenseBase::Constant(const Scalar& value) { EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived) @@ -334,7 +334,7 @@ EIGEN_DEVICE_FUNC bool DenseBase::isConstant * \sa setConstant(), Constant(), class CwiseNullaryOp */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void DenseBase::fill(const Scalar& val) +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void DenseBase::fill(const Scalar& val) { setConstant(val); } @@ -344,7 +344,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void DenseBase::f * \sa fill(), setConstant(Index,const Scalar&), setConstant(Index,Index,const Scalar&), setZero(), setOnes(), Constant(), class CwiseNullaryOp, setZero(), setOnes() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Derived& DenseBase::setConstant(const Scalar& val) +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase::setConstant(const Scalar& val) { return derived() = Constant(rows(), cols(), val); } @@ -472,7 +472,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase::setLinSpaced( * \sa Zero(), Zero(Index) */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename DenseBase::ConstantReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::ConstantReturnType DenseBase::Zero(Index rows, Index cols) { return Constant(rows, cols, Scalar(0)); @@ -495,7 +495,7 @@ DenseBase::Zero(Index rows, Index cols) * \sa Zero(), Zero(Index,Index) */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename DenseBase::ConstantReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::ConstantReturnType DenseBase::Zero(Index size) { return Constant(size, Scalar(0)); @@ -512,7 +512,7 @@ DenseBase::Zero(Index size) * \sa Zero(Index), Zero(Index,Index) */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename DenseBase::ConstantReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::ConstantReturnType DenseBase::Zero() { return Constant(Scalar(0)); @@ -628,7 +628,7 @@ PlainObjectBase::setZero(Index rows, NoChange_t) * \sa Ones(), Ones(Index), isOnes(), class Ones */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename DenseBase::ConstantReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::ConstantReturnType DenseBase::Ones(Index rows, Index cols) { return Constant(rows, cols, Scalar(1)); @@ -651,7 +651,7 @@ DenseBase::Ones(Index rows, Index cols) * \sa Ones(), Ones(Index,Index), isOnes(), class Ones */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename DenseBase::ConstantReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::ConstantReturnType DenseBase::Ones(Index newSize) { return Constant(newSize, Scalar(1)); @@ -668,7 +668,7 @@ DenseBase::Ones(Index newSize) * \sa Ones(Index), Ones(Index,Index), isOnes(), class Ones */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename DenseBase::ConstantReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::ConstantReturnType DenseBase::Ones() { return Constant(Scalar(1)); @@ -780,7 +780,7 @@ PlainObjectBase::setOnes(NoChange_t, Index cols) * \sa Identity(), setIdentity(), isIdentity() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase::IdentityReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase::IdentityReturnType MatrixBase::Identity(Index rows, Index cols) { return DenseBase::NullaryExpr(rows, cols, internal::scalar_identity_op()); @@ -797,7 +797,7 @@ MatrixBase::Identity(Index rows, Index cols) * \sa Identity(Index,Index), setIdentity(), isIdentity() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase::IdentityReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase::IdentityReturnType MatrixBase::Identity() { EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived) @@ -901,7 +901,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& MatrixBase::setIdentity( * \sa MatrixBase::Unit(Index), MatrixBase::UnitX(), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase::BasisReturnType MatrixBase::Unit(Index newSize, Index i) +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase::BasisReturnType MatrixBase::Unit(Index newSize, Index i) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) return BasisReturnType(SquareMatrixType::Identity(newSize,newSize), i); @@ -916,7 +916,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase< * \sa MatrixBase::Unit(Index,Index), MatrixBase::UnitX(), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase::BasisReturnType MatrixBase::Unit(Index i) +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase::BasisReturnType MatrixBase::Unit(Index i) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) return BasisReturnType(SquareMatrixType::Identity(),i); @@ -929,7 +929,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase< * \sa MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase::BasisReturnType MatrixBase::UnitX() +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase::BasisReturnType MatrixBase::UnitX() { return Derived::Unit(0); } /** \returns an expression of the Y axis unit vector (0,1{,0}^*) @@ -939,7 +939,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase< * \sa MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase::BasisReturnType MatrixBase::UnitY() +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase::BasisReturnType MatrixBase::UnitY() { return Derived::Unit(1); } /** \returns an expression of the Z axis unit vector (0,0,1{,0}^*) @@ -949,7 +949,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase< * \sa MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase::BasisReturnType MatrixBase::UnitZ() +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase::BasisReturnType MatrixBase::UnitZ() { return Derived::Unit(2); } /** \returns an expression of the W axis unit vector (0,0,0,1) @@ -959,7 +959,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase< * \sa MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const typename MatrixBase::BasisReturnType MatrixBase::UnitW() +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase::BasisReturnType MatrixBase::UnitW() { return Derived::Unit(3); } /** \brief Set the coefficients of \c *this to the i-th unit (basis) vector diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index 0900ab19c..ff7d0b948 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -63,7 +63,7 @@ class CwiseUnaryOp : public CwiseUnaryOpImpl::type XprTypeNested; typedef internal::remove_all_t NestedExpression; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit CwiseUnaryOp(const XprType& xpr, const UnaryOp& func = UnaryOp()) : m_xpr(xpr), m_functor(func) {} @@ -73,16 +73,16 @@ class CwiseUnaryOp : public CwiseUnaryOpImpl& nestedExpression() const { return m_xpr; } /** \returns the nested expression */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::remove_all_t& nestedExpression() { return m_xpr; } diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index a5b590ae0..6e177793f 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -311,19 +311,19 @@ template class DenseBase CommaInitializer operator<< (const DenseBase& other); typedef Transpose TransposeReturnType; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC TransposeReturnType transpose(); typedef Transpose ConstTransposeReturnType; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const ConstTransposeReturnType transpose() const; EIGEN_DEVICE_FUNC void transposeInPlace(); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const ConstantReturnType + EIGEN_DEVICE_FUNC static const ConstantReturnType Constant(Index rows, Index cols, const Scalar& value); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const ConstantReturnType + EIGEN_DEVICE_FUNC static const ConstantReturnType Constant(Index size, const Scalar& value); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const ConstantReturnType + EIGEN_DEVICE_FUNC static const ConstantReturnType Constant(const Scalar& value); EIGEN_DEPRECATED EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType @@ -336,25 +336,25 @@ template class DenseBase EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType LinSpaced(const Scalar& low, const Scalar& high); - template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + template EIGEN_DEVICE_FUNC static const CwiseNullaryOp NullaryExpr(Index rows, Index cols, const CustomNullaryOp& func); - template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + template EIGEN_DEVICE_FUNC static const CwiseNullaryOp NullaryExpr(Index size, const CustomNullaryOp& func); - template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + template EIGEN_DEVICE_FUNC static const CwiseNullaryOp NullaryExpr(const CustomNullaryOp& func); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const ConstantReturnType Zero(Index rows, Index cols); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const ConstantReturnType Zero(Index size); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const ConstantReturnType Zero(); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const ConstantReturnType Ones(Index rows, Index cols); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const ConstantReturnType Ones(Index size); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const ConstantReturnType Ones(); + EIGEN_DEVICE_FUNC static const ConstantReturnType Zero(Index rows, Index cols); + EIGEN_DEVICE_FUNC static const ConstantReturnType Zero(Index size); + EIGEN_DEVICE_FUNC static const ConstantReturnType Zero(); + EIGEN_DEVICE_FUNC static const ConstantReturnType Ones(Index rows, Index cols); + EIGEN_DEVICE_FUNC static const ConstantReturnType Ones(Index size); + EIGEN_DEVICE_FUNC static const ConstantReturnType Ones(); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void fill(const Scalar& value); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Derived& setConstant(const Scalar& value); + EIGEN_DEVICE_FUNC void fill(const Scalar& value); + EIGEN_DEVICE_FUNC Derived& setConstant(const Scalar& value); EIGEN_DEVICE_FUNC Derived& setLinSpaced(Index size, const Scalar& low, const Scalar& high); EIGEN_DEVICE_FUNC Derived& setLinSpaced(const Scalar& low, const Scalar& high); EIGEN_DEVICE_FUNC Derived& setZero(); @@ -392,7 +392,7 @@ template class DenseBase * * \warning Be careful with eval() and the auto C++ keyword, as detailed in this \link TopicPitfalls_auto_keyword page \endlink. */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvalReturnType eval() const { // Even though MSVC does not honor strong inlining when the return type @@ -417,7 +417,7 @@ template class DenseBase * */ template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(PlainObjectBase& other) { eigen_assert(rows()==other.rows() && cols()==other.cols()); @@ -432,26 +432,26 @@ template class DenseBase template EIGEN_DEVICE_FUNC inline std::conditional_t,Derived&> forceAlignedAccessIf(); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Scalar sum() const; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Scalar mean() const; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Scalar trace() const; + EIGEN_DEVICE_FUNC Scalar sum() const; + EIGEN_DEVICE_FUNC Scalar mean() const; + EIGEN_DEVICE_FUNC Scalar trace() const; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Scalar prod() const; + EIGEN_DEVICE_FUNC Scalar prod() const; template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR typename internal::traits::Scalar minCoeff() const; + EIGEN_DEVICE_FUNC typename internal::traits::Scalar minCoeff() const; template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR typename internal::traits::Scalar maxCoeff() const; + EIGEN_DEVICE_FUNC typename internal::traits::Scalar maxCoeff() const; // By default, the fastest version with undefined NaN propagation semantics is // used. // TODO(rmlarsen): Replace with default template argument when we move to // c++11 or beyond. - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline typename internal::traits::Scalar minCoeff() const { + EIGEN_DEVICE_FUNC inline typename internal::traits::Scalar minCoeff() const { return minCoeff(); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline typename internal::traits::Scalar maxCoeff() const { + EIGEN_DEVICE_FUNC inline typename internal::traits::Scalar maxCoeff() const { return maxCoeff(); } @@ -491,7 +491,7 @@ template class DenseBase } template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC Scalar redux(const BinaryOp& func) const; template @@ -519,9 +519,9 @@ template class DenseBase return derived().coeff(0,0); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool all() const; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool any() const; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index count() const; + EIGEN_DEVICE_FUNC bool all() const; + EIGEN_DEVICE_FUNC bool any() const; + EIGEN_DEVICE_FUNC Index count() const; typedef VectorwiseOp RowwiseReturnType; typedef const VectorwiseOp ConstRowwiseReturnType; @@ -536,10 +536,10 @@ template class DenseBase * \sa colwise(), class VectorwiseOp, \ref TutorialReductionsVisitorsBroadcasting */ //Code moved here due to a CUDA compiler bug - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline ConstRowwiseReturnType rowwise() const { + EIGEN_DEVICE_FUNC inline ConstRowwiseReturnType rowwise() const { return ConstRowwiseReturnType(derived()); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR RowwiseReturnType rowwise(); + EIGEN_DEVICE_FUNC RowwiseReturnType rowwise(); /** \returns a VectorwiseOp wrapper of *this broadcasting and partial reductions * @@ -548,10 +548,10 @@ template class DenseBase * * \sa rowwise(), class VectorwiseOp, \ref TutorialReductionsVisitorsBroadcasting */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline ConstColwiseReturnType colwise() const { + EIGEN_DEVICE_FUNC inline ConstColwiseReturnType colwise() const { return ConstColwiseReturnType(derived()); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR ColwiseReturnType colwise(); + EIGEN_DEVICE_FUNC ColwiseReturnType colwise(); typedef CwiseNullaryOp,PlainObject> RandomReturnType; static const RandomReturnType Random(Index rows, Index cols); @@ -661,7 +661,7 @@ template class DenseBase protected: EIGEN_DEFAULT_COPY_CONSTRUCTOR(DenseBase) /** Default constructor. Do nothing. */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR DenseBase() + EIGEN_DEVICE_FUNC DenseBase() { /* Just checks for self-consistency of the flags. * Only do it when debugging Eigen, as this borders on paranoia and could slow compilation down diff --git a/Eigen/src/Core/DenseCoeffsBase.h b/Eigen/src/Core/DenseCoeffsBase.h index 9608bbb52..7f0bcf471 100644 --- a/Eigen/src/Core/DenseCoeffsBase.h +++ b/Eigen/src/Core/DenseCoeffsBase.h @@ -95,7 +95,7 @@ class DenseCoeffsBase : public EigenBase * * \sa operator()(Index,Index) const, coeffRef(Index,Index), coeff(Index) const */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const { eigen_internal_assert(row >= 0 && row < rows() @@ -114,7 +114,7 @@ class DenseCoeffsBase : public EigenBase * * \sa operator()(Index,Index), operator[](Index) */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator()(Index row, Index col) const { eigen_assert(row >= 0 && row < rows() @@ -137,7 +137,7 @@ class DenseCoeffsBase : public EigenBase * \sa operator[](Index) const, coeffRef(Index), coeff(Index,Index) const */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { @@ -156,7 +156,7 @@ class DenseCoeffsBase : public EigenBase * z() const, w() const */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator[](Index index) const { @@ -176,7 +176,7 @@ class DenseCoeffsBase : public EigenBase * z() const, w() const */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator()(Index index) const { @@ -186,13 +186,13 @@ class DenseCoeffsBase : public EigenBase /** equivalent to operator[](0). */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType x() const { return (*this)[0]; } /** equivalent to operator[](1). */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType y() const { @@ -202,7 +202,7 @@ class DenseCoeffsBase : public EigenBase /** equivalent to operator[](2). */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType z() const { @@ -212,7 +212,7 @@ class DenseCoeffsBase : public EigenBase /** equivalent to operator[](3). */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType w() const { @@ -348,7 +348,7 @@ class DenseCoeffsBase : public DenseCoeffsBase(derived()).coeffRef(row,col); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRefByOuterInner(Index outer, Index inner) { @@ -361,7 +361,7 @@ class DenseCoeffsBase : public DenseCoeffsBase : public DenseCoeffsBase : public DenseCoeffsBase : public DenseCoeffsBase : public DenseCoeffsBase : public DenseCoeffsBase : public DenseCoeffsBase -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC void check_static_allocation_size() { // if EIGEN_STACK_ALLOCATION_LIMIT is defined to 0, then no limit @@ -87,7 +87,7 @@ struct plain_array { EIGEN_ALIGN_TO_BOUNDARY(8) T array[Size]; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC plain_array() { EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(7); @@ -106,7 +106,7 @@ struct plain_array { EIGEN_ALIGN_TO_BOUNDARY(16) T array[Size]; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC plain_array() { EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(15); @@ -125,7 +125,7 @@ struct plain_array { EIGEN_ALIGN_TO_BOUNDARY(32) T array[Size]; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC plain_array() { EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(31); @@ -144,7 +144,7 @@ struct plain_array { EIGEN_ALIGN_TO_BOUNDARY(64) T array[Size]; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC plain_array() { EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(63); @@ -162,7 +162,7 @@ template struct plain_array { T array[1]; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR plain_array() = default; + EIGEN_DEVICE_FUNC plain_array() {} EIGEN_DEVICE_FUNC plain_array(constructor_without_unaligned_array_assert) {} }; @@ -211,7 +211,7 @@ template class DenseSt { internal::plain_array m_data; public: - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR DenseStorage() { + EIGEN_DEVICE_FUNC DenseStorage() { EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = Size) } EIGEN_DEVICE_FUNC @@ -241,27 +241,27 @@ template class DenseSt EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return Rows_;} EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) EIGEN_NOEXCEPT {return Cols_;} EIGEN_DEVICE_FUNC void conservativeResize(Index,Index,Index) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void resize(Index,Index,Index) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR const T *data() const { return m_data.array; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR T *data() { return m_data.array; } + EIGEN_DEVICE_FUNC void resize(Index,Index,Index) {} + EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; } + EIGEN_DEVICE_FUNC T *data() { return m_data.array; } }; // null matrix template class DenseStorage { public: - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR DenseStorage() {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR explicit DenseStorage(internal::constructor_without_unaligned_array_assert) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR DenseStorage(const DenseStorage&) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR DenseStorage& operator=(const DenseStorage&) { return *this; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR DenseStorage(Index,Index,Index) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void swap(DenseStorage& ) {} + EIGEN_DEVICE_FUNC DenseStorage() {} + EIGEN_DEVICE_FUNC explicit DenseStorage(internal::constructor_without_unaligned_array_assert) {} + EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage&) {} + EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage&) { return *this; } + EIGEN_DEVICE_FUNC DenseStorage(Index,Index,Index) {} + EIGEN_DEVICE_FUNC void swap(DenseStorage& ) {} EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return Rows_;} EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) EIGEN_NOEXCEPT {return Cols_;} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void conservativeResize(Index,Index,Index) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void resize(Index,Index,Index) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR const T *data() const { return 0; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR T *data() { return 0; } + EIGEN_DEVICE_FUNC void conservativeResize(Index,Index,Index) {} + EIGEN_DEVICE_FUNC void resize(Index,Index,Index) {} + EIGEN_DEVICE_FUNC const T *data() const { return 0; } + EIGEN_DEVICE_FUNC T *data() { return 0; } }; // more specializations for null matrices; these are necessary to resolve ambiguities @@ -320,10 +320,10 @@ template class DenseStorage m_data; Index m_rows; public: - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR DenseStorage() : m_rows(0) {} + EIGEN_DEVICE_FUNC DenseStorage() : m_rows(0) {} EIGEN_DEVICE_FUNC explicit DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(internal::constructor_without_unaligned_array_assert()), m_rows(0) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR DenseStorage(const DenseStorage& other) + EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other) : m_data(internal::constructor_without_unaligned_array_assert()), m_rows(other.m_rows) { internal::plain_array_helper::copy(other.m_data, m_rows * Cols_, m_data); @@ -344,12 +344,12 @@ template class DenseStorage class Diagonal typedef typename internal::dense_xpr_base::type Base; EIGEN_DENSE_PUBLIC_INTERFACE(Diagonal) - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC explicit inline Diagonal(MatrixType& matrix, Index a_index = DiagIndex) : m_matrix(matrix), m_index(a_index) { eigen_assert( a_index <= m_matrix.cols() && -a_index <= m_matrix.rows() ); @@ -79,7 +79,7 @@ template class Diagonal EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Diagonal) - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC inline Index rows() const { return m_index.value()<0 ? numext::mini(m_matrix.cols(),m_matrix.rows()+m_index.value()) @@ -146,14 +146,14 @@ template class Diagonal return m_matrix.coeff(idx+rowOffset(), idx+colOffset()); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC inline const internal::remove_all_t& nestedExpression() const { return m_matrix; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC inline Index index() const { return m_index.value(); @@ -185,7 +185,7 @@ template class Diagonal * * \sa class Diagonal */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline typename MatrixBase::DiagonalReturnType +EIGEN_DEVICE_FUNC inline typename MatrixBase::DiagonalReturnType MatrixBase::diagonal() { return DiagonalReturnType(derived()); @@ -193,7 +193,7 @@ MatrixBase::diagonal() /** This is the const version of diagonal(). */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline +EIGEN_DEVICE_FUNC inline const typename MatrixBase::ConstDiagonalReturnType MatrixBase::diagonal() const { diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index c48db0b42..0c1319259 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -28,7 +28,7 @@ struct dot_nocheck typedef scalar_conj_product_op::Scalar,typename traits::Scalar> conj_prod; typedef typename conj_prod::result_type ResScalar; EIGEN_DEVICE_FUNC - EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_STRONG_INLINE static ResScalar run(const MatrixBase& a, const MatrixBase& b) { return a.template binaryExpr(b).sum(); @@ -41,7 +41,7 @@ struct dot_nocheck typedef scalar_conj_product_op::Scalar,typename traits::Scalar> conj_prod; typedef typename conj_prod::result_type ResScalar; EIGEN_DEVICE_FUNC - EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_STRONG_INLINE static ResScalar run(const MatrixBase& a, const MatrixBase& b) { return a.transpose().template binaryExpr(b).sum(); @@ -64,7 +64,7 @@ struct dot_nocheck template template EIGEN_DEVICE_FUNC -EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_STRONG_INLINE typename ScalarBinaryOpTraits::Scalar,typename internal::traits::Scalar>::ReturnType MatrixBase::dot(const MatrixBase& other) const { @@ -90,7 +90,7 @@ MatrixBase::dot(const MatrixBase& other) const * \sa dot(), norm(), lpNorm() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR typename NumTraits::Scalar>::Real MatrixBase::squaredNorm() const +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename NumTraits::Scalar>::Real MatrixBase::squaredNorm() const { return numext::real((*this).cwiseAbs2().sum()); } diff --git a/Eigen/src/Core/EigenBase.h b/Eigen/src/Core/EigenBase.h index 01a25bc81..105488dca 100644 --- a/Eigen/src/Core/EigenBase.h +++ b/Eigen/src/Core/EigenBase.h @@ -44,14 +44,14 @@ template struct EigenBase typedef typename internal::traits::StorageKind StorageKind; /** \returns a reference to the derived object */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC Derived& derived() { return *static_cast(this); } /** \returns a const reference to the derived object */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const Derived& derived() const { return *static_cast(this); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - Derived& const_cast_derived() const + EIGEN_DEVICE_FUNC + inline Derived& const_cast_derived() const { return *static_cast(const_cast(this)); } EIGEN_DEVICE_FUNC inline const Derived& const_derived() const diff --git a/Eigen/src/Core/GeneralProduct.h b/Eigen/src/Core/GeneralProduct.h index 37e91178b..661a3c4dd 100644 --- a/Eigen/src/Core/GeneralProduct.h +++ b/Eigen/src/Core/GeneralProduct.h @@ -396,7 +396,7 @@ template<> struct gemv_dense_selector */ template template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Product MatrixBase::operator*(const MatrixBase &other) const { @@ -439,7 +439,7 @@ MatrixBase::operator*(const MatrixBase &other) const */ template template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Product MatrixBase::lazyProduct(const MatrixBase &other) const { diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h index cbb64d907..b67c4eda6 100644 --- a/Eigen/src/Core/GenericPacketMath.h +++ b/Eigen/src/Core/GenericPacketMath.h @@ -214,10 +214,10 @@ EIGEN_DEVICE_FUNC inline Target preinterpret(const Packet& a); /* { return reinterpret_cast(a); } */ /** \internal \returns a + b (coeff-wise) */ -template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet +template EIGEN_DEVICE_FUNC inline Packet padd(const Packet& a, const Packet& b) { return a+b; } // Avoid compiler warning for boolean algebra. -template<> EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool +template<> EIGEN_DEVICE_FUNC inline bool padd(const bool& a, const bool& b) { return a || b; } /** \internal \returns a packet version of \a *from, (un-aligned masked add) @@ -230,14 +230,14 @@ padd(const Packet& a, const Packet& b, typename unpacket_traits::mask_t /** \internal \returns a - b (coeff-wise) */ -template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet +template EIGEN_DEVICE_FUNC inline Packet psub(const Packet& a, const Packet& b) { return a-b; } /** \internal \returns -a (coeff-wise) */ -template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet +template EIGEN_DEVICE_FUNC inline Packet pnegate(const Packet& a) { return -a; } -template<> EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool +template<> EIGEN_DEVICE_FUNC inline bool pnegate(const bool& a) { return !a; } /** \internal \returns conj(a) (coeff-wise) */ @@ -245,14 +245,14 @@ template EIGEN_DEVICE_FUNC inline Packet pconj(const Packet& a) { return numext::conj(a); } /** \internal \returns a * b (coeff-wise) */ -template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet +template EIGEN_DEVICE_FUNC inline Packet pmul(const Packet& a, const Packet& b) { return a*b; } // Avoid compiler warning for boolean algebra. -template<> EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool +template<> EIGEN_DEVICE_FUNC inline bool pmul(const bool& a, const bool& b) { return a && b; } /** \internal \returns a / b (coeff-wise) */ -template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet +template EIGEN_DEVICE_FUNC inline Packet pdiv(const Packet& a, const Packet& b) { return a/b; } // In the generic case, memset to all one bits. @@ -475,7 +475,7 @@ template<> EIGEN_DEVICE_FUNC inline bool pselect( template struct pminmax_impl { template - static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet run(const Packet& a, const Packet& b, Op op) { + static EIGEN_DEVICE_FUNC inline Packet run(const Packet& a, const Packet& b, Op op) { return op(a,b); } }; @@ -520,25 +520,25 @@ struct pminmax_impl { /** \internal \returns the min of \a a and \a b (coeff-wise). If \a a or \b b is NaN, the return value is implementation defined. */ -template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet +template EIGEN_DEVICE_FUNC inline Packet pmin(const Packet& a, const Packet& b) { return numext::mini(a,b); } /** \internal \returns the min of \a a and \a b (coeff-wise). NaNPropagation determines the NaN propagation semantics. */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet pmin(const Packet& a, const Packet& b) { +EIGEN_DEVICE_FUNC inline Packet pmin(const Packet& a, const Packet& b) { return pminmax_impl::run(a, b, EIGEN_BINARY_OP_NAN_PROPAGATION(Packet, (pmin))); } /** \internal \returns the max of \a a and \a b (coeff-wise) If \a a or \b b is NaN, the return value is implementation defined. */ -template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet +template EIGEN_DEVICE_FUNC inline Packet pmax(const Packet& a, const Packet& b) { return numext::maxi(a, b); } /** \internal \returns the max of \a a and \a b (coeff-wise). NaNPropagation determines the NaN propagation semantics. */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet pmax(const Packet& a, const Packet& b) { +EIGEN_DEVICE_FUNC inline Packet pmax(const Packet& a, const Packet& b) { return pminmax_impl::run(a, b, EIGEN_BINARY_OP_NAN_PROPAGATION(Packet,(pmax))); } @@ -1047,28 +1047,28 @@ template EIGEN_DEVICE_FUNC inline bool predux_any(const Packet& // FMA instructions. /** \internal \returns a * b + c (coeff-wise) */ template -EIGEN_DEVICE_FUNC Packet pmadd(const Packet& a, const Packet& b, +EIGEN_DEVICE_FUNC inline Packet pmadd(const Packet& a, const Packet& b, const Packet& c) { return padd(pmul(a, b), c); } /** \internal \returns a * b - c (coeff-wise) */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet pmsub(const Packet& a, const Packet& b, +EIGEN_DEVICE_FUNC inline Packet pmsub(const Packet& a, const Packet& b, const Packet& c) { return psub(pmul(a, b), c); } /** \internal \returns -(a * b) + c (coeff-wise) */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet pnmadd(const Packet& a, const Packet& b, +EIGEN_DEVICE_FUNC inline Packet pnmadd(const Packet& a, const Packet& b, const Packet& c) { return padd(pnegate(pmul(a, b)), c); } /** \internal \returns -(a * b) - c (coeff-wise) */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Packet pnmsub(const Packet& a, const Packet& b, +EIGEN_DEVICE_FUNC inline Packet pnmsub(const Packet& a, const Packet& b, const Packet& c) { return psub(pnegate(pmul(a, b)), c); } diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h index fb4e81748..56d1ff86f 100644 --- a/Eigen/src/Core/Map.h +++ b/Eigen/src/Core/Map.h @@ -103,8 +103,8 @@ template class Ma typedef typename Base::PointerType PointerType; typedef PointerType PointerArgType; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - PointerType cast_to_pointer_type(PointerArgType ptr) { return ptr; } + EIGEN_DEVICE_FUNC + inline PointerType cast_to_pointer_type(PointerArgType ptr) { return ptr; } EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Index innerStride() const @@ -127,8 +127,8 @@ template class Ma * \param dataPtr pointer to the array to map * \param stride optional Stride object, passing the strides. */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - explicit Map(PointerArgType dataPtr, const StrideType& stride = StrideType()) + EIGEN_DEVICE_FUNC + explicit inline Map(PointerArgType dataPtr, const StrideType& stride = StrideType()) : Base(cast_to_pointer_type(dataPtr)), m_stride(stride) { } @@ -152,8 +152,8 @@ template class Ma * \param cols the number of columns of the matrix expression * \param stride optional Stride object, passing the strides. */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - Map(PointerArgType dataPtr, Index rows, Index cols, const StrideType& stride = StrideType()) + EIGEN_DEVICE_FUNC + inline Map(PointerArgType dataPtr, Index rows, Index cols, const StrideType& stride = StrideType()) : Base(cast_to_pointer_type(dataPtr), rows, cols), m_stride(stride) { } diff --git a/Eigen/src/Core/MapBase.h b/Eigen/src/Core/MapBase.h index 5d7fee14d..bf8c16397 100644 --- a/Eigen/src/Core/MapBase.h +++ b/Eigen/src/Core/MapBase.h @@ -101,33 +101,33 @@ template class MapBase * * \sa innerStride(), outerStride() */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR const Scalar* data() const { return m_data; } + EIGEN_DEVICE_FUNC inline const Scalar* data() const { return m_data; } /** \copydoc PlainObjectBase::coeff(Index,Index) const */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - const Scalar& coeff(Index rowId, Index colId) const + EIGEN_DEVICE_FUNC + inline const Scalar& coeff(Index rowId, Index colId) const { return m_data[colId * colStride() + rowId * rowStride()]; } /** \copydoc PlainObjectBase::coeff(Index) const */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - const Scalar& coeff(Index index) const + EIGEN_DEVICE_FUNC + inline const Scalar& coeff(Index index) const { EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS(Derived) return m_data[index * innerStride()]; } /** \copydoc PlainObjectBase::coeffRef(Index,Index) const */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - const Scalar& coeffRef(Index rowId, Index colId) const + EIGEN_DEVICE_FUNC + inline const Scalar& coeffRef(Index rowId, Index colId) const { return this->m_data[colId * colStride() + rowId * rowStride()]; } /** \copydoc PlainObjectBase::coeffRef(Index) const */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - const Scalar& coeffRef(Index index) const + EIGEN_DEVICE_FUNC + inline const Scalar& coeffRef(Index index) const { EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS(Derived) return this->m_data[index * innerStride()]; @@ -150,8 +150,8 @@ template class MapBase } /** \internal Constructor for fixed size matrices or vectors */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - explicit MapBase(PointerType dataPtr) : m_data(dataPtr), m_rows(RowsAtCompileTime), m_cols(ColsAtCompileTime) + EIGEN_DEVICE_FUNC + explicit inline MapBase(PointerType dataPtr) : m_data(dataPtr), m_rows(RowsAtCompileTime), m_cols(ColsAtCompileTime) { EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived) checkSanity(); @@ -171,8 +171,8 @@ template class MapBase } /** \internal Constructor for dynamically sized matrices */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - MapBase(PointerType dataPtr, Index rows, Index cols) + EIGEN_DEVICE_FUNC + inline MapBase(PointerType dataPtr, Index rows, Index cols) : m_data(dataPtr), m_rows(rows), m_cols(cols) { eigen_assert( (dataPtr == 0) @@ -203,7 +203,7 @@ template class MapBase } template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC void checkSanity(std::enable_if_t::Alignment==0,void*> = 0) const {} @@ -253,8 +253,8 @@ template class MapBase const Scalar > ScalarWithConstIfNotLvalue; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - const Scalar* data() const { return this->m_data; } + EIGEN_DEVICE_FUNC + inline const Scalar* data() const { return this->m_data; } EIGEN_DEVICE_FUNC inline ScalarWithConstIfNotLvalue* data() { return this->m_data; } // no const-cast here so non-const-correct code will give a compile error @@ -286,9 +286,9 @@ template class MapBase (this->m_data + index * innerStride(), val); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR explicit MapBase(PointerType dataPtr) : Base(dataPtr) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR MapBase(PointerType dataPtr, Index vecSize) : Base(dataPtr, vecSize) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR MapBase(PointerType dataPtr, Index rows, Index cols) : Base(dataPtr, rows, cols) {} + EIGEN_DEVICE_FUNC explicit inline MapBase(PointerType dataPtr) : Base(dataPtr) {} + EIGEN_DEVICE_FUNC inline MapBase(PointerType dataPtr, Index vecSize) : Base(dataPtr, vecSize) {} + EIGEN_DEVICE_FUNC inline MapBase(PointerType dataPtr, Index rows, Index cols) : Base(dataPtr, rows, cols) {} EIGEN_DEVICE_FUNC Derived& operator=(const MapBase& other) diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 1c5fab071..af8b0296d 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -71,8 +71,8 @@ template::IsComplex> struct real_default_impl { typedef typename NumTraits::Real RealScalar; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - static RealScalar run(const Scalar& x) + EIGEN_DEVICE_FUNC + static inline RealScalar run(const Scalar& x) { return x; } @@ -82,8 +82,8 @@ template struct real_default_impl { typedef typename NumTraits::Real RealScalar; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - static RealScalar run(const Scalar& x) + EIGEN_DEVICE_FUNC + static inline RealScalar run(const Scalar& x) { using std::real; return real(x); @@ -293,7 +293,7 @@ struct sign_retval template::IsComplex> struct conj_default_impl { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static inline Scalar run(const Scalar& x) { return x; @@ -303,7 +303,7 @@ struct conj_default_impl template struct conj_default_impl { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static inline Scalar run(const Scalar& x) { using std::conj; @@ -328,7 +328,7 @@ template struct abs2_impl_default { typedef typename NumTraits::Real RealScalar; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static inline RealScalar run(const Scalar& x) { return x*x; @@ -339,7 +339,7 @@ template struct abs2_impl_default // IsComplex { typedef typename NumTraits::Real RealScalar; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static inline RealScalar run(const Scalar& x) { return x.real()*x.real() + x.imag()*x.imag(); @@ -350,8 +350,8 @@ template struct abs2_impl { typedef typename NumTraits::Real RealScalar; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - static RealScalar run(const Scalar& x) + EIGEN_DEVICE_FUNC + static inline RealScalar run(const Scalar& x) { return abs2_impl_default::IsComplex>::run(x); } @@ -433,8 +433,8 @@ template struct norm1_default_impl { typedef typename NumTraits::Real RealScalar; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - static RealScalar run(const Scalar& x) + EIGEN_DEVICE_FUNC + static inline RealScalar run(const Scalar& x) { EIGEN_USING_STD(abs); return abs(x.real()) + abs(x.imag()); @@ -480,8 +480,8 @@ struct hypot_retval template struct cast_impl { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - static NewType run(const OldType& x) + EIGEN_DEVICE_FUNC + static inline NewType run(const OldType& x) { return static_cast(x); } @@ -495,8 +495,8 @@ struct cast_impl::IsComplex && NumTraits::IsComplex >> { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - static NewType run(const OldType& x) + EIGEN_DEVICE_FUNC + static inline NewType run(const OldType& x) { typedef typename NumTraits::Real NewReal; return static_cast(static_cast(x)); @@ -506,8 +506,8 @@ struct cast_impl -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR -NewType cast(const OldType& x) +EIGEN_DEVICE_FUNC +inline NewType cast(const OldType& x) { return cast_impl::run(x); } @@ -1134,7 +1134,7 @@ namespace numext { #if (!defined(EIGEN_GPUCC) || defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC)) template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T& x, const T& y) { EIGEN_USING_STD(min) @@ -1142,7 +1142,7 @@ EIGEN_ALWAYS_INLINE T mini(const T& x, const T& y) } template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T& x, const T& y) { EIGEN_USING_STD(max) @@ -1150,7 +1150,7 @@ EIGEN_ALWAYS_INLINE T maxi(const T& x, const T& y) } #else template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T& x, const T& y) { return y < x ? y : x; @@ -1180,7 +1180,7 @@ EIGEN_ALWAYS_INLINE long double mini(const long double& x, const long double& y) } template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T& x, const T& y) { return x < y ? y : x; @@ -1281,8 +1281,8 @@ SYCL_SPECIALIZE_FLOATING_TYPES_BINARY(maxi, fmax) template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR -EIGEN_MATHFUNC_RETVAL(real, Scalar) real(const Scalar& x) +EIGEN_DEVICE_FUNC +inline EIGEN_MATHFUNC_RETVAL(real, Scalar) real(const Scalar& x) { return EIGEN_MATHFUNC_IMPL(real, Scalar)::run(x); } @@ -1330,22 +1330,22 @@ inline EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar) imag_ref(Scalar& x) } template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR -EIGEN_MATHFUNC_RETVAL(conj, Scalar) conj(const Scalar& x) +EIGEN_DEVICE_FUNC +inline EIGEN_MATHFUNC_RETVAL(conj, Scalar) conj(const Scalar& x) { return EIGEN_MATHFUNC_IMPL(conj, Scalar)::run(x); } template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR -EIGEN_MATHFUNC_RETVAL(sign, Scalar) sign(const Scalar& x) +EIGEN_DEVICE_FUNC +inline EIGEN_MATHFUNC_RETVAL(sign, Scalar) sign(const Scalar& x) { return EIGEN_MATHFUNC_IMPL(sign, Scalar)::run(x); } template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR -EIGEN_MATHFUNC_RETVAL(abs2, Scalar) abs2(const Scalar& x) +EIGEN_DEVICE_FUNC +inline EIGEN_MATHFUNC_RETVAL(abs2, Scalar) abs2(const Scalar& x) { return EIGEN_MATHFUNC_IMPL(abs2, Scalar)::run(x); } diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index f65c7a642..23acd8ae7 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -221,7 +221,7 @@ class Matrix * remain row-vectors and vectors remain vectors. */ template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix& operator=(const DenseBase& other) { return Base::_set(other); @@ -234,14 +234,14 @@ class Matrix * \copydetails DenseBase::operator=(const EigenBase &other) */ template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix& operator=(const EigenBase &other) { return Base::operator=(other); } template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix& operator=(const ReturnByValue& func) { return Base::operator=(func); @@ -257,7 +257,7 @@ class Matrix * * \sa resize(Index,Index) */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix() : Base() { EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED @@ -269,7 +269,7 @@ class Matrix : Base(internal::constructor_without_unaligned_array_assert()) { EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_constructible::value) : Base(std::move(other)) {} EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE @@ -287,7 +287,7 @@ class Matrix * \sa Matrix(const std::initializer_list>&) */ template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args) : Base(a0, a1, a2, a3, args...) {} @@ -312,7 +312,7 @@ class Matrix * * \sa Matrix(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args) */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE Matrix(const std::initializer_list>& list) : Base(list) {} #ifndef EIGEN_PARSED_BY_DOXYGEN @@ -400,7 +400,7 @@ class Matrix /** \brief Copy constructor */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix(const Matrix& other) : Base(other) { } @@ -408,7 +408,7 @@ class Matrix * \sa MatrixBase::operator=(const EigenBase&) */ template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix(const EigenBase &other) : Base(other.derived()) { } diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index d5b78f3b9..85132cc8e 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -144,11 +144,11 @@ template class MatrixBase // trouble with MSVC. template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase& other); template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC Derived& operator=(const EigenBase& other); template @@ -156,19 +156,19 @@ template class MatrixBase Derived& operator=(const ReturnByValue& other); template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator+=(const MatrixBase& other); template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator-=(const MatrixBase& other); template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const Product operator*(const MatrixBase &other) const; template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const Product lazyProduct(const MatrixBase &other) const; @@ -192,11 +192,11 @@ template class MatrixBase operator*(const SkewSymmetricBase &skew) const; template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC typename ScalarBinaryOpTraits::Scalar,typename internal::traits::Scalar>::ReturnType dot(const MatrixBase& other) const; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR RealScalar squaredNorm() const; + EIGEN_DEVICE_FUNC RealScalar squaredNorm() const; EIGEN_DEVICE_FUNC RealScalar norm() const; RealScalar stableNorm() const; RealScalar blueNorm() const; @@ -210,11 +210,11 @@ template class MatrixBase EIGEN_DEVICE_FUNC void adjointInPlace(); typedef Diagonal DiagonalReturnType; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC DiagonalReturnType diagonal(); typedef Diagonal ConstDiagonalReturnType; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const ConstDiagonalReturnType diagonal() const; template @@ -234,10 +234,10 @@ template class MatrixBase template struct ConstTriangularViewReturnType { typedef const TriangularView Type; }; template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC typename TriangularViewReturnType::Type triangularView(); template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC typename ConstTriangularViewReturnType::Type triangularView() const; template struct SelfAdjointViewReturnType { typedef SelfAdjointView Type; }; @@ -252,14 +252,14 @@ template class MatrixBase const SparseView sparseView(const Scalar& m_reference = Scalar(0), const typename NumTraits::Real& m_epsilon = NumTraits::dummy_precision()) const; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const IdentityReturnType Identity(); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const IdentityReturnType Identity(Index rows, Index cols); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const BasisReturnType Unit(Index size, Index i); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const BasisReturnType Unit(Index i); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const BasisReturnType UnitX(); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const BasisReturnType UnitY(); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const BasisReturnType UnitZ(); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static const BasisReturnType UnitW(); + EIGEN_DEVICE_FUNC static const IdentityReturnType Identity(); + EIGEN_DEVICE_FUNC static const IdentityReturnType Identity(Index rows, Index cols); + EIGEN_DEVICE_FUNC static const BasisReturnType Unit(Index size, Index i); + EIGEN_DEVICE_FUNC static const BasisReturnType Unit(Index i); + EIGEN_DEVICE_FUNC static const BasisReturnType UnitX(); + EIGEN_DEVICE_FUNC static const BasisReturnType UnitY(); + EIGEN_DEVICE_FUNC static const BasisReturnType UnitZ(); + EIGEN_DEVICE_FUNC static const BasisReturnType UnitW(); EIGEN_DEVICE_FUNC const DiagonalWrapper asDiagonal() const; @@ -292,7 +292,7 @@ template class MatrixBase * fuzzy comparison such as isApprox() * \sa isApprox(), operator!= */ template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline bool operator==(const MatrixBase& other) const + EIGEN_DEVICE_FUNC inline bool operator==(const MatrixBase& other) const { return cwiseEqual(other).all(); } /** \returns true if at least one pair of coefficients of \c *this and \a other are not exactly equal to each other. @@ -300,7 +300,7 @@ template class MatrixBase * fuzzy comparison such as isApprox() * \sa isApprox(), operator== */ template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline bool operator!=(const MatrixBase& other) const + EIGEN_DEVICE_FUNC inline bool operator!=(const MatrixBase& other) const { return cwiseNotEqual(other).any(); } NoAlias EIGEN_DEVICE_FUNC noalias(); @@ -312,7 +312,7 @@ template class MatrixBase template inline const Derived& forceAlignedAccessIf() const { return derived(); } template inline Derived& forceAlignedAccessIf() { return derived(); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Scalar trace() const; + EIGEN_DEVICE_FUNC Scalar trace() const; template EIGEN_DEVICE_FUNC RealScalar lpNorm() const; @@ -321,10 +321,10 @@ template class MatrixBase /** \returns an \link Eigen::ArrayBase Array \endlink expression of this matrix * \sa ArrayBase::matrix() */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR ArrayWrapper array() { return ArrayWrapper(derived()); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ArrayWrapper array() { return ArrayWrapper(derived()); } /** \returns a const \link Eigen::ArrayBase Array \endlink expression of this matrix * \sa ArrayBase::matrix() */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const ArrayWrapper array() const { return ArrayWrapper(derived()); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArrayWrapper array() const { return ArrayWrapper(derived()); } /////////// LU module /////////// @@ -395,7 +395,7 @@ template class MatrixBase }; #endif // EIGEN_PARSED_BY_DOXYGEN template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC #ifndef EIGEN_PARSED_BY_DOXYGEN inline typename cross_product_return_type::type #else diff --git a/Eigen/src/Core/PartialReduxEvaluator.h b/Eigen/src/Core/PartialReduxEvaluator.h index 818c7eb10..693fc355a 100644 --- a/Eigen/src/Core/PartialReduxEvaluator.h +++ b/Eigen/src/Core/PartialReduxEvaluator.h @@ -169,7 +169,7 @@ struct evaluator > Alignment = 0 // FIXME this will need to be improved once PartialReduxExpr is vectorized }; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR explicit evaluator(const XprType xpr) + EIGEN_DEVICE_FUNC explicit evaluator(const XprType xpr) : m_arg(xpr.nestedExpression()), m_functor(xpr.functor()) { EIGEN_INTERNAL_CHECK_COST_VALUE(TraversalSize==Dynamic ? HugeCost : (TraversalSize==0 ? 1 : int(CostOpType::value))); @@ -178,13 +178,13 @@ struct evaluator > typedef typename XprType::CoeffReturnType CoeffReturnType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index i, Index j) const { return coeff(Direction==Vertical ? j : i); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index index) const { return m_functor(m_arg.template subVector(index)); diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index 5e32564f0..222eaf5f6 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -30,7 +30,7 @@ namespace internal { template struct check_rows_cols_for_overflow { template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE void run(Index, Index) { } @@ -146,9 +146,9 @@ class PlainObjectBase : public internal::dense_xpr_base::type EIGEN_STATIC_ASSERT((MaxColsAtCompileTime == ColsAtCompileTime || ColsAtCompileTime==Dynamic), INVALID_MATRIX_TEMPLATE_PARAMETERS) EIGEN_STATIC_ASSERT(((Options & (DontAlign|RowMajor)) == Options), INVALID_MATRIX_TEMPLATE_PARAMETERS) - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC Base& base() { return *static_cast(this); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const Base& base() const { return *static_cast(this); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR @@ -173,7 +173,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type * provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts. * * See DenseCoeffsBase::coeff(Index) const for details. */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& coeff(Index index) const { return m_storage.data()[index]; @@ -183,7 +183,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type * provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts. * * See DenseCoeffsBase::coeffRef(Index,Index) const for details. */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index rowId, Index colId) { if(Flags & RowMajorBit) @@ -196,7 +196,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type * provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts. * * See DenseCoeffsBase::coeffRef(Index) const for details. */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index index) { return m_storage.data()[index]; @@ -204,7 +204,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type /** This is the const version of coeffRef(Index,Index) which is thus synonym of coeff(Index,Index). * It is provided for convenience. */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& coeffRef(Index rowId, Index colId) const { if(Flags & RowMajorBit) @@ -256,11 +256,11 @@ class PlainObjectBase : public internal::dense_xpr_base::type } /** \returns a const pointer to the data array of this matrix */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const Scalar *data() const + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar *data() const { return m_storage.data(); } /** \returns a pointer to the data array of this matrix */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Scalar *data() + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar *data() { return m_storage.data(); } /** Resizes \c *this to a \a rows x \a cols matrix. @@ -279,7 +279,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type * * \sa resize(Index) for vectors, resize(NoChange_t, Index), resize(Index, NoChange_t) */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols) { eigen_assert(internal::check_implication(RowsAtCompileTime!=Dynamic, rows==RowsAtCompileTime) @@ -362,7 +362,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type * remain row-vectors and vectors remain vectors. */ template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resizeLike(const EigenBase& _other) { const OtherDerived& other = _other.derived(); @@ -484,7 +484,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type // by making all its constructor protected. See bug 1074. protected: - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase() : m_storage() { // EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED @@ -501,7 +501,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type } #endif - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC PlainObjectBase(PlainObjectBase&& other) EIGEN_NOEXCEPT : m_storage( std::move(other.m_storage) ) { @@ -515,7 +515,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type } /** Copy constructor */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const PlainObjectBase& other) : Base(), m_storage(other.m_storage) { } EIGEN_DEVICE_FUNC @@ -586,7 +586,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type /** \sa PlainObjectBase::operator=(const EigenBase&) */ template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const DenseBase &other) : m_storage() { @@ -619,7 +619,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type * \copydetails DenseBase::operator=(const EigenBase &other) */ template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const EigenBase &other) { _resize_to_match(other); @@ -639,9 +639,9 @@ class PlainObjectBase : public internal::dense_xpr_base::type * \see class Map */ ///@{ - static EIGEN_CONSTEXPR ConstMapType Map(const Scalar* data) + static inline ConstMapType Map(const Scalar* data) { return ConstMapType(data); } - static EIGEN_CONSTEXPR MapType Map(Scalar* data) + static inline MapType Map(Scalar* data) { return MapType(data); } static inline ConstMapType Map(const Scalar* data, Index size) { return ConstMapType(data, size); } @@ -741,7 +741,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type * remain row-vectors and vectors remain vectors. */ template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _resize_to_match(const EigenBase& other) { #ifdef EIGEN_NO_AUTOMATIC_RESIZING @@ -771,7 +771,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type // aliasing is dealt once in internal::call_assignment // so at this stage we have to assume aliasing... and resising has to be done later. template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& _set(const DenseBase& other) { internal::call_assignment(this->derived(), other.derived()); @@ -797,7 +797,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type } template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2(Index rows, Index cols, std::enable_if_t* = 0) { const bool t0_is_integer_alike = internal::is_valid_index_type::value; @@ -809,7 +809,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type } template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2(const T0& val0, const T1& val1, std::enable_if_t* = 0) { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 2) @@ -818,7 +818,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type } template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2(const Index& val0, const Index& val1, std::enable_if_t< (!internal::is_same::value) && (internal::is_same::value) @@ -847,7 +847,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type // We have a 1x1 matrix/array => the argument is interpreted as the value of the unique coefficient (case where scalar type can be implicitly converted) template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const Scalar& val0, std::enable_if_t::value,T>* = 0) { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1) @@ -883,14 +883,14 @@ class PlainObjectBase : public internal::dense_xpr_base::type // Initialize an arbitrary matrix from an object convertible to the Derived type. template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const Derived& other){ this->_set_noalias(other); } // Initialize an arbitrary matrix from a generic Eigen expression template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const EigenBase& other){ this->derived() = other; } @@ -947,7 +947,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type * of same type it is enough to swap the data pointers. */ template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(DenseBase & other) { enum { SwapPointers = internal::is_same::value && Base::SizeAtCompileTime==Dynamic }; @@ -958,7 +958,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type * \brief const version forwarded to DenseBase::swap */ template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(DenseBase const & other) { Base::swap(other.derived()); } @@ -1083,7 +1083,7 @@ struct conservative_resize_like_impl template struct matrix_swap_impl { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(MatrixTypeA& a, MatrixTypeB& b) { a.base().swap(b); diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 9ce088001..85842d1a5 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -92,7 +92,7 @@ class Product : public ProductImpl LhsNestedCleaned; typedef internal::remove_all_t RhsNestedCleaned; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Product(const Lhs& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs) { eigen_assert(lhs.cols() == rhs.rows() @@ -105,9 +105,9 @@ class Product : public ProductImpl public: - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Scalar coeff(Index row, Index col) const + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar coeff(Index row, Index col) const { EIGEN_STATIC_ASSERT(EnableCoeff, THIS_METHOD_IS_ONLY_FOR_INNER_OR_LAZY_PRODUCTS); eigen_assert( (Option==LazyProduct) || (this->rows() == 1 && this->cols() == 1) ); @@ -177,7 +177,7 @@ class ProductImpl return internal::evaluator(derived()).coeff(row,col); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Scalar coeff(Index i) const + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar coeff(Index i) const { EIGEN_STATIC_ASSERT(EnableCoeff, THIS_METHOD_IS_ONLY_FOR_INNER_OR_LAZY_PRODUCTS); eigen_assert( (Option==LazyProduct) || (this->rows() == 1 && this->cols() == 1) ); diff --git a/Eigen/src/Core/ProductEvaluators.h b/Eigen/src/Core/ProductEvaluators.h index c496e7c0e..9da240671 100644 --- a/Eigen/src/Core/ProductEvaluators.h +++ b/Eigen/src/Core/ProductEvaluators.h @@ -34,7 +34,7 @@ struct evaluator > typedef Product XprType; typedef product_evaluator Base; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR explicit evaluator(const XprType& xpr) : Base(xpr) {} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const XprType& xpr) : Base(xpr) {} }; // Catch "scalar * ( A * B )" and transform it to "(A*scalar) * B" @@ -139,7 +139,7 @@ struct Assignment, internal::assign_op> { typedef Product SrcXprType; - static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op &) { Index dstRows = src.rows(); @@ -314,7 +314,7 @@ struct generic_product_impl }; template - static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs) + static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs) { internal::outer_product_selector_run(dst, lhs, rhs, set(), is_row_major()); } @@ -397,7 +397,7 @@ struct generic_product_impl typedef typename Product::Scalar Scalar; template - static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs) + static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs) { // Same as: dst.noalias() = lhs.lazyProduct(rhs); // but easier on the compiler side @@ -497,7 +497,7 @@ struct product_evaluator, ProductTag, DenseShape, typedef typename XprType::Scalar Scalar; typedef typename XprType::CoeffReturnType CoeffReturnType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit product_evaluator(const XprType& xpr) : m_lhs(xpr.lhs()), m_rhs(xpr.rhs()), @@ -603,7 +603,7 @@ struct product_evaluator, ProductTag, DenseShape, && (int(InnerSize) % packet_traits::size == 0) }; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const CoeffReturnType coeff(Index row, Index col) const + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CoeffReturnType coeff(Index row, Index col) const { return (m_lhs.row(row).transpose().cwiseProduct( m_rhs.col(col) )).sum(); } diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h index 8a3bf5e00..796e6c4eb 100644 --- a/Eigen/src/Core/Redux.h +++ b/Eigen/src/Core/Redux.h @@ -106,7 +106,7 @@ struct redux_novec_unroller typedef typename Evaluator::Scalar Scalar; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Evaluator &eval, const Func& func) { return func(redux_novec_unroller::run(eval,func), @@ -124,7 +124,7 @@ struct redux_novec_unroller typedef typename Evaluator::Scalar Scalar; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Evaluator &eval, const Func&) { return eval.coeffByOuterInner(outer, inner); @@ -196,7 +196,7 @@ struct redux_impl typedef typename Evaluator::Scalar Scalar; template - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Evaluator &eval, const Func& func, const XprType& xpr) { eigen_assert(xpr.rows()>0 && xpr.cols()>0 && "you are using an empty matrix"); @@ -217,7 +217,7 @@ struct redux_impl typedef redux_novec_unroller Base; typedef typename Evaluator::Scalar Scalar; template - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Evaluator &eval, const Func& func, const XprType& /*xpr*/) { return Base::run(eval,func); @@ -360,7 +360,7 @@ class redux_evaluator : public internal::evaluator typedef internal::evaluator Base; public: typedef XprType_ XprType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit redux_evaluator(const XprType &xpr) : Base(xpr) {} typedef typename XprType::Scalar Scalar; @@ -376,16 +376,16 @@ public: SizeAtCompileTime = XprType::SizeAtCompileTime, InnerSizeAtCompileTime = XprType::InnerSizeAtCompileTime }; - - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeffByOuterInner(Index outer, Index inner) const { return Base::coeff(IsRowMajor ? outer : inner, IsRowMajor ? inner : outer); } - + template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketType packetByOuterInner(Index outer, Index inner) const { return Base::template packet(IsRowMajor ? outer : inner, IsRowMajor ? inner : outer); } - + }; } // end namespace internal @@ -406,7 +406,7 @@ public: */ template template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR typename internal::traits::Scalar +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits::Scalar DenseBase::redux(const Func& func) const { eigen_assert(this->rows()>0 && this->cols()>0 && "you are using an empty matrix"); @@ -428,13 +428,13 @@ DenseBase::redux(const Func& func) const */ template template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR typename internal::traits::Scalar +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits::Scalar DenseBase::minCoeff() const { return derived().redux(Eigen::internal::scalar_min_op()); } -/** \returns the maximum of all coefficients of \c *this. +/** \returns the maximum of all coefficients of \c *this. * In case \c *this contains NaN, NaNPropagation determines the behavior: * NaNPropagation == PropagateFast : undefined * NaNPropagation == PropagateNaN : result is NaN @@ -443,7 +443,7 @@ DenseBase::minCoeff() const */ template template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR typename internal::traits::Scalar +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits::Scalar DenseBase::maxCoeff() const { return derived().redux(Eigen::internal::scalar_max_op()); @@ -456,7 +456,7 @@ DenseBase::maxCoeff() const * \sa trace(), prod(), mean() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR typename internal::traits::Scalar +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits::Scalar DenseBase::sum() const { if(SizeAtCompileTime==0 || (SizeAtCompileTime==Dynamic && size()==0)) @@ -469,7 +469,7 @@ DenseBase::sum() const * \sa trace(), prod(), sum() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR typename internal::traits::Scalar +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits::Scalar DenseBase::mean() const { #ifdef __INTEL_COMPILER @@ -490,7 +490,7 @@ DenseBase::mean() const * \sa sum(), mean(), trace() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR typename internal::traits::Scalar +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits::Scalar DenseBase::prod() const { if(SizeAtCompileTime==0 || (SizeAtCompileTime==Dynamic && size()==0)) @@ -505,7 +505,7 @@ DenseBase::prod() const * \sa diagonal(), sum() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR typename internal::traits::Scalar +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits::Scalar MatrixBase::trace() const { return derived().diagonal().sum(); diff --git a/Eigen/src/Core/Ref.h b/Eigen/src/Core/Ref.h index 3948b8a15..81de5f9d9 100644 --- a/Eigen/src/Core/Ref.h +++ b/Eigen/src/Core/Ref.h @@ -82,7 +82,7 @@ public: : this->rows(); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR RefBase() + EIGEN_DEVICE_FUNC RefBase() : Base(0,RowsAtCompileTime==Dynamic?0:RowsAtCompileTime,ColsAtCompileTime==Dynamic?0:ColsAtCompileTime), // Stride<> does not allow default ctor for Dynamic strides, so let' initialize it with dummy values: m_stride(StrideType::OuterStrideAtCompileTime==Dynamic?0:StrideType::OuterStrideAtCompileTime, @@ -108,7 +108,7 @@ protected: // Returns true if construction is valid, false if there is a stride mismatch, // and fails if there is a size mismatch. template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool construct(Expression& expr) + EIGEN_DEVICE_FUNC bool construct(Expression& expr) { // Check matrix sizes. If this is a compile-time vector, we do allow // implicitly transposing. @@ -338,7 +338,7 @@ template class Ref< EIGEN_DENSE_PUBLIC_INTERFACE(Ref) template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Ref(const DenseBase& expr, + EIGEN_DEVICE_FUNC inline Ref(const DenseBase& expr, std::enable_if_t::ScalarTypeMatch),Derived>* = 0) { // std::cout << match_helper::HasDirectAccess << "," << match_helper::OuterStrideMatch << "," << match_helper::InnerStrideMatch << "\n"; @@ -359,7 +359,7 @@ template class Ref< protected: template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void construct(const Expression& expr,internal::true_type) + EIGEN_DEVICE_FUNC void construct(const Expression& expr,internal::true_type) { // Check if we can use the underlying expr's storage directly, otherwise call the copy version. if (!Base::construct(expr)) { @@ -368,7 +368,7 @@ template class Ref< } template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void construct(const Expression& expr, internal::false_type) + EIGEN_DEVICE_FUNC void construct(const Expression& expr, internal::false_type) { internal::call_assignment_no_alias(m_object,expr,internal::assign_op()); Base::construct(m_object); diff --git a/Eigen/src/Core/Solve.h b/Eigen/src/Core/Solve.h index 91f7c2fbe..f77eac917 100644 --- a/Eigen/src/Core/Solve.h +++ b/Eigen/src/Core/Solve.h @@ -67,15 +67,15 @@ public: typedef typename internal::traits::PlainObject PlainObject; typedef typename internal::traits::StorageIndex StorageIndex; - EIGEN_CONSTEXPR Solve(const Decomposition &dec, const RhsType &rhs) + Solve(const Decomposition &dec, const RhsType &rhs) : m_dec(dec), m_rhs(rhs) {} EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT { return m_dec.cols(); } EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT { return m_rhs.cols(); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR const Decomposition& dec() const { return m_dec; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR const RhsType& rhs() const { return m_rhs; } + EIGEN_DEVICE_FUNC const Decomposition& dec() const { return m_dec; } + EIGEN_DEVICE_FUNC const RhsType& rhs() const { return m_rhs; } protected: const Decomposition &m_dec; @@ -139,7 +139,7 @@ template, internal::assign_op, Dense2Dense> { typedef Solve SrcXprType; - EIGEN_CONSTEXPR static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op &) + static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op &) { Index dstRows = src.rows(); Index dstCols = src.cols(); diff --git a/Eigen/src/Core/SolveTriangular.h b/Eigen/src/Core/SolveTriangular.h index a92b14bfd..71d6f8539 100644 --- a/Eigen/src/Core/SolveTriangular.h +++ b/Eigen/src/Core/SolveTriangular.h @@ -87,7 +87,7 @@ struct triangular_solver_selector typedef blas_traits LhsProductTraits; typedef typename LhsProductTraits::DirectLinearAccessType ActualLhsType; - static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void run(const Lhs& lhs, Rhs& rhs) + static EIGEN_DEVICE_FUNC void run(const Lhs& lhs, Rhs& rhs) { add_const_on_value_type_t actualLhs = LhsProductTraits::extract(lhs); @@ -120,7 +120,7 @@ struct triangular_solver_unroller { DiagIndex = IsLower ? LoopIndex : Size - LoopIndex - 1, StartIndex = IsLower ? 0 : DiagIndex+1 }; - static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void run(const Lhs& lhs, Rhs& rhs) + static EIGEN_DEVICE_FUNC void run(const Lhs& lhs, Rhs& rhs) { if (LoopIndex>0) rhs.coeffRef(DiagIndex) -= lhs.row(DiagIndex).template segment(StartIndex).transpose() @@ -135,12 +135,12 @@ struct triangular_solver_unroller { template struct triangular_solver_unroller { - static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void run(const Lhs&, Rhs&) {} + static EIGEN_DEVICE_FUNC void run(const Lhs&, Rhs&) {} }; template struct triangular_solver_selector { - static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void run(const Lhs& lhs, Rhs& rhs) + static EIGEN_DEVICE_FUNC void run(const Lhs& lhs, Rhs& rhs) { triangular_solver_unroller::run(lhs,rhs); } }; @@ -166,7 +166,7 @@ struct triangular_solver_selector { #ifndef EIGEN_PARSED_BY_DOXYGEN template template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void TriangularViewImpl::solveInPlace(const MatrixBase& _other) const +EIGEN_DEVICE_FUNC void TriangularViewImpl::solveInPlace(const MatrixBase& _other) const { OtherDerived& other = _other.const_cast_derived(); eigen_assert( derived().cols() == derived().rows() && ((Side==OnTheLeft && derived().cols() == other.rows()) || (Side==OnTheRight && derived().cols() == other.cols())) ); diff --git a/Eigen/src/Core/Stride.h b/Eigen/src/Core/Stride.h index 3e1d85dbf..2832e8014 100644 --- a/Eigen/src/Core/Stride.h +++ b/Eigen/src/Core/Stride.h @@ -61,7 +61,7 @@ class Stride }; /** Default constructor, for use when strides are fixed at compile time */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC Stride() : m_outer(OuterStrideAtCompileTime), m_inner(InnerStrideAtCompileTime) { @@ -71,14 +71,14 @@ class Stride } /** Constructor allowing to pass the strides at runtime */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC Stride(Index outerStride, Index innerStride) : m_outer(outerStride), m_inner(innerStride) { } /** Copy constructor */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC Stride(const Stride& other) : m_outer(other.outer()), m_inner(other.inner()) {} diff --git a/Eigen/src/Core/Swap.h b/Eigen/src/Core/Swap.h index f5b5400ca..b2e751177 100644 --- a/Eigen/src/Core/Swap.h +++ b/Eigen/src/Core/Swap.h @@ -32,7 +32,7 @@ public: typedef typename Base::DstXprType DstXprType; typedef swap_assign_op Functor; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE generic_dense_assignment_kernel(DstEvaluatorTypeT &dst, const SrcEvaluatorTypeT &src, const Functor &func, DstXprType& dstExpr) : Base(dst, src, func, dstExpr) {} diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h index 45198e4a3..74650ef7f 100644 --- a/Eigen/src/Core/Transpose.h +++ b/Eigen/src/Core/Transpose.h @@ -62,7 +62,7 @@ template class Transpose EIGEN_GENERIC_PUBLIC_INTERFACE(Transpose) typedef internal::remove_all_t NestedExpression; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE Transpose(MatrixType& matrix) : m_matrix(matrix) {} EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Transpose) @@ -73,12 +73,12 @@ template class Transpose Index cols() const EIGEN_NOEXCEPT { return m_matrix.rows(); } /** \returns the nested expression */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const internal::remove_all_t& nestedExpression() const { return m_matrix; } /** \returns the nested expression */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::remove_reference_t& nestedExpression() { return m_matrix; } @@ -127,9 +127,9 @@ template class TransposeImpl EIGEN_DENSE_PUBLIC_INTERFACE(Transpose) EIGEN_INHERIT_ASSIGNMENT_OPERATORS(TransposeImpl) - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index innerStride() const { return derived().nestedExpression().innerStride(); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index outerStride() const { return derived().nestedExpression().outerStride(); } typedef std::conditional_t< @@ -138,9 +138,9 @@ template class TransposeImpl const Scalar > ScalarWithConstIfNotLvalue; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ScalarWithConstIfNotLvalue* data() { return derived().nestedExpression().data(); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar* data() const { return derived().nestedExpression().data(); } // FIXME: shall we keep the const version of coeffRef? @@ -179,7 +179,7 @@ template class TransposeImpl * * \sa transposeInPlace(), adjoint() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename DenseBase::TransposeReturnType DenseBase::transpose() { @@ -192,7 +192,7 @@ DenseBase::transpose() * * \sa transposeInPlace(), adjoint() */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::ConstTransposeReturnType DenseBase::transpose() const { @@ -402,7 +402,7 @@ struct check_transpose_aliasing_compile_time_selector struct check_transpose_aliasing_run_time_selector { - static EIGEN_CONSTEXPR bool run(const Scalar* dest, const OtherDerived& src) + static bool run(const Scalar* dest, const OtherDerived& src) { return (bool(blas_traits::IsTransposed) != DestIsTransposed) && (dest!=0 && dest==(const Scalar*)extract_data(src)); } @@ -411,7 +411,7 @@ struct check_transpose_aliasing_run_time_selector template struct check_transpose_aliasing_run_time_selector > { - static EIGEN_CONSTEXPR bool run(const Scalar* dest, const CwiseBinaryOp& src) + static bool run(const Scalar* dest, const CwiseBinaryOp& src) { return ((blas_traits::IsTransposed != DestIsTransposed) && (dest!=0 && dest==(const Scalar*)extract_data(src.lhs()))) || ((blas_traits::IsTransposed != DestIsTransposed) && (dest!=0 && dest==(const Scalar*)extract_data(src.rhs()))); @@ -431,7 +431,7 @@ template struct checkTransposeAliasing_impl { - static void EIGEN_CONSTEXPR run(const Derived& dst, const OtherDerived& other) + static void run(const Derived& dst, const OtherDerived& other) { eigen_assert((!check_transpose_aliasing_run_time_selector ::IsTransposed,OtherDerived> @@ -445,12 +445,12 @@ struct checkTransposeAliasing_impl template struct checkTransposeAliasing_impl { - static EIGEN_CONSTEXPR void run(const Derived&, const OtherDerived&) + static void run(const Derived&, const OtherDerived&) { } }; -template EIGEN_CONSTEXPR +template void check_for_aliasing(const Dst &dst, const Src &src) { if((!Dst::IsVectorAtCompileTime) && dst.rows()>1 && dst.cols()>1) diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index 4abc6f35d..c1bd13afc 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -53,7 +53,7 @@ template class TriangularBase : public EigenBase typedef DenseMatrixType DenseType; typedef Derived const& Nested; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC inline TriangularBase() { eigen_assert(!((int(Mode) & int(UnitDiag)) && (int(Mode) & int(ZeroDiag)))); } EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR @@ -66,7 +66,7 @@ template class TriangularBase : public EigenBase inline Index innerStride() const EIGEN_NOEXCEPT { return derived().innerStride(); } // dummy resize function - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC void resize(Index rows, Index cols) { EIGEN_UNUSED_VARIABLE(rows); @@ -102,9 +102,9 @@ template class TriangularBase : public EigenBase } #ifndef EIGEN_PARSED_BY_DOXYGEN - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC inline const Derived& derived() const { return *static_cast(this); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC inline Derived& derived() { return *static_cast(this); } #endif // not EIGEN_PARSED_BY_DOXYGEN @@ -216,7 +216,7 @@ template class TriangularView IsVectorAtCompileTime = false }; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC explicit inline TriangularView(MatrixType& matrix) : m_matrix(matrix) {} @@ -230,11 +230,11 @@ template class TriangularView inline Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); } /** \returns a const reference to the nested expression */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const NestedExpression& nestedExpression() const { return m_matrix; } /** \returns a reference to the nested expression */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC NestedExpression& nestedExpression() { return m_matrix; } typedef TriangularView ConjugateReturnType; @@ -280,7 +280,7 @@ template class TriangularView } template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC inline const Solve solve(const MatrixBase& other) const { return Solve(*this, other.derived()); } @@ -515,11 +515,11 @@ template class TriangularViewImpl - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC void solveInPlace(const MatrixBase& other) const; template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC void solveInPlace(const MatrixBase& other) const { return solveInPlace(other); } @@ -547,7 +547,7 @@ template class TriangularViewImpl - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _solve_impl(const RhsType &rhs, DstType &dst) const { if(!internal::is_same_dense(dst,rhs)) dst = rhs; @@ -641,7 +641,7 @@ EIGEN_DEVICE_FUNC void TriangularBase::evalTo(MatrixBase */ template template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC typename MatrixBase::template TriangularViewReturnType::Type MatrixBase::triangularView() { @@ -651,7 +651,7 @@ MatrixBase::triangularView() /** This is the const version of MatrixBase::triangularView() */ template template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC typename MatrixBase::template ConstTriangularViewReturnType::Type MatrixBase::triangularView() const { @@ -734,7 +734,7 @@ struct unary_evaluator, IndexBased> { typedef TriangularView XprType; typedef evaluator> Base; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC unary_evaluator(const XprType &xpr) : Base(xpr.nestedExpression()) {} }; @@ -770,8 +770,7 @@ public: typedef typename Base::AssignmentTraits AssignmentTraits; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - triangular_dense_assignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType& dstExpr) + EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType& dstExpr) : Base(dst, src, func, dstExpr) {} @@ -785,14 +784,14 @@ public: using Base::assignCoeff; #endif - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void assignDiagonalCoeff(Index id) + EIGEN_DEVICE_FUNC void assignDiagonalCoeff(Index id) { if(Mode==UnitDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(1)); else if(Mode==ZeroDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(0)); else if(Mode==0) Base::assignCoeff(id,id); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR void assignOppositeCoeff(Index row, Index col) + EIGEN_DEVICE_FUNC void assignOppositeCoeff(Index row, Index col) { eigen_internal_assert(row!=col); if(SetOpposite) @@ -801,7 +800,7 @@ public: }; template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src, const Functor &func) { typedef evaluator DstEvaluatorType; @@ -854,7 +853,7 @@ struct Assignment template< typename DstXprType, typename SrcXprType, typename Functor> struct Assignment { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static void run(DstXprType &dst, const SrcXprType &src, const Functor &func) + EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func) { call_triangular_assignment_loop(dst, src, func); } @@ -863,7 +862,7 @@ struct Assignment template< typename DstXprType, typename SrcXprType, typename Functor> struct Assignment { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR static void run(DstXprType &dst, const SrcXprType &src, const Functor &func) + EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func) { call_triangular_assignment_loop(dst, src, func); } @@ -884,7 +883,7 @@ struct triangular_assignment_loop typedef typename Kernel::Scalar Scalar; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static inline void run(Kernel &kernel) { triangular_assignment_loop::run(kernel); @@ -902,7 +901,7 @@ struct triangular_assignment_loop template struct triangular_assignment_loop { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static inline void run(Kernel &) {} }; diff --git a/Eigen/src/Core/VectorBlock.h b/Eigen/src/Core/VectorBlock.h index 77a5c33a6..ee28da1fc 100644 --- a/Eigen/src/Core/VectorBlock.h +++ b/Eigen/src/Core/VectorBlock.h @@ -74,7 +74,7 @@ template class VectorBlock /** Dynamic-size constructor */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE VectorBlock(VectorType& vector, Index start, Index size) : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start, @@ -83,7 +83,7 @@ template class VectorBlock /** Fixed-size constructor */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE VectorBlock(VectorType& vector, Index start) : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start) { } diff --git a/Eigen/src/Core/VectorwiseOp.h b/Eigen/src/Core/VectorwiseOp.h index 969262062..b004f76ce 100644 --- a/Eigen/src/Core/VectorwiseOp.h +++ b/Eigen/src/Core/VectorwiseOp.h @@ -63,7 +63,7 @@ class PartialReduxExpr : public internal::dense_xpr_base< PartialReduxExpr::type Base; EIGEN_DENSE_PUBLIC_INTERFACE(PartialReduxExpr) - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC explicit PartialReduxExpr(const MatrixType& mat, const MemberOp& func = MemberOp()) : m_matrix(mat), m_functor(func) {} @@ -72,10 +72,10 @@ class PartialReduxExpr : public internal::dense_xpr_base< PartialReduxExpr struct partial_redux_dummy_func; template struct Cost { enum { value = COST }; }; \ enum { Vectorizable = VECTORIZABLE }; \ template \ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR \ + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE \ ResultType operator()(const XprType& mat) const \ { return mat.MEMBER(); } \ BinaryOp binaryFunc() const { return BinaryOp(); } \ @@ -265,11 +265,11 @@ template class VectorwiseOp } public: - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC explicit inline VectorwiseOp(ExpressionType& matrix) : m_matrix(matrix) {} /** \internal */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC inline const ExpressionType& _expression() const { return m_matrix; } #ifdef EIGEN_PARSED_BY_DOXYGEN @@ -476,7 +476,7 @@ template class VectorwiseOp * Output: \verbinclude PartialRedux_sum.out * * \sa DenseBase::sum() */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const SumReturnType sum() const { return SumReturnType(_expression()); } @@ -484,7 +484,7 @@ template class VectorwiseOp * of each column (or row) of the referenced expression. * * \sa DenseBase::mean() */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const MeanReturnType mean() const { return sum() / Scalar(Direction==Vertical?m_matrix.rows():m_matrix.cols()); } @@ -493,7 +493,7 @@ template class VectorwiseOp * This expression can be assigned to a vector with entries of type \c bool. * * \sa DenseBase::all() */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const AllReturnType all() const { return AllReturnType(_expression()); } @@ -502,7 +502,7 @@ template class VectorwiseOp * This expression can be assigned to a vector with entries of type \c bool. * * \sa DenseBase::any() */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const AnyReturnType any() const { return AnyReturnType(_expression()); } @@ -515,7 +515,7 @@ template class VectorwiseOp * Output: \verbinclude PartialRedux_count.out * * \sa DenseBase::count() */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const CountReturnType count() const { return CountReturnType(_expression()); } @@ -526,7 +526,7 @@ template class VectorwiseOp * Output: \verbinclude PartialRedux_prod.out * * \sa DenseBase::prod() */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC const ProdReturnType prod() const { return ProdReturnType(_expression()); } @@ -760,7 +760,7 @@ template class VectorwiseOp * \sa rowwise(), class VectorwiseOp, \ref TutorialReductionsVisitorsBroadcasting */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR typename DenseBase::ColwiseReturnType +EIGEN_DEVICE_FUNC inline typename DenseBase::ColwiseReturnType DenseBase::colwise() { return ColwiseReturnType(derived()); @@ -774,7 +774,7 @@ DenseBase::colwise() * \sa colwise(), class VectorwiseOp, \ref TutorialReductionsVisitorsBroadcasting */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR typename DenseBase::RowwiseReturnType +EIGEN_DEVICE_FUNC inline typename DenseBase::RowwiseReturnType DenseBase::rowwise() { return RowwiseReturnType(derived()); diff --git a/Eigen/src/Core/arch/Default/ConjHelper.h b/Eigen/src/Core/arch/Default/ConjHelper.h index 81c2819fc..6b5afe312 100644 --- a/Eigen/src/Core/arch/Default/ConjHelper.h +++ b/Eigen/src/Core/arch/Default/ConjHelper.h @@ -47,16 +47,16 @@ template struct conj_if; template<> struct conj_if { template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T operator()(const T& x) const { return numext::conj(x); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T operator()(const T& x) const { return numext::conj(x); } template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T pconj(const T& x) const { return internal::pconj(x); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T pconj(const T& x) const { return internal::pconj(x); } }; template<> struct conj_if { template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const T& operator()(const T& x) const { return x; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T& operator()(const T& x) const { return x; } template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const T& pconj(const T& x) const { return x; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T& pconj(const T& x) const { return x; } }; // Generic Implementation, assume scalars since the packet-version is @@ -93,11 +93,11 @@ template struct conj_helper { typedef Packet ResultType; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Packet pmadd(const Packet& x, const Packet& y, const Packet& c) const + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pmadd(const Packet& x, const Packet& y, const Packet& c) const { return Eigen::internal::pmadd(conj_if().pconj(x), conj_if().pconj(y), c); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Packet pmul(const Packet& x, const Packet& y) const + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pmul(const Packet& x, const Packet& y) const { return Eigen::internal::pmul(conj_if().pconj(x), conj_if().pconj(y)); } }; diff --git a/Eigen/src/Core/functors/AssignmentFunctors.h b/Eigen/src/Core/functors/AssignmentFunctors.h index 26fa25106..c9d80e6dc 100644 --- a/Eigen/src/Core/functors/AssignmentFunctors.h +++ b/Eigen/src/Core/functors/AssignmentFunctors.h @@ -21,7 +21,8 @@ namespace internal { * */ template struct assign_op { - EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a = b; } + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a = b; } template EIGEN_STRONG_INLINE void assignPacket(DstScalar* a, const Packet& b) const @@ -44,7 +45,8 @@ struct functor_traits > { * */ template struct add_assign_op { - EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a += b; } + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a += b; } template EIGEN_STRONG_INLINE void assignPacket(DstScalar* a, const Packet& b) const @@ -135,7 +137,8 @@ struct functor_traits > { * */ template struct swap_assign_op { - EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(Scalar& a, const Scalar& b) const + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(Scalar& a, const Scalar& b) const { #ifdef EIGEN_GPUCC // FIXME is there some kind of cuda::swap? diff --git a/Eigen/src/Core/functors/BinaryFunctors.h b/Eigen/src/Core/functors/BinaryFunctors.h index 1a77a6786..094acb401 100644 --- a/Eigen/src/Core/functors/BinaryFunctors.h +++ b/Eigen/src/Core/functors/BinaryFunctors.h @@ -39,7 +39,7 @@ struct scalar_sum_op : binary_op_base EIGEN_SCALAR_BINARY_OP_PLUGIN } #endif - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a + b; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a + b; } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a, const Packet& b) const { return internal::padd(a,b); } @@ -58,7 +58,7 @@ struct functor_traits > { template<> -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR bool scalar_sum_op::operator() (const bool& a, const bool& b) const { return a || b; } +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool scalar_sum_op::operator() (const bool& a, const bool& b) const { return a || b; } /** \internal @@ -71,11 +71,11 @@ struct scalar_product_op : binary_op_base { typedef typename ScalarBinaryOpTraits::ReturnType result_type; #ifdef EIGEN_SCALAR_BINARY_OP_PLUGIN - EIGEN_CONSTEXPR scalar_product_op() { + scalar_product_op() { EIGEN_SCALAR_BINARY_OP_PLUGIN } #endif - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a * b; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a * b; } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a, const Packet& b) const { return internal::pmul(a,b); } @@ -93,7 +93,7 @@ struct functor_traits > { }; template<> -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR bool scalar_product_op::operator() (const bool& a, const bool& b) const { return a && b; } +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool scalar_product_op::operator() (const bool& a, const bool& b) const { return a && b; } /** \internal @@ -111,7 +111,7 @@ struct scalar_conj_product_op : binary_op_base typedef typename ScalarBinaryOpTraits::ReturnType result_type; - EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return conj_helper().pmul(a,b); } template @@ -135,7 +135,7 @@ template struct scalar_min_op : binary_op_base { typedef typename ScalarBinaryOpTraits::ReturnType result_type; - EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return internal::pmin(a, b); } template @@ -167,7 +167,7 @@ template struct scalar_max_op : binary_op_base { typedef typename ScalarBinaryOpTraits::ReturnType result_type; - EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return internal::pmax(a,b); } template @@ -218,7 +218,7 @@ template struct scalar_cmp_op : binary_op_base { typedef bool result_type; - EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a==b;} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a==b;} template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a, const Packet& b) const { return internal::pcmp_eq(a,b); } @@ -363,7 +363,7 @@ struct scalar_difference_op : binary_op_base EIGEN_SCALAR_BINARY_OP_PLUGIN } #endif - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a - b; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a - b; } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const { return internal::psub(a,b); } @@ -390,7 +390,7 @@ struct scalar_quotient_op : binary_op_base EIGEN_SCALAR_BINARY_OP_PLUGIN } #endif - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a / b; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a / b; } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const { return internal::pdiv(a,b); } diff --git a/Eigen/src/Core/functors/NullaryFunctors.h b/Eigen/src/Core/functors/NullaryFunctors.h index ec86aeb2b..e099d4ac1 100644 --- a/Eigen/src/Core/functors/NullaryFunctors.h +++ b/Eigen/src/Core/functors/NullaryFunctors.h @@ -18,9 +18,9 @@ namespace internal { template struct scalar_constant_op { - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR scalar_constant_op(const scalar_constant_op& other) : m_other(other.m_other) { } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR scalar_constant_op(const Scalar& other) : m_other(other) { } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const Scalar operator() () const { return m_other; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE scalar_constant_op(const scalar_constant_op& other) : m_other(other.m_other) { } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE scalar_constant_op(const Scalar& other) : m_other(other) { } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() () const { return m_other; } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const PacketType packetOp() const { return internal::pset1(m_other); } const Scalar m_other; @@ -32,7 +32,7 @@ struct functor_traits > template struct scalar_identity_op { template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const Scalar operator() (IndexType row, IndexType col) const { return row==col ? Scalar(1) : Scalar(0); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (IndexType row, IndexType col) const { return row==col ? Scalar(1) : Scalar(0); } }; template struct functor_traits > diff --git a/Eigen/src/Core/functors/StlFunctors.h b/Eigen/src/Core/functors/StlFunctors.h index 7da5016dc..5971075dd 100644 --- a/Eigen/src/Core/functors/StlFunctors.h +++ b/Eigen/src/Core/functors/StlFunctors.h @@ -20,7 +20,7 @@ namespace numext { template struct equal_to { typedef bool result_type; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool operator()(const T& lhs, const T& rhs) const { + EIGEN_DEVICE_FUNC bool operator()(const T& lhs, const T& rhs) const { return lhs == rhs; } }; @@ -28,7 +28,7 @@ struct equal_to { template struct not_equal_to { typedef bool result_type; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool operator()(const T& lhs, const T& rhs) const { + EIGEN_DEVICE_FUNC bool operator()(const T& lhs, const T& rhs) const { return lhs != rhs; } }; diff --git a/Eigen/src/Core/functors/UnaryFunctors.h b/Eigen/src/Core/functors/UnaryFunctors.h index 39b7be7c3..8a8441583 100644 --- a/Eigen/src/Core/functors/UnaryFunctors.h +++ b/Eigen/src/Core/functors/UnaryFunctors.h @@ -22,7 +22,7 @@ namespace internal { * \sa class CwiseUnaryOp, MatrixBase::operator- */ template struct scalar_opposite_op { - EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return -a; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return -a; } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const { return internal::pnegate(a); } @@ -88,7 +88,7 @@ template struct abs_knowing_score struct scalar_abs2_op { typedef typename NumTraits::Real result_type; - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { return numext::abs2(a); } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const @@ -154,7 +154,7 @@ struct functor_traits > template struct scalar_cast_op { typedef NewType result_type; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const NewType operator() (const Scalar& a) const { return cast(a); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const NewType operator() (const Scalar& a) const { return cast(a); } }; template struct functor_traits > diff --git a/Eigen/src/Core/util/BlasUtil.h b/Eigen/src/Core/util/BlasUtil.h index d023b3b9c..3f0007783 100644 --- a/Eigen/src/Core/util/BlasUtil.h +++ b/Eigen/src/Core/util/BlasUtil.h @@ -487,8 +487,8 @@ template struct blas_traits ExtractType, typename ExtractType_::PlainObject > DirectLinearAccessType; - static inline EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR ExtractType extract(const XprType& x) { return x; } - static inline EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR const Scalar extractScalarFactor(const XprType&) { return Scalar(1); } + static inline EIGEN_DEVICE_FUNC ExtractType extract(const XprType& x) { return x; } + static inline EIGEN_DEVICE_FUNC const Scalar extractScalarFactor(const XprType&) { return Scalar(1); } }; // pop conjugate @@ -576,7 +576,7 @@ struct blas_traits > enum { IsTransposed = Base::IsTransposed ? 0 : 1 }; - static inline EIGEN_CONSTEXPR ExtractType extract(const XprType& x) { return ExtractType(Base::extract(x.nestedExpression())); } + static inline ExtractType extract(const XprType& x) { return ExtractType(Base::extract(x.nestedExpression())); } static inline Scalar extractScalarFactor(const XprType& x) { return Base::extractScalarFactor(x.nestedExpression()); } }; @@ -587,7 +587,7 @@ struct blas_traits template::HasUsableDirectAccess> struct extract_data_selector { - EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE EIGEN_CONSTEXPR static const typename T::Scalar* run(const T& m) + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static const typename T::Scalar* run(const T& m) { return blas_traits::extract(m).data(); } @@ -599,7 +599,7 @@ struct extract_data_selector { }; template -EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE EIGEN_CONSTEXPR const typename T::Scalar* extract_data(const T& m) +EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const typename T::Scalar* extract_data(const T& m) { return extract_data_selector::run(m); } diff --git a/Eigen/src/Core/util/IntegralConstant.h b/Eigen/src/Core/util/IntegralConstant.h index b00fb9c20..ea275bd98 100644 --- a/Eigen/src/Core/util/IntegralConstant.h +++ b/Eigen/src/Core/util/IntegralConstant.h @@ -161,7 +161,7 @@ struct get_fixed_value,Default> { static const int value = N; }; -template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index get_runtime_value(const T &x) { return x; } +template EIGEN_DEVICE_FUNC Index get_runtime_value(const T &x) { return x; } // Cleanup integer/FixedInt/VariableAndFixedInt/etc types: diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index cca2521da..0f30e8817 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -1064,13 +1064,13 @@ namespace Eigen { #elif EIGEN_COMP_CLANG // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653) #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \ using Base::operator =; \ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Derived& operator=(const Derived& other) { Base::operator=(other); return *this; } \ + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) { Base::operator=(other); return *this; } \ template \ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Derived& operator=(const DenseBase& other) { Base::operator=(other.derived()); return *this; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase& other) { Base::operator=(other.derived()); return *this; } #else #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \ using Base::operator =; \ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Derived& operator=(const Derived& other) \ + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) \ { \ Base::operator=(other); \ return *this; \ @@ -1103,14 +1103,11 @@ namespace Eigen { * * Hiding the default destructor lead to problems in C++03 mode together with boost::multiprecision */ -#if defined(EIGEN_GPUCC) #define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived) \ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Derived() = default; \ + EIGEN_DEVICE_FUNC Derived() = default; \ EIGEN_DEVICE_FUNC ~Derived() = default; -#else -#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived) \ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Derived() = default; -#endif + + @@ -1167,7 +1164,7 @@ namespace Eigen { #define EIGEN_MAKE_CWISE_BINARY_OP(METHOD,OPNAME) \ template \ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME) \ + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME) \ (METHOD)(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other) const \ { \ return EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME)(derived(), other.derived()); \ @@ -1185,7 +1182,7 @@ namespace Eigen { const typename internal::plain_constant_type::type, const EXPR> #define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD,OPNAME) \ - template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR \ + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE \ const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,typename internal::promote_scalar_arg::type,OPNAME)\ (METHOD)(const T& scalar) const { \ typedef typename internal::promote_scalar_arg::type PromotedT; \ @@ -1194,7 +1191,7 @@ namespace Eigen { } #define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD,OPNAME) \ - template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR friend \ + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE friend \ const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(typename internal::promote_scalar_arg::type,Derived,OPNAME) \ (METHOD)(const T& scalar, const StorageBaseType& matrix) { \ typedef typename internal::promote_scalar_arg::type PromotedT; \ diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 1aa41abb4..b5f91bf75 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -113,7 +113,7 @@ template class variable_if_dynamic { public: EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(variable_if_dynamic) - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR explicit variable_if_dynamic(T v) { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T v) { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); } EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value() { return T(Value); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR @@ -126,10 +126,10 @@ template class variable_if_dynamic { T m_value; public: - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR explicit variable_if_dynamic(T value = 0) EIGEN_NO_THROW : m_value(value) {} - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value() const { return m_value; } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR operator T() const { return m_value; } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void setValue(T value) { m_value = value; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T value = 0) EIGEN_NO_THROW : m_value(value) {} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value() const { return m_value; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator T() const { return m_value; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value) { m_value = value; } }; /** \internal like variable_if_dynamic but for DynamicIndex @@ -137,7 +137,7 @@ template class variable_if_dynamic template class variable_if_dynamicindex { public: - EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamicindex(T v) { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamicindex(T v) { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); } EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value() { return T(Value); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE @@ -675,7 +675,7 @@ struct possibly_same_dense { }; template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC bool is_same_dense(const T1 &mat1, const T2 &mat2, std::enable_if_t::value> * = 0) { return (mat1.data()==mat2.data()) && (mat1.innerStride()==mat2.innerStride()) && (mat1.outerStride()==mat2.outerStride()); diff --git a/Eigen/src/Geometry/OrthoMethods.h b/Eigen/src/Geometry/OrthoMethods.h index c140831d8..dc6a762f5 100644 --- a/Eigen/src/Geometry/OrthoMethods.h +++ b/Eigen/src/Geometry/OrthoMethods.h @@ -29,7 +29,7 @@ namespace Eigen { template template #ifndef EIGEN_PARSED_BY_DOXYGEN -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename MatrixBase::template cross_product_return_type::type #else typename MatrixBase::PlainObject diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index 7394dea4e..0aca4c471 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -65,34 +65,34 @@ class QuaternionBase : public RotationBase /** \returns the \c x coefficient */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline CoeffReturnType x() const { return this->derived().coeffs().coeff(0); } + EIGEN_DEVICE_FUNC inline CoeffReturnType x() const { return this->derived().coeffs().coeff(0); } /** \returns the \c y coefficient */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline CoeffReturnType y() const { return this->derived().coeffs().coeff(1); } + EIGEN_DEVICE_FUNC inline CoeffReturnType y() const { return this->derived().coeffs().coeff(1); } /** \returns the \c z coefficient */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline CoeffReturnType z() const { return this->derived().coeffs().coeff(2); } + EIGEN_DEVICE_FUNC inline CoeffReturnType z() const { return this->derived().coeffs().coeff(2); } /** \returns the \c w coefficient */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline CoeffReturnType w() const { return this->derived().coeffs().coeff(3); } + EIGEN_DEVICE_FUNC inline CoeffReturnType w() const { return this->derived().coeffs().coeff(3); } /** \returns a reference to the \c x coefficient (if Derived is a non-const lvalue) */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline NonConstCoeffReturnType x() { return this->derived().coeffs().x(); } + EIGEN_DEVICE_FUNC inline NonConstCoeffReturnType x() { return this->derived().coeffs().x(); } /** \returns a reference to the \c y coefficient (if Derived is a non-const lvalue) */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline NonConstCoeffReturnType y() { return this->derived().coeffs().y(); } + EIGEN_DEVICE_FUNC inline NonConstCoeffReturnType y() { return this->derived().coeffs().y(); } /** \returns a reference to the \c z coefficient (if Derived is a non-const lvalue) */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline NonConstCoeffReturnType z() { return this->derived().coeffs().z(); } + EIGEN_DEVICE_FUNC inline NonConstCoeffReturnType z() { return this->derived().coeffs().z(); } /** \returns a reference to the \c w coefficient (if Derived is a non-const lvalue) */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline NonConstCoeffReturnType w() { return this->derived().coeffs().w(); } + EIGEN_DEVICE_FUNC inline NonConstCoeffReturnType w() { return this->derived().coeffs().w(); } /** \returns a read-only vector expression of the imaginary part (x,y,z) */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline const VectorBlock vec() const { return coeffs().template head<3>(); } + EIGEN_DEVICE_FUNC inline const VectorBlock vec() const { return coeffs().template head<3>(); } /** \returns a vector expression of the imaginary part (x,y,z) */ EIGEN_DEVICE_FUNC inline VectorBlock vec() { return coeffs().template head<3>(); } /** \returns a read-only vector expression of the coefficients (x,y,z,w) */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline const typename internal::traits::Coefficients& coeffs() const { return derived().coeffs(); } + EIGEN_DEVICE_FUNC inline const typename internal::traits::Coefficients& coeffs() const { return derived().coeffs(); } /** \returns a vector expression of the coefficients (x,y,z,w) */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline typename internal::traits::Coefficients& coeffs() { return derived().coeffs(); } + EIGEN_DEVICE_FUNC inline typename internal::traits::Coefficients& coeffs() { return derived().coeffs(); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE QuaternionBase& operator=(const QuaternionBase& other); template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const QuaternionBase& other); @@ -105,12 +105,12 @@ class QuaternionBase : public RotationBase // { return operator=(other); } EIGEN_DEVICE_FUNC Derived& operator=(const AngleAxisType& aa); - template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Derived& operator=(const MatrixBase& m); + template EIGEN_DEVICE_FUNC Derived& operator=(const MatrixBase& m); /** \returns a quaternion representing an identity rotation * \sa MatrixBase::Identity() */ - EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR inline Quaternion Identity() { return Quaternion(Scalar(1), Scalar(0), Scalar(0), Scalar(0)); } + EIGEN_DEVICE_FUNC static inline Quaternion Identity() { return Quaternion(Scalar(1), Scalar(0), Scalar(0), Scalar(0)); } /** \sa QuaternionBase::Identity(), MatrixBase::setIdentity() */ @@ -119,7 +119,7 @@ class QuaternionBase : public RotationBase /** \returns the squared norm of the quaternion's coefficients * \sa QuaternionBase::norm(), MatrixBase::squaredNorm() */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Scalar squaredNorm() const { return coeffs().squaredNorm(); } + EIGEN_DEVICE_FUNC inline Scalar squaredNorm() const { return coeffs().squaredNorm(); } /** \returns the norm of the quaternion's coefficients * \sa QuaternionBase::squaredNorm(), MatrixBase::norm() @@ -138,12 +138,12 @@ class QuaternionBase : public RotationBase * corresponds to the cosine of half the angle between the two rotations. * \sa angularDistance() */ - template EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Scalar dot(const QuaternionBase& other) const { return coeffs().dot(other.coeffs()); } + template EIGEN_DEVICE_FUNC inline Scalar dot(const QuaternionBase& other) const { return coeffs().dot(other.coeffs()); } template EIGEN_DEVICE_FUNC Scalar angularDistance(const QuaternionBase& other) const; /** \returns an equivalent 3x3 rotation matrix */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Matrix3 toRotationMatrix() const; + EIGEN_DEVICE_FUNC inline Matrix3 toRotationMatrix() const; /** \returns the quaternion which transform \a a into \a b through a rotation */ template @@ -153,7 +153,7 @@ class QuaternionBase : public RotationBase template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator*= (const QuaternionBase& q); /** \returns the quaternion describing the inverse rotation */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Quaternion inverse() const; + EIGEN_DEVICE_FUNC Quaternion inverse() const; /** \returns the conjugated quaternion */ EIGEN_DEVICE_FUNC Quaternion conjugate() const; @@ -165,7 +165,7 @@ class QuaternionBase : public RotationBase * fuzzy comparison such as isApprox() * \sa isApprox(), operator!= */ template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline bool operator==(const QuaternionBase& other) const + EIGEN_DEVICE_FUNC inline bool operator==(const QuaternionBase& other) const { return coeffs() == other.coeffs(); } /** \returns true if at least one pair of coefficients of \c *this and \a other are not exactly equal to each other. @@ -173,7 +173,7 @@ class QuaternionBase : public RotationBase * fuzzy comparison such as isApprox() * \sa isApprox(), operator== */ template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline bool operator!=(const QuaternionBase& other) const + EIGEN_DEVICE_FUNC inline bool operator!=(const QuaternionBase& other) const { return coeffs() != other.coeffs(); } /** \returns \c true if \c *this is approximately equal to \a other, within the precision @@ -185,7 +185,7 @@ class QuaternionBase : public RotationBase { return coeffs().isApprox(other.coeffs(), prec); } /** return the result vector of \a v through the rotation*/ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Vector3 _transformVector(const Vector3& v) const; + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Vector3 _transformVector(const Vector3& v) const; #ifdef EIGEN_PARSED_BY_DOXYGEN /** \returns \c *this with scalar type casted to \a NewScalarType @@ -199,14 +199,14 @@ class QuaternionBase : public RotationBase #else template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline + EIGEN_DEVICE_FUNC inline std::enable_if_t::value,const Derived&> cast() const { return derived(); } template - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline + EIGEN_DEVICE_FUNC inline std::enable_if_t::value,Quaternion > cast() const { return Quaternion(coeffs().template cast()); @@ -296,10 +296,10 @@ public: * while internally the coefficients are stored in the following order: * [\c x, \c y, \c z, \c w] */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Quaternion(const Scalar& w, const Scalar& x, const Scalar& y, const Scalar& z) : m_coeffs(x, y, z, w){} + EIGEN_DEVICE_FUNC inline Quaternion(const Scalar& w, const Scalar& x, const Scalar& y, const Scalar& z) : m_coeffs(x, y, z, w){} /** Constructs and initialize a quaternion from the array data */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline explicit Quaternion(const Scalar* data) : m_coeffs(data) {} + EIGEN_DEVICE_FUNC explicit inline Quaternion(const Scalar* data) : m_coeffs(data) {} /** Copy constructor */ template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Quaternion(const QuaternionBase& other) { this->Base::operator=(other); } @@ -312,11 +312,11 @@ public: * - a 4D vector expression representing quaternion coefficients in the order [\c x, \c y, \c z, \c w]. */ template - EIGEN_DEVICE_FUNC explicit EIGEN_CONSTEXPR inline Quaternion(const MatrixBase& other) { *this = other; } + EIGEN_DEVICE_FUNC explicit inline Quaternion(const MatrixBase& other) { *this = other; } /** Explicit copy constructor with scalar conversion */ template - EIGEN_DEVICE_FUNC explicit EIGEN_CONSTEXPR Quaternion(const Quaternion& other) + EIGEN_DEVICE_FUNC explicit inline Quaternion(const Quaternion& other) { m_coeffs = other.coeffs().template cast(); } // We define a copy constructor, which means we don't get an implicit move constructor or assignment operator. @@ -337,8 +337,8 @@ public: template EIGEN_DEVICE_FUNC static Quaternion FromTwoVectors(const MatrixBase& a, const MatrixBase& b); - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Coefficients& coeffs() { return m_coeffs;} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline const Coefficients& coeffs() const { return m_coeffs;} + EIGEN_DEVICE_FUNC inline Coefficients& coeffs() { return m_coeffs;} + EIGEN_DEVICE_FUNC inline const Coefficients& coeffs() const { return m_coeffs;} EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(bool(NeedsAlignment)) @@ -415,9 +415,9 @@ class Map, Options_ > * \code *coeffs == {x, y, z, w} \endcode * * If the template parameter Options_ is set to #Aligned, then the pointer coeffs must be aligned. */ - EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Map(const Scalar* coeffs) : m_coeffs(coeffs) {} + EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE Map(const Scalar* coeffs) : m_coeffs(coeffs) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline const Coefficients& coeffs() const { return m_coeffs;} + EIGEN_DEVICE_FUNC inline const Coefficients& coeffs() const { return m_coeffs;} protected: const Coefficients m_coeffs; @@ -452,10 +452,10 @@ class Map, Options_ > * \code *coeffs == {x, y, z, w} \endcode * * If the template parameter Options_ is set to #Aligned, then the pointer coeffs must be aligned. */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR explicit EIGEN_STRONG_INLINE Map(Scalar* coeffs) : m_coeffs(coeffs) {} + EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE Map(Scalar* coeffs) : m_coeffs(coeffs) {} - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Coefficients& coeffs() { return m_coeffs; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline const Coefficients& coeffs() const { return m_coeffs; } + EIGEN_DEVICE_FUNC inline Coefficients& coeffs() { return m_coeffs; } + EIGEN_DEVICE_FUNC inline const Coefficients& coeffs() const { return m_coeffs; } protected: Coefficients m_coeffs; @@ -483,7 +483,7 @@ typedef Map, Aligned> QuaternionMapAlignedd; namespace internal { template struct quat_product { - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Quaternion run(const QuaternionBase& a, const QuaternionBase& b){ + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Quaternion run(const QuaternionBase& a, const QuaternionBase& b){ return Quaternion ( a.w() * b.w() - a.x() * b.x() - a.y() * b.y() - a.z() * b.z(), @@ -524,7 +524,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& QuaternionBase::operator * - Via a Matrix3: 24 + 15n */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR typename QuaternionBase::Vector3 +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename QuaternionBase::Vector3 QuaternionBase::_transformVector(const Vector3& v) const { // Note that this algorithm comes from the optimization by hand @@ -573,7 +573,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& QuaternionBase::operator template template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Derived& QuaternionBase::operator=(const MatrixBase& xpr) +EIGEN_DEVICE_FUNC inline Derived& QuaternionBase::operator=(const MatrixBase& xpr) { EIGEN_STATIC_ASSERT((internal::is_same::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) @@ -585,7 +585,7 @@ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Derived& QuaternionBase::opera * be normalized, otherwise the result is undefined. */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline typename QuaternionBase::Matrix3 +EIGEN_DEVICE_FUNC inline typename QuaternionBase::Matrix3 QuaternionBase::toRotationMatrix(void) const { // NOTE if inlined, then gcc 4.2 and 4.4 get rid of the temporary (not gcc 4.3 !!) @@ -714,7 +714,7 @@ EIGEN_DEVICE_FUNC Quaternion Quaternion::FromTwo * \sa QuaternionBase::conjugate() */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Quaternion::Scalar> QuaternionBase::inverse() const +EIGEN_DEVICE_FUNC inline Quaternion::Scalar> QuaternionBase::inverse() const { // FIXME should this function be called multiplicativeInverse and conjugate() be called inverse() or opposite() ?? Scalar n2 = this->squaredNorm(); @@ -731,12 +731,12 @@ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Quaternion struct quat_conj { - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Quaternion run(const QuaternionBase& q){ + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Quaternion run(const QuaternionBase& q){ return Quaternion(q.w(),-q.x(),-q.y(),-q.z()); } }; } - + /** \returns the conjugate of the \c *this which is equal to the multiplicative inverse * if the quaternion is normalized. * The conjugate of a quaternion represents the opposite rotation. @@ -854,7 +854,7 @@ template struct quaternionbase_assign_impl { typedef typename Other::Scalar Scalar; - template EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR inline void run(QuaternionBase& q, const Other& vec) + template EIGEN_DEVICE_FUNC static inline void run(QuaternionBase& q, const Other& vec) { q.coeffs() = vec; } diff --git a/Eigen/src/Geometry/RotationBase.h b/Eigen/src/Geometry/RotationBase.h index 73fcf7f74..f21277f41 100644 --- a/Eigen/src/Geometry/RotationBase.h +++ b/Eigen/src/Geometry/RotationBase.h @@ -40,8 +40,8 @@ class RotationBase typedef Matrix VectorType; public: - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline const Derived& derived() const { return *static_cast(this); } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Derived& derived() { return *static_cast(this); } + EIGEN_DEVICE_FUNC inline const Derived& derived() const { return *static_cast(this); } + EIGEN_DEVICE_FUNC inline Derived& derived() { return *static_cast(this); } /** \returns an equivalent rotation matrix */ EIGEN_DEVICE_FUNC inline RotationMatrixType toRotationMatrix() const { return derived().toRotationMatrix(); } @@ -69,7 +69,7 @@ class RotationBase * - a vector of size Dim */ template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR typename internal::rotation_base_generic_product_selector::ReturnType + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::rotation_base_generic_product_selector::ReturnType operator*(const EigenBase& e) const { return internal::rotation_base_generic_product_selector::run(derived(), e.derived()); } @@ -125,7 +125,7 @@ struct rotation_base_generic_product_selector ReturnType; - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR ReturnType run(const RotationDerived& r, const OtherVectorType& v) + EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE ReturnType run(const RotationDerived& r, const OtherVectorType& v) { return r._transformVector(v); } diff --git a/Eigen/src/plugins/ArrayCwiseBinaryOps.h b/Eigen/src/plugins/ArrayCwiseBinaryOps.h index ce9bcf69a..5f1e84459 100644 --- a/Eigen/src/plugins/ArrayCwiseBinaryOps.h +++ b/Eigen/src/plugins/ArrayCwiseBinaryOps.h @@ -137,18 +137,18 @@ EIGEN_MAKE_CWISE_BINARY_OP(pow,pow) // TODO code generating macros could be moved to Macros.h and could include generation of documentation #define EIGEN_MAKE_CWISE_COMP_OP(OP, COMPARATOR) \ template \ -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const CwiseBinaryOp, const Derived, const OtherDerived> \ +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp, const Derived, const OtherDerived> \ OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other) const \ { \ return CwiseBinaryOp, const Derived, const OtherDerived>(derived(), other.derived()); \ }\ typedef CwiseBinaryOp, const Derived, const CwiseNullaryOp, PlainObject> > Cmp ## COMPARATOR ## ReturnType; \ typedef CwiseBinaryOp, const CwiseNullaryOp, PlainObject>, const Derived > RCmp ## COMPARATOR ## ReturnType; \ -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const Cmp ## COMPARATOR ## ReturnType \ +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Cmp ## COMPARATOR ## ReturnType \ OP(const Scalar& s) const { \ return this->OP(Derived::PlainObject::Constant(rows(), cols(), s)); \ } \ -EIGEN_DEVICE_FUNC friend EIGEN_STRONG_INLINE EIGEN_CONSTEXPR const RCmp ## COMPARATOR ## ReturnType \ +EIGEN_DEVICE_FUNC friend EIGEN_STRONG_INLINE const RCmp ## COMPARATOR ## ReturnType \ OP(const Scalar& s, const EIGEN_CURRENT_STORAGE_BASE_CLASS& d) { \ return Derived::PlainObject::Constant(d.rows(), d.cols(), s).OP(d); \ } diff --git a/Eigen/src/plugins/BlockMethods.h b/Eigen/src/plugins/BlockMethods.h index a93fbec92..68b94130b 100644 --- a/Eigen/src/plugins/BlockMethods.h +++ b/Eigen/src/plugins/BlockMethods.h @@ -87,7 +87,7 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL /// \sa class Block, fix, fix(int) /// template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE #ifndef EIGEN_PARSED_BY_DOXYGEN typename FixedBlockXpr::value,internal::get_fixed_value::value>::Type #else @@ -101,7 +101,7 @@ block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols) /// This is the const version of block(Index,Index,NRowsType,NColsType) template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE #ifndef EIGEN_PARSED_BY_DOXYGEN const typename ConstFixedBlockXpr::value,internal::get_fixed_value::value>::Type #else @@ -133,7 +133,7 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL /// \sa block(Index,Index,NRowsType,NColsType), class Block /// template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE #ifndef EIGEN_PARSED_BY_DOXYGEN typename FixedBlockXpr::value,internal::get_fixed_value::value>::Type #else @@ -147,7 +147,7 @@ topRightCorner(NRowsType cRows, NColsType cCols) /// This is the const version of topRightCorner(NRowsType, NColsType). template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE #ifndef EIGEN_PARSED_BY_DOXYGEN const typename ConstFixedBlockXpr::value,internal::get_fixed_value::value>::Type #else @@ -1023,7 +1023,7 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL /// \sa block(Index,Index,NRowsType,NColsType), class Block /// template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename FixedBlockXpr::Type block(Index startRow, Index startCol) { return typename FixedBlockXpr::Type(derived(), startRow, startCol); @@ -1031,7 +1031,7 @@ typename FixedBlockXpr::Type block(Index startRow, Index startCol) /// This is the const version of block<>(Index, Index). */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename ConstFixedBlockXpr::Type block(Index startRow, Index startCol) const { return typename ConstFixedBlockXpr::Type(derived(), startRow, startCol); @@ -1093,14 +1093,14 @@ const typename ConstFixedBlockXpr::Type block(Index startRow, Index EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major) /** * \sa row(), class Block */ -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ColXpr col(Index i) { return ColXpr(derived(), i); } /// This is the const version of col(). -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstColXpr col(Index i) const { return ConstColXpr(derived(), i); @@ -1114,14 +1114,14 @@ ConstColXpr col(Index i) const EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major) /** * \sa col(), class Block */ -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE RowXpr row(Index i) { return RowXpr(derived(), i); } /// This is the const version of row(). */ -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstRowXpr row(Index i) const { return ConstRowXpr(derived(), i); @@ -1293,7 +1293,7 @@ tail(NType n) const /// \sa segment(Index,NType), class Block /// template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename FixedSegmentReturnType::Type segment(Index start, Index n = N) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) @@ -1302,7 +1302,7 @@ typename FixedSegmentReturnType::Type segment(Index start, Index n = N) /// This is the const version of segment(Index). template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ConstFixedSegmentReturnType::Type segment(Index start, Index n = N) const { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) @@ -1334,7 +1334,7 @@ typename FixedSegmentReturnType::Type head(Index n = N) /// This is the const version of head(). template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ConstFixedSegmentReturnType::Type head(Index n = N) const { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) @@ -1426,7 +1426,7 @@ subVector(Index i) /** This is the const version of subVector(Index) */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::conditional_t subVector(Index i) const { diff --git a/Eigen/src/plugins/CommonCwiseBinaryOps.h b/Eigen/src/plugins/CommonCwiseBinaryOps.h index 591902e28..2f503296f 100644 --- a/Eigen/src/plugins/CommonCwiseBinaryOps.h +++ b/Eigen/src/plugins/CommonCwiseBinaryOps.h @@ -38,7 +38,7 @@ EIGEN_MAKE_CWISE_BINARY_OP(operator+,sum) * \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct() */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other, const CustomBinaryOp& func = CustomBinaryOp()) const { diff --git a/Eigen/src/plugins/CommonCwiseUnaryOps.h b/Eigen/src/plugins/CommonCwiseUnaryOps.h index 3d525357e..390759cd0 100644 --- a/Eigen/src/plugins/CommonCwiseUnaryOps.h +++ b/Eigen/src/plugins/CommonCwiseUnaryOps.h @@ -40,7 +40,7 @@ typedef CwiseUnaryOp, const Derived> Negati /// EIGEN_DOC_UNARY_ADDONS(operator-,opposite) /// -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC inline const NegativeReturnType operator-() const { return NegativeReturnType(derived()); } @@ -57,7 +57,7 @@ EIGEN_DOC_UNARY_ADDONS(cast,conversion function) /// \sa class CwiseUnaryOp /// template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC typename CastXpr::Type cast() const { diff --git a/Eigen/src/plugins/MatrixCwiseBinaryOps.h b/Eigen/src/plugins/MatrixCwiseBinaryOps.h index 533383e3b..46fe08ce8 100644 --- a/Eigen/src/plugins/MatrixCwiseBinaryOps.h +++ b/Eigen/src/plugins/MatrixCwiseBinaryOps.h @@ -18,7 +18,7 @@ * \sa class CwiseBinaryOp, cwiseAbs2 */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,product) cwiseProduct(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other) const { @@ -38,7 +38,7 @@ cwiseProduct(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other) const * \sa cwiseNotEqual(), isApprox(), isMuchSmallerThan() */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC inline const CwiseBinaryOp, const Derived, const OtherDerived> cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other) const { @@ -58,7 +58,7 @@ cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other) const * \sa cwiseEqual(), isApprox(), isMuchSmallerThan() */ template -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC inline const CwiseBinaryOp, const Derived, const OtherDerived> cwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other) const { diff --git a/Eigen/src/plugins/MatrixCwiseUnaryOps.h b/Eigen/src/plugins/MatrixCwiseUnaryOps.h index dc578f634..98d925dd2 100644 --- a/Eigen/src/plugins/MatrixCwiseUnaryOps.h +++ b/Eigen/src/plugins/MatrixCwiseUnaryOps.h @@ -41,7 +41,7 @@ EIGEN_DOC_UNARY_ADDONS(cwiseAbs2,squared absolute value) /// /// \sa cwiseAbs() /// -EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseAbs2ReturnType cwiseAbs2() const { return CwiseAbs2ReturnType(derived()); } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7d6f9784e..8ffa0024f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -186,7 +186,6 @@ ei_add_test(packetmath "-DEIGEN_FAST_MATH=1") ei_add_test(vectorization_logic) ei_add_test(basicstuff) ei_add_test(constructor) -ei_add_test(compile_time_evaluation) ei_add_test(linearstructure) ei_add_test(integer_types) ei_add_test(unalignedcount) diff --git a/test/compile_time_evaluation.cpp b/test/compile_time_evaluation.cpp deleted file mode 100644 index 6ed0a4ae7..000000000 --- a/test/compile_time_evaluation.cpp +++ /dev/null @@ -1,288 +0,0 @@ -// main.h adds instrumentation which breaks constexpr so we do not run any tests in here, -// this is strictly compile-time. -#include -#include - -using namespace Eigen; - -template -struct AssertConstexpr {}; -#define assert_constexpr(expr) \ - do { \ - (void) AssertConstexpr<(expr, 1)>(); \ - } while (false) - -constexpr bool zeroSized() -{ - constexpr Matrix m0; - static_assert(m0.size() == 0, ""); - - constexpr Matrix m1; - static_assert(m0 == m1, ""); - static_assert(!(m0 != m1), ""); - - constexpr Array a0; - static_assert(a0.size() == 0, ""); - - constexpr Array a1; - static_assert((a0 == a1).all(), ""); - static_assert((a0 != a1).count() == 0, ""); - - constexpr Array af; - static_assert(m0 == af.matrix(), ""); - static_assert((m0.array() == af).all(), ""); - static_assert(m0.array().matrix() == m0, ""); - - return true; -} - -static_assert(zeroSized(), ""); - -static constexpr double static_data[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; - -constexpr bool maps() -{ - constexpr Map m(static_data); - static_assert(m(0) == 1, ""); - constexpr Map> a(static_data); - static_assert(m == a.matrix(), ""); - static_assert(m.size() == 4, ""); - static_assert(a.size() == 4, ""); - static_assert(m.rows() == 4 && m.cols() == 1, ""); - return true; -} - -static_assert(maps(), ""); - -constexpr bool nc_maps() -{ - bool result = true; - - double d[] = {1, 2, 3, 4}; - Map m(d); - result = result && (m.x() == 1 && m.y() == 2 && m.z() == 3 && m.w() == 4); - - float array[3] = {}; - auto v = Vector3f::Map(array); - v.fill(10); - result = result && (v.array() == 10).all(); - - return result; -} - -constexpr bool blocks() -{ - constexpr Map m(static_data); - constexpr auto block = m.block<2,1>(0, 1); - - constexpr Map v(static_data + 2); - static_assert(block == v, ""); - - return true; -} - -static_assert(blocks(), ""); - -constexpr bool diagonal_row_columns() -{ - constexpr Map m(static_data); - static_assert(m.block<2,1>(0, 1) == m.col(1), ""); - static_assert(m.block<1,2>(1, 0) == m.row(1), ""); - static_assert(m.diagonal()(0) == 1 && m.diagonal()(1) == 4, ""); - return true; -} - -static_assert(diagonal_row_columns(), ""); - -static constexpr int static_data_antisym[] = { - 0, 1, -1, - -1, 0, 1, - 1, -1, 0 }; - -constexpr bool transpose_unaryminus() -{ - constexpr Map> m(static_data_antisym); - - static_assert(m.transpose() == -m, ""); - static_assert(-m.transpose() == m, ""); - static_assert((-m).transpose() == m, ""); - - static_assert(m.transpose() != m, ""); - static_assert(-m.transpose() != -m, ""); - static_assert((-m).transpose() != -m, ""); - - return true; -} - -static_assert(transpose_unaryminus(), ""); - -constexpr bool reductions() -{ - constexpr Map> m(static_data_antisym); - static_assert(m.size() == 9, ""); - - return true; -} - -static_assert(reductions(), ""); - -constexpr bool scalar_mult_div() -{ - constexpr Map m(static_data); - - static_assert((m * 2)(0,0) == 2, ""); - static_assert((m / 2)(1,1) == 2*m(0,0), ""); - - constexpr double c = 8; - static_assert((m * c)(0,0) == 8, ""); - static_assert((m.array() / c).matrix() == 1/c * m, ""); - return true; -} - -static_assert(scalar_mult_div(), ""); - -constexpr bool constant_identity() -{ - static_assert(Matrix3f::Zero()(0,0) == 0, ""); - static_assert(Matrix4d::Ones()(3,3) == 1, ""); - static_assert(Matrix2i::Identity()(0,0) == 1 && Matrix2i::Identity()(1,0) == 0, ""); - static_assert(Matrix::Ones(2,3).size() == 6, ""); - static_assert(Matrix::Zero(10).rows() == 10, ""); - - return true; -} - -static_assert(constant_identity(), ""); - -constexpr bool dynamic_basics() -{ - // This verifies that we only calculate the entry that we need. - static_assert(Matrix::Identity(50000,50000).array()(25,25) == 1, ""); - - static_assert(Matrix4d::Identity().block(1,1,2,2)(0,1) == 0, ""); - static_assert(MatrixXf::Identity(50,50).transpose() == MatrixXf::Identity(50, 50), ""); - - constexpr Map dynMap(static_data_antisym, 3, 3); - constexpr Map staticMap(static_data_antisym); - static_assert(dynMap == staticMap, ""); - static_assert(dynMap.transpose() != staticMap, ""); - // e.g. this hits an assertion at compile-time that would otherwise fail at runtime. - //static_assert(dynMap != staticMap.block(1,2,0,0)); - - return true; -} - -static_assert(dynamic_basics(), ""); - -constexpr bool sums() -{ - constexpr Map> m(static_data); - constexpr auto b(m.block<2,2>(0,0)); // 1 2 5 6 - constexpr Map m2(static_data); // 1 2 3 4 - - static_assert((b + m2).col(0) == 2*Map(static_data), ""); - static_assert(b + m2 == m2 + b, ""); - - static_assert((b - m2).col(0) == Vector2d::Zero(), ""); - static_assert((b - m2).col(1) == 2*Vector2d::Ones(), ""); - - static_assert((2*b - m2).col(0) == b.col(0), ""); - static_assert((b - 2*m2).col(0) == -b.col(0), ""); - - static_assert((b - m2 + b + m2 - 2*b) == Matrix2d::Zero(), ""); - - return true; -} - -static_assert(sums(), ""); - -constexpr bool unit_vectors() -{ - static_assert(Vector4d::UnitX()(0) == 1, ""); - static_assert(Vector4d::UnitY()(1) == 1, ""); - static_assert(Vector4d::UnitZ()(2) == 1, ""); - static_assert(Vector4d::UnitW()(3) == 1, ""); - - static_assert(Vector4d::UnitX().dot(Vector4d::UnitX()) == 1, ""); - static_assert(Vector4d::UnitX().dot(Vector4d::UnitY()) == 0, ""); - static_assert((Vector4d::UnitX() + Vector4d::UnitZ()).dot(Vector4d::UnitY() + Vector4d::UnitW()) == 0, ""); - - return true; -} - -static_assert(unit_vectors(), ""); - -constexpr bool construct_from_other() -{ - return true; -} - -static_assert(construct_from_other(), ""); - -constexpr bool construct_from_values() -{ - return true; -} - -static_assert(construct_from_values(), ""); - -constexpr bool triangular() -{ - bool result = true; - - return result; -} - -static_assert(triangular(), ""); - -constexpr bool nc_construct_from_values() -{ - bool result = true; - - return result; -} - -constexpr bool nc_crossproduct() -{ - bool result = true; - return result; -} - -constexpr bool nc_cast() -{ - bool result = true; - - return result; -} - -constexpr bool nc_product() -{ - bool result = true; - return result; -} - -static constexpr double static_data_quat[] = { 0, 1, 1, 0 }; - -constexpr bool nc_quat_mult() -{ - bool result = static_data_quat[3] == 0; // Silence warning about unused with C++14 - - return result; -} - -// Run tests that aren't explicitly constexpr. -constexpr bool test_nc() -{ - assert_constexpr(nc_maps()); - assert_constexpr(nc_construct_from_values()); - assert_constexpr(nc_crossproduct()); - assert_constexpr(nc_cast()); - assert_constexpr(nc_product()); - assert_constexpr(nc_quat_mult()); - return true; -} - -int main() -{ - return !test_nc(); -}