subpar
Substitutable parallelization for C++ libraries
|
Parallelize across a range of tasks. More...
#include <limits>
#include <vector>
#include <stdexcept>
#include <thread>
#include <type_traits>
Go to the source code of this file.
Namespaces | |
namespace | subpar |
Substitutable parallelization functions. | |
Functions | |
template<typename Task_ > | |
int | subpar::sanitize_num_workers (int num_workers, Task_ num_tasks) |
Adjust the number of workers to the number of tasks in parallelize_range() . | |
template<bool nothrow_ = false, typename Task_ , class Run_ > | |
void | subpar::parallelize_range (int num_workers, Task_ num_tasks, Run_ run_task_range) |
Parallelize a range of tasks across multiple workers. | |
Parallelize across a range of tasks.