diff options
author | 2015-02-28 08:02:02 -0800 | |
---|---|---|
committer | 2015-02-28 08:02:02 -0800 | |
commit | ae73859a0aabb389be20df4106fd541c7942bcde (patch) | |
tree | 55c6f0c056d44fda92f6b3b6fde20f09acb9c790 /unsupported/Eigen | |
parent | 131449298f122315ea98e7a1750234dc4edb9a6a (diff) |
Fixed incorrect assertion
Diffstat (limited to 'unsupported/Eigen')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h b/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h index b85f45d90..1974252cf 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h @@ -73,7 +73,7 @@ struct TensorIntDivisor { EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T divide(const T numerator) const { const int N = 32; eigen_assert(numerator >= 0); - eigen_assert(numerator <= static_cast<T>(1ull<<N) - 1); + eigen_assert(static_cast<unsigned long long>(numerator) <= (1ull<<N) - 1); uint32_t t1 = (multiplier * numerator) >> 32; uint32_t t = (static_cast<uint32_t>(numerator) - t1) >> shift1; |