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(...)

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);
}
[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.

The macro HPX_DEFINE_PLAIN_ACTION can be used with 1 or 2 arguments. The second argument is optional. The default value for the second argument (the typename of the defined action) is derived from the name of the function (as passed as the first argument) by appending '_action'. The second argument can be omitted only if the first argument with an appended suffix '_action' resolves to a valid, unqualified C++ type name.


PrevUpHomeNext