diff options
author | vanhoucke <vanhoucke@google.com> | 2015-06-19 15:46:46 +0000 |
---|---|---|
committer | vanhoucke <vanhoucke@google.com> | 2015-06-19 15:46:46 +0000 |
commit | 4cc0c961f3fdec9d47a9cc81ff85bbe340945478 (patch) | |
tree | 26cea97bd1a9575499eb0667ee53f1447270e5f4 /unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h | |
parent | e9edb085c0d0d2a900f630b3345408f29ff032bd (diff) |
Fix undefined behavior.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h')
-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 108c45a32..1de6ce3b4 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h @@ -58,7 +58,7 @@ struct TensorIntDivisor { EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorIntDivisor(const T divider) { const int N = 32; eigen_assert(divider > 0); - eigen_assert(divider <= (1<<(N-1)) - 1); + eigen_assert(divider <= (1U<<(N-1)) - 1); // fast ln2 const int leading_zeros = count_leading_zeros(divider); |