Template Function quickpool::parallel_for_each¶
Defined in File quickpool.hxx
Function Documentation¶
-
template<typename Items, typename UnaryFunction>
inline void quickpool::parallel_for_each(Items &items, UnaryFunction &&f)¶
-
computes a iterator-based parallel for loop.
Waits until all tasks have finished, unless called from a thread that didn’t create the pool. If this is taken into account, parallel loops can be nested.
- Parameters
-
items – an object allowing for
std::begin()andstd::end().f – function to be applied as
f(*it)for the iterator in the range[begin, end)(the ‘loop body’).