diff --git a/Eigen/src/Core/CoreIterators.h b/Eigen/src/Core/CoreIterators.h index f62cf238e..314372686 100644 --- a/Eigen/src/Core/CoreIterators.h +++ b/Eigen/src/Core/CoreIterators.h @@ -57,7 +57,7 @@ class InnerIterator { m_iter.operator+=(i); return *this; } - EIGEN_STRONG_INLINE InnerIterator operator+(Index i) { + EIGEN_STRONG_INLINE InnerIterator operator+(Index i) const { InnerIterator result(*this); result += i; return result; diff --git a/Eigen/src/Core/FindCoeff.h b/Eigen/src/Core/FindCoeff.h index 0102e8af3..1c07260ba 100644 --- a/Eigen/src/Core/FindCoeff.h +++ b/Eigen/src/Core/FindCoeff.h @@ -34,11 +34,11 @@ struct max_coeff_functor { template struct max_coeff_functor { - EIGEN_DEVICE_FUNC inline Scalar compareCoeff(const Scalar& incumbent, const Scalar& candidate) { + EIGEN_DEVICE_FUNC inline Scalar compareCoeff(const Scalar& incumbent, const Scalar& candidate) const { return (candidate > incumbent) || ((candidate != candidate) && (incumbent == incumbent)); } template - EIGEN_DEVICE_FUNC inline Packet comparePacket(const Packet& incumbent, const Packet& candidate) { + EIGEN_DEVICE_FUNC inline Packet comparePacket(const Packet& incumbent, const Packet& candidate) const { return pandnot(pcmp_lt_or_nan(incumbent, candidate), pisnan(incumbent)); } template @@ -79,11 +79,11 @@ struct min_coeff_functor { template struct min_coeff_functor { - EIGEN_DEVICE_FUNC inline Scalar compareCoeff(const Scalar& incumbent, const Scalar& candidate) { + EIGEN_DEVICE_FUNC inline Scalar compareCoeff(const Scalar& incumbent, const Scalar& candidate) const { return (candidate < incumbent) || ((candidate != candidate) && (incumbent == incumbent)); } template - EIGEN_DEVICE_FUNC inline Packet comparePacket(const Packet& incumbent, const Packet& candidate) { + EIGEN_DEVICE_FUNC inline Packet comparePacket(const Packet& incumbent, const Packet& candidate) const { return pandnot(pcmp_lt_or_nan(candidate, incumbent), pisnan(incumbent)); } template diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h index 52a8eca53..33b62c202 100644 --- a/Eigen/src/Core/Map.h +++ b/Eigen/src/Core/Map.h @@ -100,7 +100,7 @@ class Map : public MapBase > { typedef typename Base::PointerType PointerType; typedef PointerType PointerArgType; - EIGEN_DEVICE_FUNC constexpr inline PointerType cast_to_pointer_type(PointerArgType ptr) { return ptr; } + EIGEN_DEVICE_FUNC constexpr inline PointerType cast_to_pointer_type(PointerArgType ptr) const { return ptr; } EIGEN_DEVICE_FUNC constexpr Index innerStride() const { return StrideType::InnerStrideAtCompileTime != 0 ? m_stride.inner() : 1;