From 4cc0c961f3fdec9d47a9cc81ff85bbe340945478 Mon Sep 17 00:00:00 2001 From: vanhoucke Date: Fri, 19 Jun 2015 15:46:46 +0000 Subject: Fix undefined behavior. --- unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h') 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); -- cgit v1.2.3