diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h index 8e4c7c11d..cf1352a31 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h @@ -198,8 +198,10 @@ struct TensorEvaluator kernel_promises(num_kernel_promises); + std::vector kernel_futures(num_kernel_promises); for (int i = 0; i < kernel_promises.size(); ++i) { kernel_promises[i].set_value(); + kernel_futures[i] = kernel_promises[i].get_future(); } for (Index k_block_idx = 0; k_block_idx < k_blocks; k_block_idx++) { @@ -218,8 +220,9 @@ struct TensorEvaluatorready()); } -static EIGEN_STRONG_INLINE void wait_until_ready(Promise* p) { - p->get_future().wait(); - // eigen_assert(p->get_future().ready()); -} - struct ThreadPoolDevice { ThreadPoolDevice(/*ThreadPool* pool, */size_t num_cores) : num_threads_(num_cores) { }