hpx::experimental::define_task_block_restore_thread#
Defined in header hpx/task_block.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
See also:
-
template<typename ExPolicy, typename F>
hpx::parallel::util::detail::algorithm_result_t<ExPolicy> hpx::experimental::define_task_block_restore_thread(ExPolicy &&policy, F &&f)# Constructs a task_block, tr, and invokes the expression f(tr) on the user-provided object, f.
Postcondition: All tasks spawned from f have finished execution. A call to define_task_block_restore_thread always returns on the same thread as that on which it was called.
Note
It is expected (but not mandated) that f will (directly or indirectly) call tr.run(callable_object).
- Template Parameters:
ExPolicy – The type of the execution policy to use (deduced). It describes the manner in which the execution of the task block may be parallelized.
F – The type of the user defined function to invoke inside the define_task_block (deduced). F shall be MoveConstructible.
- Parameters:
policy – The execution policy to use for the scheduling of the iterations.
f – The user defined function to invoke inside the define_task_block. Given an lvalue tr of type task_block, the expression, (void)f(tr), shall be well-formed.
- Throws:
exception_list – specified in Exception Handling.
-
template<typename F>
void hpx::experimental::define_task_block_restore_thread(F &&f)# Constructs a task_block, tr, and invokes the expression f(tr) on the user-provided object, f. This version uses parallel_policy for task scheduling.
Postcondition: All tasks spawned from f have finished execution. A call to define_task_block_restore_thread always returns on the same thread as that on which it was called.
Note
It is expected (but not mandated) that f will (directly or indirectly) call tr.run(callable_object).
- Template Parameters:
F – The type of the user defined function to invoke inside the define_task_block (deduced). F shall be MoveConstructible.
- Parameters:
f – The user defined function to invoke inside the define_task_block. Given an lvalue tr of type task_block, the expression, (void)f(tr), shall be well-formed.
- Throws:
exception_list – specified in Exception Handling.