Slightly simplify ForkJoin code, and make sure the test is actually run.
This change contains two (breaking) functional/API changes:
- The task function passed to
ParallelFor
andParallelForAsync
must be a binary functorf(begin, end)
. -
ParallelForAsync
calls thedone()
functor exactly once when all tasks are completed. Calling it for every task could amount to a significant overhead in some cases.
This also fixes an out-of-bounds bug in the midpoint computation, caught by @wwkong .
Edited by Rasmus Munk Larsen