#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_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
storage_register_callbacks();
routing_register_callbacks();
- gpu_register_callbacks();
-
return 0;
}
typedef void (*sg_platf_mount_cb_t)(sg_platf_mount_cbarg_t);
typedef void (*sg_platf_mstorage_cb_t)(sg_platf_mstorage_cbarg_t);
-/* ***************************************** */
-/* TUTORIAL: New TAG */
-
-typedef void (*sg_platf_gpu_cb_t)(sg_platf_gpu_cbarg_t);
-XBT_PUBLIC(void) sg_platf_gpu_add_cb(sg_platf_gpu_cb_t);
-/* ***************************************** */
-
XBT_PUBLIC(void) sg_platf_link_add_cb(sg_platf_link_cb_t);
XBT_PUBLIC(void) sg_platf_cluster_add_cb(sg_platf_cluster_cb_t fct);
XBT_PUBLIC(void) sg_platf_postparse_add_cb(void_f_void_t fct);
xbt_dynar_t sg_platf_cluster_cb_list = NULL; // of sg_platf_cluster_cb_t
xbt_dynar_t sg_platf_postparse_cb_list = NULL; // of void_f_void_t
-/* ***************************************** */
-/* TUTORIAL: New TAG */
-
-xbt_dynar_t sg_platf_gpu_cb_list = NULL;
-/* ***************************************** */
-
-
static int surf_parse_models_setup_already_called = 0;
/* one RngStream for the platform, to respect some statistic rules */
void sg_platf_init(void) {
//FIXME : Ugly, but useful...
- if (sg_platf_gpu_cb_list)
+ if (sg_platf_postparse_cb_list)
return; //Already initialized, so do nothing...
sg_platf_link_cb_list = xbt_dynar_new(sizeof(sg_platf_link_cb_t), NULL);
sg_platf_cluster_cb_list = xbt_dynar_new(sizeof(sg_platf_cluster_cb_t), NULL);
sg_platf_postparse_cb_list = xbt_dynar_new(sizeof(sg_platf_link_cb_t),NULL);
-
- /* ***************************************** */
- /* TUTORIAL: New TAG */
-
- sg_platf_gpu_cb_list = xbt_dynar_new(sizeof(sg_platf_gpu_cb_t), NULL);
- /* ***************************************** */
}
+
/** Module management function: frees all internal data structures */
void sg_platf_exit(void) {
xbt_dynar_free(&sg_platf_link_cb_list);
xbt_dynar_free(&sg_platf_postparse_cb_list);
xbt_dynar_free(&sg_platf_cluster_cb_list);
- /* ***************************************** */
- /* TUTORIAL: New TAG */
-
- xbt_dynar_free(&sg_platf_gpu_cb_list);
-
- /* ***************************************** */
-
/* make sure that we will reinit the models while loading the platf once reinited */
surf_parse_models_setup_already_called = 0;
}
if (TRACE_is_enabled())
sg_instr_AS_end();
}
-
-/* ***************************************** */
-/* TUTORIAL: New TAG */
-
-void sg_platf_new_gpu(sg_platf_gpu_cbarg_t gpu) {
- unsigned int iterator;
- void_f_void_t fun;
- xbt_dynar_foreach(sg_platf_gpu_cb_list, iterator, fun) {
- fun();
- }
-}
-
-void sg_platf_gpu_add_cb(sg_platf_gpu_cb_t fct) {
- xbt_dynar_push(sg_platf_gpu_cb_list, &fct);
-}
-
/* ***************************************** */
void sg_platf_link_add_cb(sg_platf_link_cb_t fct) {
XBT_PUBLIC(void) routing_exit(void);
XBT_PUBLIC(void) storage_register_callbacks(void);
-/* ***************************************** */
-/* TUTORIAL: New TAG */
-XBT_PUBLIC(void) gpu_register_callbacks(void);
-/* ***************************************** */
-
XBT_PUBLIC(void) routing_register_callbacks(void);
XBT_PUBLIC(void) generic_free_route(sg_platf_route_cbarg_t route); // FIXME rename to routing_route_free
// FIXME: make previous function private to routing again?
xbt_dict_set(current_model_property_set, A_surfxml_model___prop_id, xbt_strdup(A_surfxml_model___prop_value), NULL);
}
-/* ***************************************** */
-/* TUTORIAL: New TAG */
-void STag_surfxml_gpu(void)
-{
- XBT_DEBUG("STag_surfxml_gpu");
-}
-void ETag_surfxml_gpu(void)
-{
- s_sg_platf_gpu_cbarg_t gpu = SG_PLATF_GPU_INITIALIZER;
- memset(&gpu,0,sizeof(gpu));
-
- gpu.name = A_surfxml_gpu_name;
-
- sg_platf_new_gpu(&gpu);
-}
-/* ***************************************** */
+void STag_surfxml_gpu(void) {}
+void ETag_surfxml_gpu(void) {}
/* nothing to do in those functions */
void ETag_surfxml_prop(void){}
xbt_dict_t trace_connect_list_bandwidth = NULL;
xbt_dict_t trace_connect_list_latency = NULL;
-/* ********************************************* */
-/* TUTORIAL: New TAG */
-/* This function should be in gpu.c */
-/* because sg_platf_gpu_add_cb take a staic fct */
-XBT_PUBLIC(void) gpu_register_callbacks(void){
- sg_platf_gpu_add_cb(NULL);
-}
/* ***************************************** */
static int after_config_done;
/* Register classical callbacks */
storage_register_callbacks();
routing_register_callbacks();
- gpu_register_callbacks();
- /* ***************************************** */
- /* TUTORIAL: New TAG */
- /* ***************************************** */
after_config_done = 1;
}
}