Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Remove code for the cpu tag
authorGabriel Corona <gabriel.corona@loria.fr>
Wed, 2 Dec 2015 12:17:55 +0000 (13:17 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Wed, 2 Dec 2015 12:17:55 +0000 (13:17 +0100)
include/simgrid/platf.h
src/bindings/lua/lua_platf.c
src/include/simgrid/platf_interface.h
src/surf/sg_platf.cpp
src/surf/surf_private.h
src/surf/surfxml_parse.c
src/surf/surfxml_parseplatf.c

index c9b5b0b..ede827a 100644 (file)
@@ -312,17 +312,6 @@ typedef struct s_sg_platf_AS_cbarg {
 
 #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
@@ -354,11 +343,6 @@ 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
index f0bb012..2228697 100644 (file)
@@ -48,8 +48,6 @@ int console_open(lua_State *L) {
   storage_register_callbacks();
   routing_register_callbacks();
 
-  gpu_register_callbacks();
-
   return 0;
 }
 
index 2ca4e79..b544dc1 100644 (file)
@@ -40,13 +40,6 @@ typedef void (*sg_platf_storage_type_cb_t)(sg_platf_storage_type_cbarg_t);
 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);
index 9cfe922..9085bf2 100644 (file)
@@ -23,13 +23,6 @@ xbt_dynar_t sg_platf_link_cb_list = NULL;   // of sg_platf_link_cb_t
 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 */
@@ -39,32 +32,20 @@ static RngStream sg_platf_rng_stream = NULL;
 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;
 }
@@ -443,22 +424,6 @@ void sg_platf_new_AS_end()
   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) {
index eb2bc27..e4c9e5a 100644 (file)
@@ -69,11 +69,6 @@ XBT_PUBLIC(void) routing_model_create(void *loopback);
 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?
index a7b0705..05820ac 100644 (file)
@@ -975,22 +975,8 @@ void STag_surfxml_model___prop(void){
   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){}
index 3a0f327..7077f57 100644 (file)
@@ -68,13 +68,6 @@ xbt_dict_t trace_connect_list_link_avail = NULL;
 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;
@@ -85,11 +78,7 @@ void parse_after_config() {
     /* Register classical callbacks */
     storage_register_callbacks();
     routing_register_callbacks();
-    gpu_register_callbacks();
 
-    /* ***************************************** */
-    /* TUTORIAL: New TAG                         */
-    /* ***************************************** */
     after_config_done = 1;
   }
 }