ParallelLoop: A bit smarter straggler handling.

This commit is contained in:
Henrik Rydgård committed 2021-06-12 22:04:55 +02:00
1 parent 3be5c7bd9a
commit 5b64a41a97
4 files changed
+47 -21

No files matched your search

+2 -3
View File
@@ -32,11 +32,10 @@ public:
std::condition_variable cond_;
};
// Note that upper bounds are non-inclusive.
// This one never executes the remainer on the calling thread.
// Note that upper bounds are non-inclusive: range is [lower, upper)
WaitableCounter *ParallelRangeLoopWaitable(ThreadManager *threadMan, const std::function<void(int, int)> &loop, int lower, int upper, int minSize);
// This one optimizes by running the remainder on the calling thread.
// Note that upper bounds are non-inclusive: range is [lower, upper)
void ParallelRangeLoop(ThreadManager *threadMan, const std::function<void(int, int)> &loop, int lower, int upper, int minSize);
// Common utilities for large (!) memory copies.