diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h index d68409e26..e06099957 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h @@ -879,7 +879,8 @@ struct TensorEvaluator> l0_state(l0_ranges); for (int i = 0; i < l0_ranges; ++i) { - l0_state.emplace_back(actual_range_size(l0_ranges, l0_size, i)); + const Index num_pending_tasks = actual_range_size(l0_ranges, l0_size, i); + l0_state.emplace_back(internal::convert_index(num_pending_tasks)); } MaxSizeVector block_buffers(num_blocks);