Unify std::numeric_limits and device::numeric_limits within numext namespace

This commit is contained in:
Gael Guennebaud
2016-01-22 15:02:21 +01:00
parent 7b68cf2e0f
commit 06971223ef
2 changed files with 9 additions and 15 deletions

View File

@@ -375,6 +375,12 @@ template<typename T> EIGEN_DEVICE_FUNC void swap(T &a, T &b) { T tmp = b; b =
template<typename T> EIGEN_STRONG_INLINE void swap(T &a, T &b) { std::swap(a,b); }
#endif
#if defined(__CUDA_ARCH__)
using internal::device::numeric_limits;
#else
using std::numeric_limits;
#endif
// Integer division with rounding up.
// T is assumed to be an integer type with a>=0, and b>0
template<typename T>