HPX - High Performance ParalleX

PrevUpHomeNext

Macro HPX_DEFINE_PLAIN_ACTION

HPX_DEFINE_PLAIN_ACTION — Defines a plain action type.

Synopsis

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

HPX_DEFINE_PLAIN_ACTION(func, name)

Description

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