hpx::experimental::define_task_block

hpx::experimental::define_task_block#

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:

Warning

doxygenfunction: Unable to resolve function “hpx::experimental::define_task_block” with arguments (ExPolicy&&, F&&) in doxygen xml output for project “hpx” from directory: ../hpx_autodoc. Potential matches:

- template<typename ExPolicy, typename F> decltype(auto) define_task_block(ExPolicy &&policy, F &&f)
- template<typename F> void define_task_block(F &&f)
template<typename F>
void hpx::experimental::define_task_block(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 may return on a different thread than 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 task block. Given a lvalue tr of type task_block, the expression, (void)f(tr), shall be well-formed.

Throws:

exception_list – specified in Exception Handling.