Skip to content

Commit

Permalink
fix direction of comparison
Browse files Browse the repository at this point in the history
tbb::global control restricts pool size, not the other way around
  • Loading branch information
xvallspl committed Jan 7, 2021
1 parent ca8b5ed commit 7c21c51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/imt/src/TThreadExecutor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ TThreadExecutor::TThreadExecutor(UInt_t nThreads)
void TThreadExecutor::ParallelFor(unsigned int start, unsigned int end, unsigned step,
const std::function<void(unsigned int i)> &f)
{
if (GetPoolSize() < tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism)) {
if (GetPoolSize() > tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism)) {
Warning("TThreadExecutor::ParallelFor",
"tbb::global_control is limiting the number of parallel workers."
" Proceeding with %ld threads this time",
Expand All @@ -177,7 +177,7 @@ void TThreadExecutor::ParallelFor(unsigned int start, unsigned int end, unsigned
double TThreadExecutor::ParallelReduce(const std::vector<double> &objs,
const std::function<double(double a, double b)> &redfunc)
{
if (GetPoolSize() < tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism)) {
if (GetPoolSize() > tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism)) {
Warning("TThreadExecutor::ParallelReduce",
"tbb::global_control is limiting the number of parallel workers."
" Proceeding with %ld threads this time",
Expand Down

0 comments on commit 7c21c51

Please sign in to comment.