diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2018-09-28 12:00:08 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2018-09-28 12:00:08 -0700 |
commit | 104e8fa0747c4b53e0fbc4aacdd5de54cc861192 (patch) | |
tree | 43d5d1359ba5a1f26cc14439c2a588ca953fbf82 /unsupported/Eigen/CXX11 | |
parent | 7c1b47840a254b2d207df038760dbec4ec16212c (diff) |
Fix a few warnings and rename a variable to not shadow "last".
Diffstat (limited to 'unsupported/Eigen/CXX11')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h index c492e7886..42c6ae528 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h @@ -791,19 +791,19 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT // The underlying GEMM kernel assumes that k is a multiple of 8 and // subtle breakage occurs if this is violated. Index block_size = 8 * divup<Index>(k, 8 * num_threads); - int num_blocks = internal::convert_index<int>(divup<Index>(k, block_size)); + Index num_blocks = divup<Index>(k, block_size); // we use 'result' for the first block's partial result. MaxSizeVector<Scalar*> block_buffers(num_blocks - 1); Barrier barrier(num_blocks); - auto process_block = [=, &barrier](Scalar* buf, Index first, Index last) { + auto process_block = [=, &barrier](Scalar* buf, Index begin, Index end) { ::memset(buf, 0, m * n * sizeof(Scalar)); TENSOR_CONTRACTION_DISPATCH( this->template evalGemmPartialWithoutOutputKernel, Alignment, - (buf, first, last, this->m_device.numThreads())); + (buf, begin, end, this->m_device.numThreads())); barrier.Notify(); }; Index start = 0; - for (int blocks_left = num_blocks; blocks_left > 0; --blocks_left) { + for (Index blocks_left = num_blocks; blocks_left > 0; --blocks_left) { // The underlying GEMM kernel assumes that k is a multiple of packet size // (currently largest packet size is 8) and subtle breakage occurs if // this is violated. |