X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7e082217ec28452a0f8fdb0207d8792f0b0932dc..4f3542d1f6ce52c0d190d9ee21d641d5d313e1c7:/include/simgrid/platf.h diff --git a/include/simgrid/platf.h b/include/simgrid/platf.h index a9a70639be..24a5533973 100644 --- a/include/simgrid/platf.h +++ b/include/simgrid/platf.h @@ -93,16 +93,16 @@ typedef struct { xbt_dict_t properties; } s_sg_platf_host_cbarg_t, *sg_platf_host_cbarg_t; -#define SG_PLATF_HOST_INITIALIZER {\ - .id = NULL, \ - .power_peak = 0, \ - .core_amount = 1., \ - .power_scale = 1, \ - .initial_state = A_surfxml_host_state_ON, \ - .power_trace = NULL, \ - .state_trace = NULL, \ - .coord = NULL, \ - .properties = NULL \ +#define SG_PLATF_HOST_INITIALIZER { \ + .id = NULL,\ + .power_peak = 0,\ + .core_amount = 1.,\ + .power_scale = 1,\ + .initial_state = SURF_RESOURCE_ON,\ + .power_trace = NULL,\ + .state_trace = NULL,\ + .coord = NULL,\ + .properties = NULL\ } typedef struct { @@ -138,9 +138,9 @@ typedef struct { .bandwidth_trace = NULL,\ .latency = 0.,\ .latency_trace = NULL,\ - .state = A_surfxml_link_state_ON,\ + .state = SURF_RESOURCE_ON,\ .state_trace = NULL,\ - .policy = A_surfxml_link_sharing_policy_SHARED,\ + .policy = SURF_LINK_SHARED,\ .properties = NULL\ } @@ -209,9 +209,10 @@ typedef struct { const char* id; const char* type_id; const char* content; + xbt_dict_t properties; } s_sg_platf_storage_cbarg_t, *sg_platf_storage_cbarg_t; -#define SG_PLATF_STORAGE_INITIALIZER {NULL,NULL,NULL} +#define SG_PLATF_STORAGE_INITIALIZER {NULL,NULL,NULL,NULL} typedef struct { const char* id; @@ -282,10 +283,21 @@ typedef struct s_sg_platf_AS_cbarg *sg_platf_AS_cbarg_t; typedef struct s_sg_platf_AS_cbarg { const char *id; int routing; - xbt_dict_t properties; } s_sg_platf_AS_cbarg_t; -#define SG_PLATF_AS_INITIALIZER {NULL,0,NULL} +#define SG_PLATF_AS_INITIALIZER {NULL,0} + +/* ***************************************** */ +/* TUTORIAL: New TAG */ + +typedef struct s_sg_platf_gpu_cbarg *sg_platf_gpu_cbarg_t; +typedef struct s_sg_platf_gpu_cbarg { + const char *name; +} s_sg_platf_gpu_cbarg_t; + +#define SG_PLATF_GPU_INITIALIZER {NULL} + +/* ***************************************** */ XBT_PUBLIC(void) sg_platf_begin(void); // Start a new platform XBT_PUBLIC(void) sg_platf_end(void); // Finish the creation of the platform @@ -318,6 +330,11 @@ XBT_PUBLIC(void) sg_platf_new_mount(sg_platf_mount_cbarg_t mount); XBT_PUBLIC(void) sg_platf_new_process(sg_platf_process_cbarg_t process); +/* ***************************************** */ +/* TUTORIAL: New TAG */ +XBT_PUBLIC(void) sg_platf_new_gpu(sg_platf_gpu_cbarg_t gpu); +/* ***************************************** */ + // Add route and Asroute without xml file with those functions XBT_PUBLIC(void) sg_platf_route_begin (sg_platf_route_cbarg_t route); // Initialize route XBT_PUBLIC(void) sg_platf_route_end (sg_platf_route_cbarg_t route); // Finalize and add a route @@ -328,4 +345,8 @@ XBT_PUBLIC(void) sg_platf_ASroute_end (sg_platf_route_cbarg_t ASroute); // Final XBT_PUBLIC(void) sg_platf_route_add_link (const char* link_id, sg_platf_route_cbarg_t route); // Add a link to link list XBT_PUBLIC(void) sg_platf_ASroute_add_link (const char* link_id, sg_platf_route_cbarg_t ASroute); // Add a link to link list +typedef void (*sg_platf_process_cb_t)(sg_platf_process_cbarg_t); +XBT_PUBLIC(void) sg_platf_process_add_cb(sg_platf_process_cb_t fct); + + #endif /* SG_PLATF_H */