]> AND Private Git Repository - loba.git/blob - options.h
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Ongoing work on process logic...
[loba.git] / options.h
1 #ifndef OPTIONS_H
2 #define OPTIONS_H
3
4 #include <string>
5 #include "cost_func.h"
6 #include "deployment.h"
7 #include "named_object_list.h"
8 #include "process.h"
9
10 // Global parameters, shared by all the processes
11 namespace opt {
12
13     // Global options
14     extern std::string program_name;
15     extern int help_requested;
16     extern bool version_requested;
17
18     // Simulation parameters
19     extern unsigned log_rate;
20
21     // Platform and deployment
22     extern std::string platform_file;
23     extern std::string deployment_file;
24
25     // Automatic deployment
26     namespace auto_depl {
27         extern bool        enabled;
28         extern std::string topology;
29         extern unsigned    nhosts;
30         extern double      load;
31     }
32
33     // Load balancing algorithm
34     extern std::string loba_algo;
35     extern bool bookkeeping;
36
37     // Application parameters
38     extern cost_func comp_cost;
39     extern cost_func comm_cost;
40     extern unsigned maxiter;
41     extern bool exit_on_close;
42
43     // Named parameters lists
44     extern struct loba_algorithms_type:
45         public named_object_list2<process, int, char** > {
46             loba_algorithms_type();
47     } loba_algorithms;
48
49     extern struct topologies_type:
50         public named_object_list<deployment_generator> {
51             topologies_type();
52     } topologies;
53
54     // Utility functions
55     int parse_args(int* argc, char* argv[]);
56     void print();
57     void usage();
58
59 } // namespace opt
60
61 #endif // !OPTIONS_H
62
63 // Local variables:
64 // mode: c++
65 // End: