Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill a useless function
[simgrid.git] / src / surf / network_ib.cpp
index 9023115..2c170bb 100644 (file)
@@ -15,7 +15,8 @@
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
 
 static void IB_create_host_callback(simgrid::s4u::Host& host){
-  using namespace simgrid::surf;
+  using simgrid::surf::NetworkIBModel;
+  using simgrid::surf::IBNode;
 
   static int id=0;
   // pour t->id -> rajouter une nouvelle struct dans le dict, pour stocker les comms actives
@@ -34,7 +35,9 @@ static void IB_action_state_changed_callback(
     simgrid::surf::NetworkAction *action,
     simgrid::surf::Action::State statein, simgrid::surf::Action::State stateout)
 {
-  using namespace simgrid::surf;
+  using simgrid::surf::NetworkIBModel;
+  using simgrid::surf::IBNode;
+
   if(statein!=simgrid::surf::Action::State::running || stateout!=simgrid::surf::Action::State::done)
     return;
   std::pair<IBNode*,IBNode*> pair = ((NetworkIBModel*)surf_network_model)->active_comms[action];
@@ -48,7 +51,7 @@ static void IB_action_state_changed_callback(
 
 
 static void IB_action_init_callback(
-    simgrid::surf::NetworkAction *action, simgrid::routing::NetCard *src, simgrid::routing::NetCard *dst)
+    simgrid::surf::NetworkAction *action, simgrid::kernel::routing::NetCard *src, simgrid::kernel::routing::NetCard *dst)
 {
   simgrid::surf::NetworkIBModel* ibModel = (simgrid::surf::NetworkIBModel*)surf_network_model;
 
@@ -77,7 +80,7 @@ static void IB_action_init_callback(
 /*  month=june, */
 /*  year={2010} */
 /*  } */
-void surf_network_model_init_IB(void)
+void surf_network_model_init_IB()
 {
   using simgrid::surf::networkActionStateChangedCallbacks;
 
@@ -85,7 +88,7 @@ void surf_network_model_init_IB(void)
     return;
 
   surf_network_model = new simgrid::surf::NetworkIBModel();
-  xbt_dynar_push(all_existing_models, &surf_network_model);
+  all_existing_models->push_back(surf_network_model);
   networkActionStateChangedCallbacks.connect(IB_action_state_changed_callback);
   Link::onCommunicate.connect(IB_action_init_callback);
   simgrid::s4u::Host::onCreation.connect(IB_create_host_callback);