X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e873a4d59b40ce9ecc436f20012e43a859adc35f..0c07b616d38841a028f8a34fe66394e232008b5e:/src/surf/xml/platf_private.hpp diff --git a/src/surf/xml/platf_private.hpp b/src/surf/xml/platf_private.hpp index 1066e86577..12d82e9b10 100644 --- a/src/surf/xml/platf_private.hpp +++ b/src/surf/xml/platf_private.hpp @@ -11,6 +11,7 @@ #include "simgrid/host.h" #include "src/surf/xml/platf.hpp" +#include SG_BEGIN_DECL() #include "src/surf/xml/simgrid_dtd.h" @@ -23,6 +24,7 @@ typedef size_t yy_size_t; XBT_PUBLIC(sg_netcard_t) sg_netcard_by_name_or_null(const char *name); typedef enum { + SURF_CLUSTER_DRAGONFLY=3, SURF_CLUSTER_FAT_TREE=2, SURF_CLUSTER_FLAT = 1, SURF_CLUSTER_TORUS = 0 @@ -41,7 +43,7 @@ typedef enum { typedef struct { const char* id; - xbt_dynar_t speed_per_pstate; + std::vector speed_per_pstate; int pstate; int core_amount; tmgr_trace_t speed_trace; @@ -80,15 +82,15 @@ typedef struct s_sg_platf_peer_cbarg { double bw_out; double lat; const char* coord; - tmgr_trace_t availability_trace; + tmgr_trace_t speed_trace; tmgr_trace_t state_trace; } s_sg_platf_peer_cbarg_t; typedef struct s_sg_platf_route_cbarg *sg_platf_route_cbarg_t; typedef struct s_sg_platf_route_cbarg { bool symmetrical; - const char *src; - const char *dst; + sg_netcard_t src; + sg_netcard_t dst; sg_netcard_t gw_src; sg_netcard_t gw_dst; std::vector *link_list; @@ -99,7 +101,7 @@ typedef struct s_sg_platf_cluster_cbarg { const char* id; const char* prefix; const char* suffix; - const char* radical; + std::vector* radicals; double speed; int core_amount; double bw; @@ -122,7 +124,7 @@ typedef struct s_sg_platf_cabinet_cbarg { const char* id; const char* prefix; const char* suffix; - const char* radical; + std::vector* radicals; double speed; double bw; double lat; @@ -191,17 +193,17 @@ typedef struct s_sg_platf_AS_cbarg { int routing; } s_sg_platf_AS_cbarg_t; -#define SG_PLATF_AS_INITIALIZER {NULL,0} +#define SG_PLATF_AS_INITIALIZER {nullptr,0} /********** Routing **********/ void routing_cluster_add_backbone(Link* bb); /*** END of the parsing cruft ***/ -XBT_PUBLIC(void) sg_platf_begin(void); // Start a new platform -XBT_PUBLIC(void) sg_platf_end(void); // Finish the creation of the platform +XBT_PUBLIC(void) sg_platf_begin(); // Start a new platform +XBT_PUBLIC(void) sg_platf_end(); // Finish the creation of the platform -XBT_PUBLIC(void) sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS); // Begin description of new AS -XBT_PUBLIC(void) sg_platf_new_AS_end(void); // That AS is fully described +XBT_PUBLIC(simgrid::s4u::As*) sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS); // Begin description of new AS +XBT_PUBLIC(void) sg_platf_new_AS_seal(); // That AS is fully described XBT_PUBLIC(void) sg_platf_new_host (sg_platf_host_cbarg_t host); // Add an host to the currently described AS XBT_PUBLIC(void) sg_platf_new_hostlink(sg_platf_host_link_cbarg_t h); // Add an host_link to the currently described AS @@ -224,18 +226,18 @@ XBT_PUBLIC(void) sg_platf_new_process(sg_platf_process_cbarg_t process); XBT_PRIVATE void sg_platf_trace_connect(sg_platf_trace_connect_cbarg_t trace_connect); /* Prototypes of the functions offered by flex */ -XBT_PUBLIC(int) surf_parse_lex(void); -XBT_PUBLIC(int) surf_parse_get_lineno(void); -XBT_PUBLIC(FILE *) surf_parse_get_in(void); -XBT_PUBLIC(FILE *) surf_parse_get_out(void); -XBT_PUBLIC(yy_size_t) surf_parse_get_leng(void); -XBT_PUBLIC(char *) surf_parse_get_text(void); +XBT_PUBLIC(int) surf_parse_lex(); +XBT_PUBLIC(int) surf_parse_get_lineno(); +XBT_PUBLIC(FILE *) surf_parse_get_in(); +XBT_PUBLIC(FILE *) surf_parse_get_out(); +XBT_PUBLIC(yy_size_t) surf_parse_get_leng(); +XBT_PUBLIC(char *) surf_parse_get_text(); XBT_PUBLIC(void) surf_parse_set_lineno(int line_number); XBT_PUBLIC(void) surf_parse_set_in(FILE * in_str); XBT_PUBLIC(void) surf_parse_set_out(FILE * out_str); -XBT_PUBLIC(int) surf_parse_get_debug(void); +XBT_PUBLIC(int) surf_parse_get_debug(); XBT_PUBLIC(void) surf_parse_set_debug(int bdebug); -XBT_PUBLIC(int) surf_parse_lex_destroy(void); +XBT_PUBLIC(int) surf_parse_lex_destroy(); /* To include files (?) */ XBT_PRIVATE void surfxml_bufferstack_push(int _new); @@ -246,15 +248,8 @@ XBT_PUBLIC(void) routing_route_free(sg_platf_route_cbarg_t route); /********** Instr. **********/ XBT_PRIVATE void sg_instr_AS_begin(sg_platf_AS_cbarg_t AS); XBT_PRIVATE void sg_instr_new_router(sg_platf_router_cbarg_t router); -XBT_PRIVATE void sg_instr_new_host(sg_platf_host_cbarg_t host); -XBT_PRIVATE void sg_instr_AS_end(void); - -typedef struct s_surf_parsing_link_up_down *surf_parsing_link_up_down_t; -typedef struct s_surf_parsing_link_up_down { - Link* link_up; - Link* link_down; -} s_surf_parsing_link_up_down_t; - +XBT_PRIVATE void sg_instr_new_host(simgrid::s4u::Host& host); +XBT_PRIVATE void sg_instr_AS_end(); SG_END_DECL()