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
ParallelForandParallelForAsyncmust be a binary functorf(begin, end). -
ParallelForAsynccalls 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