Fixed compilation warning

This commit is contained in:
Benoit Steiner 2016-03-23 16:40:36 -07:00
parent 9bc9396e88
commit 92693b50eb
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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);