From 6e77f9bef35012f160b307bdeae73194fde91e51 Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Wed, 28 Aug 2019 10:32:19 -0700 Subject: Remove shadow warnings in TensorDeviceThreadPool --- unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h index ca2794cb5..edb0b3e25 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h @@ -90,7 +90,6 @@ struct ThreadPoolDevice { // CPU cycles due to the threads competing for memory bandwidth, so we // statically schedule at most 4 block copies here. const size_t kMinBlockSize = 32768; - typedef TensorCostModel CostModel; const size_t num_threads = CostModel::numThreads(n, TensorOpCost(1.0, 1.0, 0), 4); if (n <= kMinBlockSize || num_threads < 2) { ::memcpy(dst, src, n); @@ -302,9 +301,12 @@ struct ThreadPoolDevice { // For parallelForAsync we must keep passed in closures on the heap, and // delete them only after `done` callback finished. struct ParallelForAsyncContext { - ParallelForAsyncContext(Index count, std::function f, - std::function done) - : count(count), f(std::move(f)), done(std::move(done)) {} + ParallelForAsyncContext(Index block_count, + std::function block_f, + std::function done_callback) + : count(block_count), + f(std::move(block_f)), + done(std::move(done_callback)) {} std::atomic count; std::function f; -- cgit v1.2.3