mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix Wshorten-64-to-32 warnings in div_ceil
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
1aac9332ce
commit
6f9ad7da61
@@ -373,7 +373,7 @@ struct ThreadPoolDevice {
|
||||
// computations:
|
||||
double max_efficiency =
|
||||
static_cast<double>(block_count) /
|
||||
(numext::div_ceil<int>(block_count, numThreads()) * numThreads());
|
||||
(numext::div_ceil<Index>(block_count, numThreads()) * numThreads());
|
||||
|
||||
// Now try to increase block size up to max_block_size as long as it
|
||||
// doesn't decrease parallel efficiency.
|
||||
@@ -396,7 +396,7 @@ struct ThreadPoolDevice {
|
||||
prev_block_count = coarser_block_count;
|
||||
const double coarser_efficiency =
|
||||
static_cast<double>(coarser_block_count) /
|
||||
(numext::div_ceil<int>(coarser_block_count, numThreads()) * numThreads());
|
||||
(numext::div_ceil<Index>(coarser_block_count, numThreads()) * numThreads());
|
||||
if (coarser_efficiency + 0.01 >= max_efficiency) {
|
||||
// Taking it.
|
||||
block_size = coarser_block_size;
|
||||
|
||||
Reference in New Issue
Block a user