From 7d1cedd0feef2088a7edfa23acb78401bad4a272 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 18 Nov 2015 17:17:44 -0800 Subject: [PATCH] Added numeric limits for unsigned integers --- Eigen/src/Core/util/Meta.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index a7e7555e9..e7fa2a1f1 100644 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -163,6 +163,15 @@ template<> struct numeric_limits EIGEN_DEVICE_FUNC static int (min)() { return INT_MIN; } }; +template<> struct numeric_limits +{ + EIGEN_DEVICE_FUNC + static unsigned int epsilon() { return 0; } + EIGEN_DEVICE_FUNC + static unsigned int (max)() { return UINT_MAX; } + EIGEN_DEVICE_FUNC + static unsigned int (min)() { return 0; } +}; template<> struct numeric_limits { EIGEN_DEVICE_FUNC @@ -172,6 +181,15 @@ template<> struct numeric_limits EIGEN_DEVICE_FUNC static long (min)() { return LONG_MIN; } }; +template<> struct numeric_limits +{ + EIGEN_DEVICE_FUNC + static unsigned long epsilon() { return 0; } + EIGEN_DEVICE_FUNC + static unsigned long (max)() { return ULONG_MAX; } + EIGEN_DEVICE_FUNC + static unsigned long (min)() { return 0; } +}; template<> struct numeric_limits { EIGEN_DEVICE_FUNC @@ -181,6 +199,15 @@ template<> struct numeric_limits EIGEN_DEVICE_FUNC static long long (min)() { return LLONG_MIN; } }; +template<> struct numeric_limits +{ + EIGEN_DEVICE_FUNC + static unsigned long long epsilon() { return 0; } + EIGEN_DEVICE_FUNC + static unsigned long long (max)() { return ULLONG_MAX; } + EIGEN_DEVICE_FUNC + static unsigned long long (min)() { return 0; } +}; }