mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Get rid of initialization logic for blueNorm by making the computed constants static const or constexpr.
Move macro definition EIGEN_CONSTEXPR to Core and make all methods in NumTraits constexpr when EIGEN_HASH_CONSTEXPR is 1.
This commit is contained in:
@@ -75,10 +75,10 @@ template<Index n> struct NumTraits<type2index<n> >
|
||||
MulCost = 1
|
||||
};
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Real epsilon() { return 0; }
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Real dummy_precision() { return 0; }
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Real highest() { return n; }
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Real lowest() { return n; }
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR EIGEN_STRONG_INLINE Real epsilon() { return 0; }
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR EIGEN_STRONG_INLINE Real dummy_precision() { return 0; }
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR EIGEN_STRONG_INLINE Real highest() { return n; }
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR EIGEN_STRONG_INLINE Real lowest() { return n; }
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
|
||||
@@ -44,13 +44,6 @@
|
||||
typename internal::enable_if< ( __condition__ ) , int >::type = 0
|
||||
|
||||
|
||||
#if EIGEN_HAS_CONSTEXPR
|
||||
#define EIGEN_CONSTEXPR constexpr
|
||||
#else
|
||||
#define EIGEN_CONSTEXPR
|
||||
#endif
|
||||
|
||||
|
||||
#if EIGEN_OS_WIN || EIGEN_OS_WIN64
|
||||
#define EIGEN_SLEEP(n) Sleep(n)
|
||||
#elif EIGEN_OS_GNULINUX
|
||||
|
||||
Reference in New Issue
Block a user