HPX - High Performance ParalleX

PrevUpHomeNext

Function template task_region

hpx::parallel::v2::task_region

Synopsis

// In header: <hpx/parallel/task_region.hpp>


template<typename F> void task_region(F && f);

Description

Constructs a task_region_handle, 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 task_region may return on a different thread than that on which it was called.

[Note] Note

It is expected (but not mandated) that f will (directly or indirectly) call tr.run(callable_object).

Parameters:

f

The user defined function to invoke inside the task_region. Given an lvalue tr of type task_region_handle, the expression, (void)f(tr), shall be well-formed.

Template Parameters:

F

The type of the user defined function to invoke inside the task_region (deduced). F shall be MoveConstructible.

Throws:

An exception_list, as specified in Exception Handling.

PrevUpHomeNext