diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h b/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h index 7cdef6bc5..d1569d436 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h @@ -101,7 +101,7 @@ namespace { struct DividerHelper { static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE uint32_t computeMultiplier (const int log_div, const T divider) { EIGEN_STATIC_ASSERT(N == 32, YOU_MADE_A_PROGRAMMING_MISTAKE); - return (static_cast(1) << (N+log_div)) / divider - (static_cast(1) << N) + 1; + return static_cast((static_cast(1) << (N+log_div)) / divider - (static_cast(1) << N) + 1); } }; @@ -109,7 +109,7 @@ namespace { template struct DividerHelper<64, T> { static EIGEN_ALWAYS_INLINE uint64_t computeMultiplier(const int log_div, const T divider) { - return ((static_cast<__uint128_t>(1) << (64+log_div)) / static_cast<__uint128_t>(divider) - (static_cast<__uint128_t>(1) << 64) + 1); + return static_cast((static_cast<__uint128_t>(1) << (64+log_div)) / static_cast<__uint128_t>(divider) - (static_cast<__uint128_t>(1) << 64) + 1); } }; #endif