diff options
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h b/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h index 7f79ac30d..195267ce8 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h @@ -177,7 +177,8 @@ class TensorCostModel { double threads = (cost - kStartupCycles) / kPerThreadCycles + 0.9; // Make sure we don't invoke undefined behavior when we convert to an int. threads = numext::mini<double>(threads, GenericNumTraits<int>::highest()); - return numext::mini(max_threads, numext::maxi<int>(1, threads)); + return numext::mini(max_threads, + numext::maxi<int>(1, static_cast<int>(threads))); } // taskSize assesses parallel task size. |