HPX - High Performance ParalleX

PrevUpHomeNext

Macro HPX_REGISTER_PLAIN_ACTION

HPX_REGISTER_PLAIN_ACTION — Registers an existing free function as a plain action with HPX.

Synopsis

// In header: <hpx/runtime/actions/plain_action.hpp>

HPX_REGISTER_PLAIN_ACTION(...)

Description

The macro HPX_REGISTER_PLAIN_ACTION can be used to register an existing free function as a plain action. It additionally defines an action type named action_type.

The parameter action_type is the name of the action type to register with HPX.

Example: 

namespace app
{
    void some_global_function(double d)
    {
        cout << d;
    }

    // This will define the action type 'app::some_global_action' which
    // represents the function 'app::some_global_function'.
    HPX_DEFINE_PLAIN_ACTION(some_global_function, some_global_action);
}

// The following macro expands to a series of definitions of global objects
// which are needed for proper serialization and initialization support
// enabling the remote invocation of the function `app::some_global_function`.
//
// The second argument used has to be the same as used for the
// HPX_DEFINE_PLAIN_ACTION above.
HPX_REGISTER_PLAIN_ACTION(app::some_global_action, some_global_action);
[Note] Note

Usually this macro will not be used in user code unless the intend is to avoid defining the action_type in global namespace. Normally, the use of the macro HPX_PLAIN_ACTION is recommend.


PrevUpHomeNext