diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-11-18 17:17:44 -0800 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-11-18 17:17:44 -0800 |
commit | 7d1cedd0feef2088a7edfa23acb78401bad4a272 (patch) | |
tree | 93cdb7b46eb5a05a57b6590ec80458254f17e6b7 /Eigen/src/Core/util/Meta.h | |
parent | 199499910525b41f33be6034be164292d7d9d853 (diff) |
Added numeric limits for unsigned integers
Diffstat (limited to 'Eigen/src/Core/util/Meta.h')
-rw-r--r-- | Eigen/src/Core/util/Meta.h | 27 |
1 files changed, 27 insertions, 0 deletions
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<int> EIGEN_DEVICE_FUNC static int (min)() { return INT_MIN; } }; +template<> struct numeric_limits<unsigned int> +{ + 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<long> { EIGEN_DEVICE_FUNC @@ -172,6 +181,15 @@ template<> struct numeric_limits<long> EIGEN_DEVICE_FUNC static long (min)() { return LONG_MIN; } }; +template<> struct numeric_limits<unsigned long> +{ + 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<long long> { EIGEN_DEVICE_FUNC @@ -181,6 +199,15 @@ template<> struct numeric_limits<long long> EIGEN_DEVICE_FUNC static long long (min)() { return LLONG_MIN; } }; +template<> struct numeric_limits<unsigned long long> +{ + 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; } +}; } |