-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsandbox.cpp
50 lines (45 loc) · 940 Bytes
/
sandbox.cpp
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
47
48
49
50
#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>
struct s
{
hpx::lcos::future<float> next;
s()
{
this->next = hpx::lcos::make_ready_future((float)9.9);
}
void f()
{
this->next = hpx::lcos::make_ready_future((float)8.8);
}
float g()
{
return this->next.get();
}
};
int hpx_main()
{
s ob;
std::cout << ob.g() << "\n";
hpx::lcos::future<float> state = ob.next;
ob.f();
std::cout << ob.g() << "\n";
std::cout << state.get() << "\n";
return hpx::finalize();
}
int main(int argc, char* argv[])
{
hpx::init(argc,argv);
}