Wouldn’t it be useful to have at least these 3 algorithms available with thread parallel implementations in JUCE :
- parallel_for_each. Just conveniently goes through a container’s elements.
- parallel_for. for loop with an integer index.
- parallel_reduce. Reduces a container to a single value, starting from a given initial value, using some operation to combine the elements. (std::accumulate is the C++ standard library equivalent of this.)
Microsoft’s PPL has these and these probably can be made with help from Apple’s Grand Central Dispatch functions too, but a cross platform solution available from JUCE would be nice…(I realize that the C++ standard library itself is in the works to have parallel versions of some its algorithms but of course it will take time before those new versions are available for every platform…)