HPX - High Performance ParalleX

PrevUpHomeNext

Action Invocation

Applying an Action Asynchronously without any Synchronization
Applying an Action Asynchronously with Synchronization
Applying an Action Synchronously
Applying an Action with a Continuation but without any Synchronization
Applying an Action with a Continuation and with Synchronization
Comparing Actions with C++ Functions

The process of invoking a global function (or a member function of an object) with the help of the associated action is called 'applying the action'. Actions can have arguments, which will be supplied while the action is applied. At the minimum, one parameter is required to apply any action - the id of the locality the associated function should be invoked on (for global functions), or the id of the component instance (for member functions). Generally, HPX provides several ways to apply an action, all of which are described in the following sections.

HPX allows the user to apply actions with a syntax similar to the C++ standard. In fact, all action types have an overloaded function operator allowing to synchronously apply the action. Further, HPX implements hpx::async, which semantically works similar to the way std::async works for plain C++ function.

[Note] Note

The similarity of applying an action to conventional function invocations extends even further. HPX implements hpx::bind and hpx::function: two facilities which are semantically equivalent to the std::bind and std::function types as defined by the C++11 Standard. While hpx::async extends beyond the conventional semantics by supporting actions and conventional C++ functions, the HPX facilities hpx::bind and hpx::function extend beyond the conventional standard facilities too. The HPX facilities not only support conventional functions, but can be used for actions as well.

Additionally, HPX exposes hpx::apply and hpx::async_continue, both of which refine and extend the standard C++ facilities.


PrevUpHomeNext