Parallel

template<typename FuncType, typename ...Args>
auto parallelMap(FuncType &&function, Args&&... inputs)

Executes a function in parallel.

Parameters
  • function[in] A function pointer to execute in parallel

  • ...inputs[in] variadic arguments of iterable/indexable containers, such as std::vectors, i.e. vector<T1>, vector<T2>,.... Types must match the input types of function exactly, i.e. function must take arguments T1, T2,....

Returns

a vector of type T where T is the type of the output type of function. If the given function returns void, the return type is void.