From 5f0b4a4010af4cbf6161a0d1a03a747addc44a5d Mon Sep 17 00:00:00 2001 From: David Tellenbach Date: Fri, 5 Mar 2021 13:16:43 +0100 Subject: Revert "Adds EIGEN_CONSTEXPR and EIGEN_NOEXCEPT to rows(), cols(), innerStride(), outerStride(), and size()" This reverts commit 6cbb3038ac48cb5fe17eba4dfbf26e3e798041f1 because it breaks clang-10 builds on x86 and aarch64 when C++11 is enabled. --- Eigen/src/Core/util/Meta.h | 68 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'Eigen/src/Core/util/Meta.h') diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index 85d35fc4e..cad57c3a4 100755 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -286,7 +286,7 @@ namespace device { template struct numeric_limits { EIGEN_DEVICE_FUNC - static EIGEN_CONSTEXPR T epsilon() { return 0; } + static T epsilon() { return 0; } static T (max)() { assert(false && "Highest not supported for this type"); } static T (min)() { assert(false && "Lowest not supported for this type"); } static T infinity() { assert(false && "Infinity not supported for this type"); } @@ -294,9 +294,9 @@ template struct numeric_limits }; template<> struct numeric_limits { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static float epsilon() { return __FLT_EPSILON__; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static float (max)() { #if defined(EIGEN_CUDA_ARCH) return CUDART_MAX_NORMAL_F; @@ -304,9 +304,9 @@ template<> struct numeric_limits return HIPRT_MAX_NORMAL_F; #endif } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static float (min)() { return FLT_MIN; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static float infinity() { #if defined(EIGEN_CUDA_ARCH) return CUDART_INF_F; @@ -314,7 +314,7 @@ template<> struct numeric_limits return HIPRT_INF_F; #endif } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static float quiet_NaN() { #if defined(EIGEN_CUDA_ARCH) return CUDART_NAN_F; @@ -325,13 +325,13 @@ template<> struct numeric_limits }; template<> struct numeric_limits { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static double epsilon() { return __DBL_EPSILON__; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static double (max)() { return DBL_MAX; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static double (min)() { return DBL_MIN; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static double infinity() { #if defined(EIGEN_CUDA_ARCH) return CUDART_INF; @@ -339,7 +339,7 @@ template<> struct numeric_limits return HIPRT_INF; #endif } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static double quiet_NaN() { #if defined(EIGEN_CUDA_ARCH) return CUDART_NAN; @@ -350,65 +350,65 @@ template<> struct numeric_limits }; template<> struct numeric_limits { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static int epsilon() { return 0; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static int (max)() { return INT_MAX; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static int (min)() { return INT_MIN; } }; template<> struct numeric_limits { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static unsigned int epsilon() { return 0; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static unsigned int (max)() { return UINT_MAX; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static unsigned int (min)() { return 0; } }; template<> struct numeric_limits { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static long epsilon() { return 0; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static long (max)() { return LONG_MAX; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static long (min)() { return LONG_MIN; } }; template<> struct numeric_limits { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static unsigned long epsilon() { return 0; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static unsigned long (max)() { return ULONG_MAX; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static unsigned long (min)() { return 0; } }; template<> struct numeric_limits { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static long long epsilon() { return 0; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static long long (max)() { return LLONG_MAX; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static long long (min)() { return LLONG_MIN; } }; template<> struct numeric_limits { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static unsigned long long epsilon() { return 0; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static unsigned long long (max)() { return ULLONG_MAX; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static unsigned long long (min)() { return 0; } }; template<> struct numeric_limits { - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static bool epsilon() { return false; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static bool (max)() { return true; } - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR + EIGEN_DEVICE_FUNC static bool (min)() { return false; } }; @@ -476,10 +476,10 @@ template struct array_size > { * */ template -EIGEN_CONSTEXPR Index size(const T& x) { return x.size(); } +Index size(const T& x) { return x.size(); } template -EIGEN_CONSTEXPR Index size(const T (&) [N]) { return N; } +Index size(const T (&) [N]) { return N; } /** \internal * Convenient struct to get the result type of a nullary, unary, binary, or -- cgit v1.2.3