Template Function sequant::parallel_do¶
Defined in File runtime.hpp
Function Documentation¶
-
template<typename Lambda>
void sequant::parallel_do(Lambda &&lambda)¶ Fires off
nthreadsinstances of lambda in parallel, each in its own thread (thusnthreads-1std::thread objects are created), wherenthreadsis the value returned by get_num_threads() .See also
get_num_threads()
- Template Parameters:
Lambda – a function type for which
Lambda(int)is valid- Parameters:
lambda – the function object to execute, each will be invoked as
lambda(thread_id)wherethread_idis an integer in[0,nthreads) .