diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h b/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h index 3f7d26b18..c19edd07f 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h @@ -351,9 +351,9 @@ struct IndexPairList : internal::IndexTuple { namespace internal { template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t array_prod(const IndexList& sizes) { - size_t result = 1; - for (int i = 0; i < array_size >::value; ++i) { +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex array_prod(const IndexList& sizes) { + DenseIndex result = 1; + for (size_t i = 0; i < array_size >::value; ++i) { result *= sizes[i]; } return result;