aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2015-08-22 15:03:16 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2015-08-22 15:03:16 +0200
commit78358a72419482a8b58c2b0caa56ffa2aede995a (patch)
tree5ee3b2fec227eb3ce61785d8e4b17251d0ae9d20 /Eigen
parenta09cfe650fe56b181747af04d61548800da1f72b (diff)
. Missing } and unprotected min/max calls and definitions.
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/NumTraits.h3
-rw-r--r--Eigen/src/Core/util/Meta.h24
2 files changed, 14 insertions, 13 deletions
diff --git a/Eigen/src/Core/NumTraits.h b/Eigen/src/Core/NumTraits.h
index 4d60cf88b..61ec2f533 100644
--- a/Eigen/src/Core/NumTraits.h
+++ b/Eigen/src/Core/NumTraits.h
@@ -88,7 +88,7 @@ template<typename T> struct GenericNumTraits
EIGEN_DEVICE_FUNC
static inline T highest() {
#if defined(__CUDA_ARCH__)
- return internal::device::numeric_limits<T>::max();
+ return (internal::device::numeric_limits<T>::max)();
#else
return (std::numeric_limits<T>::max)();
#endif
@@ -101,6 +101,7 @@ template<typename T> struct GenericNumTraits
#else
return IsInteger ? (std::numeric_limits<T>::min)() : (-(std::numeric_limits<T>::max)());
#endif
+ }
};
template<typename T> struct NumTraits : GenericNumTraits<T>
diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h
index 152a0fd78..c6830991c 100644
--- a/Eigen/src/Core/util/Meta.h
+++ b/Eigen/src/Core/util/Meta.h
@@ -128,53 +128,53 @@ template<typename T> struct numeric_limits
{
EIGEN_DEVICE_FUNC
static T epsilon() { return 0; }
- static T max() { assert(false && "Highest not suppoted for this type"); }
- static T min() { assert(false && "Lowest not suppoted for this type"); }
+ static T (max)() { assert(false && "Highest not supported for this type"); }
+ static T (min)() { assert(false && "Lowest not supported for this type"); }
};
template<> struct numeric_limits<float>
{
EIGEN_DEVICE_FUNC
static float epsilon() { return __FLT_EPSILON__; }
EIGEN_DEVICE_FUNC
- static float max() { return CUDART_MAX_NORMAL_F; }
+ static float (max)() { return CUDART_MAX_NORMAL_F; }
EIGEN_DEVICE_FUNC
- static float min() { return __FLT_EPSILON__; }
+ static float (min)() { return __FLT_EPSILON__; }
};
template<> struct numeric_limits<double>
{
EIGEN_DEVICE_FUNC
static double epsilon() { return __DBL_EPSILON__; }
EIGEN_DEVICE_FUNC
- static double max() { return CUDART_INF; }
+ static double (max)() { return CUDART_INF; }
EIGEN_DEVICE_FUNC
- static double min() { return __DBL_EPSILON__; }
+ static double (min)() { return __DBL_EPSILON__; }
};
template<> struct numeric_limits<int>
{
EIGEN_DEVICE_FUNC
static int epsilon() { return 0; }
EIGEN_DEVICE_FUNC
- static int max() { return INT_MAX; }
+ static int (max)() { return INT_MAX; }
EIGEN_DEVICE_FUNC
- static int min() { return INT_MIN; }
+ static int (min)() { return INT_MIN; }
};
template<> struct numeric_limits<long>
{
EIGEN_DEVICE_FUNC
static long epsilon() { return 0; }
EIGEN_DEVICE_FUNC
- static long max() { return LONG_MAX; }
+ static long (max)() { return LONG_MAX; }
EIGEN_DEVICE_FUNC
- static long min() { return LONG_MIN; }
+ static long (min)() { return LONG_MIN; }
};
template<> struct numeric_limits<long long>
{
EIGEN_DEVICE_FUNC
static long long epsilon() { return 0; }
EIGEN_DEVICE_FUNC
- static long long max() { return LLONG_MAX; }
+ static long long (max)() { return LLONG_MAX; }
EIGEN_DEVICE_FUNC
- static long long min() { return LLONG_MIN; }
+ static long long (min)() { return LLONG_MIN; }
};
}