diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-03-23 16:40:36 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-03-23 16:40:36 -0700 |
commit | 92693b50eb09cdaeecb830a06df6d6c67a369477 (patch) | |
tree | 50d574a109ff98f538883a21c579ca56a17761a8 /unsupported/Eigen/CXX11/src/Tensor | |
parent | 9bc9396e88789e86647227353e10d90d5316fa98 (diff) |
Fixed compilation warning
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h | 2 | ||||
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h b/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h index 6bbf235cc..f71625ae5 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h @@ -125,7 +125,7 @@ class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable> int blocksz = std::ceil<int>(static_cast<float>(size)/device.numThreads()) + PacketSize - 1; const Index blocksize = numext::maxi<Index>(PacketSize, (blocksz - (blocksz % PacketSize))); - const Index numblocks = size / blocksize; + const unsigned int numblocks = static_cast<unsigned int>(size / blocksize); Barrier barrier(numblocks); for (int i = 0; i < numblocks; ++i) { diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h index 489451215..0ce2517d6 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h @@ -253,7 +253,7 @@ struct FullReducer<Self, Op, ThreadPoolDevice, false> { return; } else { const Index blocksize = std::floor<Index>(static_cast<float>(num_coeffs) / num_threads); - const Index numblocks = blocksize > 0 ? num_coeffs / blocksize : 0; + const unsigned int numblocks = blocksize > 0 ? static_cast<unsigned int>(num_coeffs / blocksize) : 0; eigen_assert(num_coeffs >= numblocks * blocksize); Barrier barrier(numblocks); @@ -300,7 +300,7 @@ struct FullReducer<Self, Op, ThreadPoolDevice, true> { return; } const Index blocksize = std::floor<Index>(static_cast<float>(num_coeffs) / num_threads); - const Index numblocks = blocksize > 0 ? num_coeffs / blocksize : 0; + const unsigned int numblocks = blocksize > 0 ? static_cast<unsigned int>(num_coeffs / blocksize) : 0; eigen_assert(num_coeffs >= numblocks * blocksize); Barrier barrier(numblocks); |