6 // Deploy an application automatically, according to the global parameters
7 void MY_launch_application();
9 // Base class for deployment generators...
10 class deployment_generator {
12 deployment_generator();
14 size_t size() const { return hosts.size(); }
15 void set_load(int host, double load);
16 void set_neighbor(int host, int neighbor);
17 void set_link(int host1, int host2);
19 virtual void generate() = 0;
20 void distribute_load();
24 struct host_parameters {
25 host_parameters(): load(0.0) { }
28 std::vector<int> neighbors;
31 std::vector<host_parameters> hosts;
34 #define DEPLOYMENT(name) \
35 class deployment_ ## name: public deployment_generator { \
36 public: void generate(); \
49 #endif // !DEPLOYMENT_H