Growing collection of utilities for parallel computing. More...
Functions | |
| template<typename Iterator, typename Callback> | |
| auto | sourcemeta::core::parallel_for_each (Iterator first, Iterator last, Callback &&callback, const std::size_t parallelism=std::thread::hardware_concurrency(), const std::size_t stack_size_bytes=0) -> void |
Growing collection of utilities for parallel computing.
This functionality is included as follows:
| auto sourcemeta::core::parallel_for_each | ( | Iterator | first, |
| Iterator | last, | ||
| Callback && | callback, | ||
| const std::size_t | parallelism = std::thread::hardware_concurrency(), | ||
| const std::size_t | stack_size_bytes = 0 ) -> void |
Process a collection in parallel. If the parallelism is set to zero, the function will run using the available number of cores. If the stack size is set to zero, the platform default applies. For example: