-
Notifications
You must be signed in to change notification settings - Fork 0
/
sandbox.hpp
47 lines (38 loc) · 1.15 KB
/
sandbox.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <cmath>
#include <hpx/hpx_init.hpp>
#include <hpx/include/actions.hpp>
#include <hpx/include/util.hpp>
#include <hpx/include/lcos.hpp>
#include <hpx/util/unwrapped.hpp>
#include <hpx/include/iostreams.hpp>
#include <hpx/runtime/actions/action_support.hpp>
#include <hpx/include/components.hpp>
#include <hpx/hpx_fwd.hpp>
#include <hpx/include/serialization.hpp>
HPX_REGISTER_COMPONENT_MODULE();
namespace app
{
struct HPX_COMPONENT_EXPORT
some_component
: hpx::components::managed_component_base<some_component>
{
int val;
some_component(): val(0)
{}
void increment()
{
this->val++;
}
// This will define the action type 'some_member_action' which
// represents the member function 'some_member_function' of the
// obect type 'some_component'.
HPX_DEFINE_COMPONENT_ACTION(some_component,increment,increment_action);
};
}
// Note: The second arguments to the macro below have to be systemwide-unique
// C++ identifiers
HPX_REGISTER_ACTION_DECLARATION(app::some_component::increment_action);