Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
align namespaces on directories for kernel::routing
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 31 Jul 2016 11:06:32 +0000 (13:06 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 31 Jul 2016 11:06:32 +0000 (13:06 +0200)
44 files changed:
include/simgrid/forward.h
include/simgrid/s4u/As.hpp
include/simgrid/s4u/host.hpp
src/include/surf/surf.h
src/kernel/routing/AsCluster.cpp
src/kernel/routing/AsCluster.hpp
src/kernel/routing/AsClusterDragonfly.cpp
src/kernel/routing/AsClusterDragonfly.hpp
src/kernel/routing/AsClusterFatTree.cpp
src/kernel/routing/AsClusterFatTree.hpp
src/kernel/routing/AsClusterTorus.cpp
src/kernel/routing/AsClusterTorus.hpp
src/kernel/routing/AsDijkstra.cpp
src/kernel/routing/AsDijkstra.hpp
src/kernel/routing/AsFloyd.cpp
src/kernel/routing/AsFloyd.hpp
src/kernel/routing/AsFull.cpp
src/kernel/routing/AsFull.hpp
src/kernel/routing/AsImpl.cpp
src/kernel/routing/AsImpl.hpp
src/kernel/routing/AsNone.cpp
src/kernel/routing/AsNone.hpp
src/kernel/routing/AsRoutedGraph.cpp
src/kernel/routing/AsRoutedGraph.hpp
src/kernel/routing/AsVivaldi.cpp
src/kernel/routing/AsVivaldi.hpp
src/s4u/s4u_as.cpp
src/surf/HostImpl.cpp
src/surf/HostImpl.hpp
src/surf/instr_routing.cpp
src/surf/network_cm02.cpp
src/surf/network_cm02.hpp
src/surf/network_constant.cpp
src/surf/network_constant.hpp
src/surf/network_ib.cpp
src/surf/network_interface.cpp
src/surf/network_interface.hpp
src/surf/ptask_L07.cpp
src/surf/ptask_L07.hpp
src/surf/sg_platf.cpp
src/surf/surf_interface.cpp
src/surf/surf_routing.cpp
src/surf/surf_routing.hpp
teshsuite/simdag/is-router/is-router.cpp

index ddf9531..67212b1 100644 (file)
@@ -17,7 +17,10 @@ namespace simgrid {
   }
   namespace kernel {
      namespace activity {
-       class Synchro;
+       class Synchro;
+     }
+     namespace routing {
+       class NetCard;
      }
   }
   namespace surf {
@@ -25,9 +28,6 @@ namespace simgrid {
     class Cpu;
     class Link;
   }
-  namespace routing {
-    class NetCard;
-  }    
   namespace trace_mgr {
     class trace;
     class future_evt_set;
@@ -38,8 +38,8 @@ typedef simgrid::s4u::As simgrid_As;
 typedef simgrid::s4u::Host simgrid_Host;
 typedef simgrid::s4u::Mailbox simgrid_Mailbox;
 typedef simgrid::kernel::activity::Synchro simgrid_Synchro;
+typedef simgrid::kernel::routing::NetCard routing_NetCard;
 typedef simgrid::surf::Cpu surf_Cpu;
-typedef simgrid::routing::NetCard routing_NetCard;
 typedef simgrid::surf::Link Link;
 typedef simgrid::surf::Resource surf_Resource;
 typedef simgrid::trace_mgr::trace tmgr_Trace;
index 32d50b5..50c4854 100644 (file)
@@ -23,9 +23,11 @@ namespace simgrid {
 namespace surf {
   class Link;
 }
-namespace routing {
-  class AsImpl;
-  class NetCard;
+namespace kernel {
+  namespace routing {
+    class AsImpl;
+    class NetCard;
+  }
 }
 namespace s4u {
 
@@ -36,7 +38,7 @@ namespace s4u {
  */
 XBT_PUBLIC_CLASS As {
 protected:
-  friend simgrid::routing::AsImpl;
+  friend simgrid::kernel::routing::AsImpl;
 
   explicit As(const char *name);
   virtual ~As();
@@ -52,7 +54,7 @@ public:
   As *father_ = nullptr; // FIXME: hide me
 public:
   /* Add content to the AS, at parsing time. It should be sealed afterward. */
-  virtual int addComponent(routing::NetCard *elm); /* A host, a router or an AS, whatever */
+  virtual int addComponent(kernel::routing::NetCard *elm); /* A host, a router or an AS, whatever */
   virtual void addRoute(sg_platf_route_cbarg_t route);
   void addBypassRoute(sg_platf_route_cbarg_t e_route);
 
index 8d7d2dd..af1df88 100644 (file)
@@ -101,7 +101,7 @@ public:
   /** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */
   surf::Cpu     *pimpl_cpu = nullptr;
   /** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */
-  routing::NetCard *pimpl_netcard = nullptr;
+  kernel::routing::NetCard *pimpl_netcard = nullptr;
 
 public:
   /*** Called on each newly created object */
index be7819f..9eebbb4 100644 (file)
@@ -53,10 +53,12 @@ class Action;
 class ActionLmm;
 class StorageActionLmm;
 }
+namespace kernel {     
 namespace routing {
 class RoutingPlatf;
 }
 }
+}
 
 typedef simgrid::surf::Model surf_Model;
 typedef simgrid::surf::CpuModel surf_CpuModel;
@@ -72,7 +74,7 @@ typedef simgrid::surf::NetworkCm02Link surf_NetworkCm02Link;
 typedef simgrid::surf::Action surf_Action;
 typedef simgrid::surf::ActionLmm surf_ActionLmm;
 typedef simgrid::surf::StorageActionLmm surf_StorageActionLmm;
-typedef simgrid::routing::RoutingPlatf surf_RoutingPlatf;
+typedef simgrid::kernel::routing::RoutingPlatf surf_RoutingPlatf;
 
 #else
 
index 10ef461..e85becf 100644 (file)
@@ -12,6 +12,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster, surf, "Routing part of surf"
  * Note that a router is created, easing the interconnexion with the rest of the world. */
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
   AsCluster::AsCluster(const char*name)
     : AsImpl(name)
@@ -162,5 +163,4 @@ void AsCluster::create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id,
   xbt_free(link_id);
 }
 
-}
-}
+}}}
index 4b747b1..7a8d4e3 100644 (file)
@@ -9,6 +9,7 @@
 #include "src/kernel/routing/AsImpl.hpp"
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 class XBT_PRIVATE AsCluster: public AsImpl {
@@ -33,7 +34,6 @@ public:
 
 };
 
-}
-}
+}}} // namespace
 
 #endif /* SIMGRID_ROUTING_CLUSTER_HPP_ */
index 0a2f42f..cec68d8 100644 (file)
@@ -13,6 +13,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster_dragonfly, surf_route_cluster, "Dragonfly Routing part of surf");
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 AsClusterDragonfly::AsClusterDragonfly(const char*name)
@@ -341,5 +342,4 @@ void AsClusterDragonfly::getRouteAndLatency(NetCard * src, NetCard * dst, sg_pla
 
   
 }
-  }
-}
+}}} // namespace
index e275d67..e0ed5a6 100644 (file)
@@ -9,7 +9,8 @@
 #include "src/kernel/routing/AsCluster.hpp"
 
 namespace simgrid {
-  namespace routing {
+namespace kernel {
+namespace routing {
 
 
 class XBT_PRIVATE DragonflyRouter {
@@ -85,5 +86,5 @@ class XBT_PRIVATE AsClusterDragonfly
       DragonflyRouter** routers_=nullptr;
     };
 
-  }}
+}}}
 #endif
index 9b07520..c5b518f 100644 (file)
@@ -20,6 +20,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_fat_tree, surf, "Routing for fat trees");
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 AsClusterFatTree::AsClusterFatTree(const char*name)
@@ -523,5 +524,4 @@ FatTreeLink::FatTreeLink(sg_platf_cluster_cbarg_t cluster,
   free((void*)linkTemplate.id);
 }
 
-}
-}
+}}} // namespace
index 6854f63..bff2627 100644 (file)
@@ -9,6 +9,7 @@
 #include "src/kernel/routing/AsCluster.hpp"
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 class XBT_PRIVATE FatTreeLink;
@@ -147,7 +148,6 @@ private:
   bool isInSubTree(FatTreeNode *root, FatTreeNode *node);
 };
 
-}
-}
+}}} // namespaces
 
 #endif
index 2a11c9a..55a4606 100644 (file)
@@ -25,6 +25,7 @@ inline unsigned int *rankId_to_coords(int rankId, xbt_dynar_t dimensions)
 
 
 namespace simgrid {
+  namespace kernel {
   namespace routing {
     AsClusterTorus::AsClusterTorus(const char*name)
       : AsCluster(name) {
@@ -223,5 +224,4 @@ namespace simgrid {
       return;
     }
 
-  }
-}
+}}} // namespace
index b3b61ed..1e4f264 100644 (file)
@@ -9,9 +9,10 @@
 #include "src/kernel/routing/AsCluster.hpp"
 
 namespace simgrid {
-  namespace routing {
+namespace kernel {
+namespace routing {
 
-    class XBT_PRIVATE AsClusterTorus : public simgrid::routing::AsCluster {
+    class XBT_PRIVATE AsClusterTorus : public AsCluster {
     public:
       explicit AsClusterTorus(const char*name);
       ~AsClusterTorus() override;
@@ -22,5 +23,5 @@ namespace simgrid {
       xbt_dynar_t dimensions_ = nullptr;
     };
 
-  }}
+}}}
 #endif
index 98b8719..29f4524 100644 (file)
@@ -37,6 +37,7 @@ static void graph_edge_data_free(void *e) // FIXME: useless code duplication
 /* Utility functions */
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 void AsDijkstra::seal()
 {
@@ -358,5 +359,4 @@ void AsDijkstra::addRoute(sg_platf_route_cbarg_t route)
   }
 }
 
-}
-}
+}}} // namespace
index cf313b5..5dada5a 100644 (file)
@@ -23,6 +23,7 @@ typedef struct route_cache_element {
 } s_route_cache_element_t, *route_cache_element_t;
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 /***********
@@ -59,7 +60,6 @@ public:
   xbt_dict_t routeCache_ = nullptr;      /* use in cache mode */
 };
 
-}
-}
+}}} // namespaces
 
 #endif /* SURF_ROUTING_DIJKSTRA_HPP_ */
index 87ca965..7704775 100644 (file)
@@ -15,6 +15,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_floyd, surf, "Routing part of surf");
 #define TO_FLOYD_LINK(i,j) (linkTable_)[(i)+(j)*table_size]
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 AsFloyd::AsFloyd(const char*name)
@@ -197,5 +198,4 @@ void AsFloyd::seal(){
   }
 }
 
-}
-}
+}}}
index 3f53c96..c4327ff 100644 (file)
@@ -9,6 +9,7 @@
 #include "src/kernel/routing/AsRoutedGraph.hpp"
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 /** Floyd routing data: slow initialization, fast lookup, lesser memory requirements, shortest path routing only */
@@ -28,7 +29,6 @@ private:
   sg_platf_route_cbarg_t *linkTable_;
 };
 
-}
-}
+}}} // namespaces
 
 #endif /* SURF_ROUTING_FLOYD_HPP_ */
index d2c6438..e0b6cda 100644 (file)
@@ -11,6 +11,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf");
 #define TO_ROUTE_FULL(i,j) routingTable_[(i)+(j)*table_size]
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
   AsFull::AsFull(const char*name)
     : AsRoutedGraph(name)
@@ -129,5 +130,4 @@ void AsFull::addRoute(sg_platf_route_cbarg_t route)
   }
 }
 
-}
-}
+}}} // namespace
index bf7668b..66ca294 100644 (file)
@@ -9,6 +9,7 @@
 #include "src/kernel/routing/AsRoutedGraph.hpp"
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 /** Full routing: fast, large memory requirements, fully expressive */
@@ -25,7 +26,6 @@ public:
   sg_platf_route_cbarg_t *routingTable_ = nullptr;
 };
 
-}
-}
+}}} // namespaces
 
 #endif /* SIMGRID_ROUTING_FULL_HPP_ */
index 40c9400..fdc135f 100644 (file)
@@ -11,6 +11,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(AsImpl,surf, "Implementation of S4U autonomous systems");
 
 namespace simgrid {
+  namespace kernel {
   namespace routing {
 
     AsImpl::AsImpl(const char *name)
@@ -217,5 +218,4 @@ namespace simgrid {
 
     }
 
-  }
-};
+}}} // namespace
index 5e64ccd..374b711 100644 (file)
@@ -14,6 +14,7 @@
 #include "src/surf/xml/platf_private.hpp" // FIXME: kill sg_platf_route_cbarg_t to remove that UGLY include
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
   class RoutingPlatf; // FIXME: KILLME
 
@@ -23,7 +24,7 @@ namespace routing {
  * In SimGrid, there is a hierarchy of ASes, with a unique root AS (that you can retrieve from the s4u::Engine).
  */
 XBT_PUBLIC_CLASS AsImpl : public s4u::As {
-  friend simgrid::routing::RoutingPlatf;
+  friend simgrid::kernel::routing::RoutingPlatf;
 protected:
   explicit AsImpl(const char *name);
   ~AsImpl() override;
@@ -72,6 +73,6 @@ public:
   routing::NetCard *netcard_ = nullptr; // Our representative in the father AS
 };
 
-}}; // Namespace simgrid::s4u
+}}}; // Namespace simgrid::kernel::routing
 
 #endif /* SIMGRID_SURF_AS_HPP */
index 41c6272..f634393 100644 (file)
@@ -12,6 +12,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf");
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 AsNone::AsNone(const char*name)
@@ -30,5 +31,4 @@ void AsNone::getGraph(xbt_graph_t /*graph*/, xbt_dict_t /*nodes*/, xbt_dict_t /*
   XBT_ERROR("No routing no graph");
 }
 
-}
-}
+}}}
index f711f51..391050c 100644 (file)
@@ -9,6 +9,7 @@
 #include "src/kernel/routing/AsImpl.hpp"
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 /** No specific routing. Mainly useful with the constant network model */
@@ -21,7 +22,6 @@ public:
   void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) override;
 };
 
-}
-}
+}}} // namespace
 
 #endif /* SURF_ROUTING_NONE_HPP_ */
index 090c63d..b256dd0 100644 (file)
@@ -23,6 +23,7 @@ void routing_route_free(sg_platf_route_cbarg_t route)
 }
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
   
 AsRoutedGraph::AsRoutedGraph(const char*name)
@@ -35,8 +36,7 @@ AsRoutedGraph::~AsRoutedGraph()
 }
 
 
-}
-}
+}}} // namespace simgrid::kernel::routing
 
 /* ************************************************************************** */
 /* *********************** GENERIC BUSINESS METHODS ************************* */
@@ -83,6 +83,7 @@ xbt_edge_t new_xbt_graph_edge(xbt_graph_t graph, xbt_node_t s, xbt_node_t d, xbt
 }
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
   xbt_dynar_t AsRoutedGraph::getOneLinkRoutes()
@@ -254,5 +255,4 @@ void AsRoutedGraph::addRouteCheckParams(sg_platf_route_cbarg_t route) {
   }
 }
 
-}
-}
+}}}
index 89dc2e2..1b5bfa4 100644 (file)
@@ -9,6 +9,7 @@
 #include "src/kernel/routing/AsImpl.hpp"
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 class XBT_PRIVATE AsRoutedGraph : public AsImpl {
@@ -25,7 +26,6 @@ protected:
   void addRouteCheckParams(sg_platf_route_cbarg_t route);
 };
 
-}
-}
+}}} // namespace
 
 #endif /* SIMGRID_ROUTING_GENERIC_HPP_ */
index 964ee76..c25b4e0 100644 (file)
@@ -13,6 +13,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_vivaldi, surf, "Routing part of surf");
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
   static inline double euclidean_dist_comp(int index, xbt_dynar_t src, xbt_dynar_t dst) {
     double src_coord = xbt_dynar_get_as(src, index, double);
@@ -97,5 +98,4 @@ void AsVivaldi::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cb
   }
 }
 
-}
-}
+}}}
index adf5ba1..5667ddb 100644 (file)
@@ -9,6 +9,7 @@
 #include "src/kernel/routing/AsCluster.hpp"
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 /* This derivates from cluster because each host has a private link */
@@ -21,7 +22,6 @@ public:
   void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
 };
 
-}
-}
+}}} // namespace
 
 #endif /* SURF_ROUTING_VIVALDI_HPP_ */
index 2e798e4..56864b5 100644 (file)
@@ -59,16 +59,16 @@ namespace simgrid {
       xbt_dynar_t res =  xbt_dynar_new(sizeof(sg_host_t), nullptr);
 
       for (unsigned int index = 0; index < xbt_dynar_length(vertices_); index++) {
-        simgrid::routing::NetCard *card = xbt_dynar_get_as(vertices_, index, simgrid::routing::NetCard*);
-        simgrid::s4u::Host     *host = simgrid::s4u::Host::by_name_or_null(card->name());
+        kernel::routing::NetCard *card = xbt_dynar_get_as(vertices_, index, kernel::routing::NetCard*);
+        s4u::Host                *host = simgrid::s4u::Host::by_name_or_null(card->name());
         if (host!=nullptr)
           xbt_dynar_push(res, &host);
       }
       return res;
     }
 
-    int As::addComponent(routing::NetCard *elm) {
-      xbt_dynar_push_as(vertices_, routing::NetCard*, elm);
+    int As::addComponent(kernel::routing::NetCard *elm) {
+      xbt_dynar_push_as(vertices_, kernel::routing::NetCard*, elm);
       return xbt_dynar_length(vertices_)-1;
     }
 
index c893a4f..c7e5ec9 100644 (file)
@@ -30,7 +30,7 @@ simgrid::xbt::Extension<simgrid::s4u::Host, HostImpl> HostImpl::EXTENSION_ID;
 /*********
  * Model *
  *********/
-HostImpl *HostModel::createHost(const char *name, routing::NetCard *netElm, Cpu *cpu){
+HostImpl *HostModel::createHost(const char *name, kernel::routing::NetCard *netElm, Cpu *cpu){
   xbt_dynar_t storageList = (xbt_dynar_t)xbt_lib_get_or_null(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL);
 
   HostImpl *host = new simgrid::surf::HostImpl(surf_host_model, name, storageList, cpu);
@@ -413,5 +413,4 @@ void HostImpl::setParams(vm_params_t params)
   p_params = *params;
 }
 
-}
-}
+}}
index 0849c43..62f6178 100644 (file)
@@ -52,7 +52,7 @@ public:
   HostModel() : Model() {}
   ~HostModel() override {}
 
-  HostImpl *createHost(const char *name, routing::NetCard *net, Cpu *cpu);
+  HostImpl *createHost(const char *name, kernel::routing::NetCard *net, Cpu *cpu);
 
   virtual void adjustWeightOfDummyCpuActions();
   virtual Action *executeParallelTask(int host_nb, sg_host_t *host_list,
index 2fe419f..04bd5f7 100644 (file)
@@ -152,7 +152,7 @@ static void recursiveGraphExtraction (simgrid::s4u::As *as, container_t containe
     xbt_dict_cursor_t cursor = nullptr;
     char *edge_name;
 
-    static_cast<simgrid::routing::AsImpl*>(as)->getGraph(graph, nodes, edges);
+    static_cast<simgrid::kernel::routing::AsImpl*>(as)->getGraph(graph, nodes, edges);
     xbt_dict_foreach(edges,cursor,edge_name,edge) {
         linkContainers(
           PJ_container_get((const char*) edge->src->data),
@@ -456,7 +456,7 @@ static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xb
     }
   }
 
-  static_cast<simgrid::routing::AsImpl*>(as)->getGraph(graph, nodes, edges);
+  static_cast<simgrid::kernel::routing::AsImpl*>(as)->getGraph(graph, nodes, edges);
 }
 
 xbt_graph_t instr_routing_platform_graph (void)
index 98ea4c3..032350e 100644 (file)
@@ -289,7 +289,8 @@ void NetworkCm02Model::updateActionsStateFull(double now, double delta)
   }
 }
 
-Action *NetworkCm02Model::communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate)
+Action *NetworkCm02Model::communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst,
+    double size, double rate)
 {
   int failed = 0;
   double bandwidth_bound;
index 3819984..230c735 100644 (file)
@@ -44,7 +44,7 @@ namespace simgrid {
           xbt_dict_t properties) override;
       void updateActionsStateLazy(double now, double delta) override;
       void updateActionsStateFull(double now, double delta) override;
-      Action *communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate) override;
+      Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate) override;
       bool next_occuring_event_isIdempotent() override;
       virtual void gapAppend(double size, const Link* link, NetworkAction* action);
     protected:
@@ -72,7 +72,7 @@ namespace simgrid {
      * Action *
      **********/
     class NetworkCm02Action : public NetworkAction {
-      friend Action *NetworkCm02Model::communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate);
+      friend Action *NetworkCm02Model::communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate);
       friend NetworkSmpiModel;
     public:
       NetworkCm02Action(Model *model, double cost, bool failed)
index b9c377e..1564f4d 100644 (file)
@@ -79,7 +79,7 @@ namespace simgrid {
       }
     }
 
-    Action *NetworkConstantModel::communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate)
+    Action *NetworkConstantModel::communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate)
     {
       NetworkConstantAction *action = new NetworkConstantAction(this, size, sg_latency_factor);
 
index 93fd2f1..e66a224 100644 (file)
@@ -29,7 +29,7 @@ namespace simgrid {
       NetworkConstantModel()  : NetworkModel() { };
       ~NetworkConstantModel() override;
 
-      Action *communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate) override;
+      Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate) override;
       double next_occuring_event(double now) override;
       bool next_occuring_event_isIdempotent() override {return true;}
       void updateActionsState(double now, double delta) override;
index 831dbdb..6b199b8 100644 (file)
@@ -51,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;
 
index 7912f20..fd3b806 100644 (file)
@@ -91,12 +91,12 @@ namespace simgrid {
      * Callbacks *
      *************/
 
-    simgrid::xbt::signal<void(simgrid::surf::Link*)> Link::onCreation;
-    simgrid::xbt::signal<void(simgrid::surf::Link*)> Link::onDestruction;
-    simgrid::xbt::signal<void(simgrid::surf::Link*)> Link::onStateChange;
+    simgrid::xbt::signal<void(Link*)> Link::onCreation;
+    simgrid::xbt::signal<void(Link*)> Link::onDestruction;
+    simgrid::xbt::signal<void(Link*)> Link::onStateChange;
 
-    simgrid::xbt::signal<void(simgrid::surf::NetworkAction*, simgrid::surf::Action::State, simgrid::surf::Action::State)> networkActionStateChangedCallbacks;
-    simgrid::xbt::signal<void(simgrid::surf::NetworkAction*, simgrid::routing::NetCard *src, simgrid::routing::NetCard *dst)> Link::onCommunicate;
+    simgrid::xbt::signal<void(NetworkAction*, Action::State, Action::State)> networkActionStateChangedCallbacks;
+    simgrid::xbt::signal<void(NetworkAction*, kernel::routing::NetCard *src, kernel::routing::NetCard *dst)> Link::onCommunicate;
 
   }
 }
index 8caa9df..fdf56e4 100644 (file)
@@ -77,7 +77,7 @@ namespace simgrid {
        * unlimited.
        * @return The action representing the communication
        */
-      virtual Action *communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate)=0;
+      virtual Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate)=0;
 
       /** @brief Function pointer to the function to use to solve the lmm_system_t
        *
@@ -151,19 +151,19 @@ namespace simgrid {
         public:
       /** @brief Callback signal fired when a new Link is created.
        *  Signature: void(Link*) */
-      static simgrid::xbt::signal<void(simgrid::surf::Link*)> onCreation;
+      static simgrid::xbt::signal<void(surf::Link*)> onCreation;
 
       /** @brief Callback signal fired when a Link is destroyed.
        *  Signature: void(Link*) */
-      static simgrid::xbt::signal<void(simgrid::surf::Link*)> onDestruction;
+      static simgrid::xbt::signal<void(surf::Link*)> onDestruction;
 
       /** @brief Callback signal fired when the state of a Link changes (when it is turned on or off)
        *  Signature: `void(Link*)` */
-      static simgrid::xbt::signal<void(simgrid::surf::Link*)> onStateChange;
+      static simgrid::xbt::signal<void(surf::Link*)> onStateChange;
 
       /** @brief Callback signal fired when a communication starts
        *  Signature: `void(NetworkAction *action, RoutingEdge *src, RoutingEdge *dst)` */
-      static simgrid::xbt::signal<void(simgrid::surf::NetworkAction*, simgrid::routing::NetCard *src, simgrid::routing::NetCard *dst)> onCommunicate;
+      static simgrid::xbt::signal<void(surf::NetworkAction*, kernel::routing::NetCard *src, kernel::routing::NetCard *dst)> onCommunicate;
 
 
 
index 272aa59..327d244 100644 (file)
@@ -254,7 +254,7 @@ L07Action::L07Action(Model *model, int host_nb, sg_host_t*host_list,
   xbt_free(host_list);
 }
 
-Action *NetworkL07Model::communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate)
+Action *NetworkL07Model::communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate)
 {
   sg_host_t*host_list = xbt_new0(sg_host_t, 2);
   double *flops_amount = xbt_new0(double, 2);
index 80a1fa4..5f8a828 100644 (file)
@@ -66,7 +66,7 @@ public:
       e_surf_link_sharing_policy_t policy,
       xbt_dict_t properties) override;
 
-  Action *communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate) override;
+  Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate) override;
   bool next_occuring_event_isIdempotent() override {return true;}
 
   HostL07Model *p_hostModel;
@@ -122,7 +122,7 @@ public:
 
   int unref() override;
 
-  std::vector<routing::NetCard*> * p_netcardList = new std::vector<routing::NetCard*>();
+  std::vector<kernel::routing::NetCard*> * p_netcardList = new std::vector<kernel::routing::NetCard*>();
   double *p_computationAmount;
   double *p_communicationAmount;
   double m_latency;
index 57e5b7f..776ab7a 100644 (file)
@@ -88,8 +88,8 @@ static std::vector<int> *explodesRadical(const char*radicals){
 
 
 /** The current AS in the parsing */
-static simgrid::routing::AsImpl *current_routing = nullptr;
-static simgrid::routing::AsImpl* routing_get_current()
+static simgrid::kernel::routing::AsImpl *current_routing = nullptr;
+static simgrid::kernel::routing::AsImpl* routing_get_current()
 {
   return current_routing;
 }
@@ -114,12 +114,12 @@ void sg_platf_new_host(sg_platf_host_cbarg_t host)
 {
   xbt_assert(sg_host_by_name(host->id) == nullptr, "Refusing to create a second host named '%s'.", host->id);
 
-  simgrid::routing::AsImpl* current_routing = routing_get_current();
-  if (current_routing->hierarchy_ == simgrid::routing::AsImpl::RoutingMode::unset)
-    current_routing->hierarchy_ = simgrid::routing::AsImpl::RoutingMode::base;
+  simgrid::kernel::routing::AsImpl* current_routing = routing_get_current();
+  if (current_routing->hierarchy_ == simgrid::kernel::routing::AsImpl::RoutingMode::unset)
+    current_routing->hierarchy_ = simgrid::kernel::routing::AsImpl::RoutingMode::base;
 
-  simgrid::routing::NetCard *netcard =
-      new simgrid::routing::NetCardImpl(host->id, simgrid::routing::NetCard::Type::Host, current_routing);
+  simgrid::kernel::routing::NetCard *netcard =
+      new simgrid::kernel::routing::NetCardImpl(host->id, simgrid::kernel::routing::NetCard::Type::Host, current_routing);
 
   sg_host_t h = simgrid::s4u::Host::by_name_or_create(host->id);
   h->pimpl_netcard = netcard;
@@ -175,16 +175,16 @@ void sg_platf_new_host(sg_platf_host_cbarg_t host)
 /** @brief Add a "router" to the network element list */
 void sg_platf_new_router(sg_platf_router_cbarg_t router)
 {
-  using simgrid::routing::AsCluster;
-  simgrid::routing::AsImpl* current_routing = routing_get_current();
+  using simgrid::kernel::routing::AsCluster;
+  simgrid::kernel::routing::AsImpl* current_routing = routing_get_current();
 
-  if (current_routing->hierarchy_ == simgrid::routing::AsImpl::RoutingMode::unset)
-    current_routing->hierarchy_ = simgrid::routing::AsImpl::RoutingMode::base;
+  if (current_routing->hierarchy_ == simgrid::kernel::routing::AsImpl::RoutingMode::unset)
+    current_routing->hierarchy_ = simgrid::kernel::routing::AsImpl::RoutingMode::base;
   xbt_assert(nullptr == xbt_lib_get_or_null(as_router_lib, router->id, ROUTING_ASR_LEVEL),
              "Refusing to create a router named '%s': this name already describes a node.", router->id);
 
-  simgrid::routing::NetCard* netcard =
-    new simgrid::routing::NetCardImpl(router->id, simgrid::routing::NetCard::Type::Router, current_routing);
+  simgrid::kernel::routing::NetCard* netcard =
+    new simgrid::kernel::routing::NetCardImpl(router->id, simgrid::kernel::routing::NetCard::Type::Router, current_routing);
   xbt_lib_set(as_router_lib, router->id, ROUTING_ASR_LEVEL, netcard);
   XBT_DEBUG("Router '%s' has the id %d", router->id, netcard->id());
 
@@ -208,7 +208,7 @@ void sg_platf_new_router(sg_platf_router_cbarg_t router)
 
   auto cluster = dynamic_cast<AsCluster*>(current_routing);
   if(cluster != nullptr)
-    cluster->router_ = static_cast<simgrid::routing::NetCard*>(xbt_lib_get_or_null(as_router_lib, router->id, ROUTING_ASR_LEVEL));
+    cluster->router_ = static_cast<simgrid::kernel::routing::NetCard*>(xbt_lib_get_or_null(as_router_lib, router->id, ROUTING_ASR_LEVEL));
 
   if (TRACE_is_enabled() && TRACE_needs_platform())
     sg_instr_new_router(router);
@@ -241,10 +241,10 @@ void sg_platf_new_link(sg_platf_link_cbarg_t link){
 
 void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster)
 {
-  using simgrid::routing::AsCluster;
-  using simgrid::routing::AsClusterDragonfly;
-  using simgrid::routing::AsClusterFatTree;
-  using simgrid::routing::AsClusterTorus;
+  using simgrid::kernel::routing::AsCluster;
+  using simgrid::kernel::routing::AsClusterDragonfly;
+  using simgrid::kernel::routing::AsClusterFatTree;
+  using simgrid::kernel::routing::AsClusterTorus;
 
   int rankId=0;
 
@@ -268,7 +268,7 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster)
     break;
   }
   sg_platf_new_AS_begin(&AS);
-  simgrid::routing::AsCluster *current_as = static_cast<AsCluster*>(routing_get_current());
+  simgrid::kernel::routing::AsCluster *current_as = static_cast<AsCluster*>(routing_get_current());
   current_as->parse_specific_arguments(cluster);
 
   if(cluster->loopback_bw!=0 || cluster->loopback_lat!=0){
@@ -377,7 +377,7 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster)
   if (!router.id || !strcmp(router.id, ""))
     router.id = newid = bprintf("%s%s_router%s", cluster->prefix, cluster->id, cluster->suffix);
   sg_platf_new_router(&router);
-  current_as->router_ = (simgrid::routing::NetCard*) xbt_lib_get_or_null(as_router_lib, router.id, ROUTING_ASR_LEVEL);
+  current_as->router_ = (simgrid::kernel::routing::NetCard*) xbt_lib_get_or_null(as_router_lib, router.id, ROUTING_ASR_LEVEL);
   free(newid);
 
   //Make the backbone
@@ -402,7 +402,7 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster)
   simgrid::surf::on_cluster(cluster);
 }
 void routing_cluster_add_backbone(simgrid::surf::Link* bb) {
-  simgrid::routing::AsCluster *cluster = dynamic_cast<simgrid::routing::AsCluster*>(current_routing);
+  simgrid::kernel::routing::AsCluster *cluster = dynamic_cast<simgrid::kernel::routing::AsCluster*>(current_routing);
 
   xbt_assert(cluster, "Only hosts from Cluster can get a backbone.");
   xbt_assert(nullptr == cluster->backbone_, "Cluster %s already has a backbone link!", cluster->name());
@@ -648,8 +648,8 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process)
 
 void sg_platf_new_peer(sg_platf_peer_cbarg_t peer)
 {
-  using simgrid::routing::NetCard;
-  using simgrid::routing::AsCluster;
+  using simgrid::kernel::routing::NetCard;
+  using simgrid::kernel::routing::AsCluster;
 
   char *host_id = bprintf("peer_%s", peer->id);
   char *router_id = bprintf("router_%s", peer->id);
@@ -827,23 +827,23 @@ simgrid::s4u::As * sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS)
 
 
   /* search the routing model */
-  simgrid::routing::AsImpl *new_as = nullptr;
+  simgrid::kernel::routing::AsImpl *new_as = nullptr;
   switch(AS->routing){
-    case A_surfxml_AS_routing_Cluster:        new_as = new simgrid::routing::AsCluster(AS->id);        break;
-    case A_surfxml_AS_routing_ClusterDragonfly:   new_as = new simgrid::routing::AsClusterDragonfly(AS->id);   break;
-    case A_surfxml_AS_routing_ClusterTorus:   new_as = new simgrid::routing::AsClusterTorus(AS->id);   break;
-    case A_surfxml_AS_routing_ClusterFatTree: new_as = new simgrid::routing::AsClusterFatTree(AS->id); break;
-    case A_surfxml_AS_routing_Dijkstra:       new_as = new simgrid::routing::AsDijkstra(AS->id, 0);    break;
-    case A_surfxml_AS_routing_DijkstraCache:  new_as = new simgrid::routing::AsDijkstra(AS->id, 1);    break;
-    case A_surfxml_AS_routing_Floyd:          new_as = new simgrid::routing::AsFloyd(AS->id);          break;
-    case A_surfxml_AS_routing_Full:           new_as = new simgrid::routing::AsFull(AS->id);           break;
-    case A_surfxml_AS_routing_None:           new_as = new simgrid::routing::AsNone(AS->id);           break;
-    case A_surfxml_AS_routing_Vivaldi:        new_as = new simgrid::routing::AsVivaldi(AS->id);        break;
+    case A_surfxml_AS_routing_Cluster:        new_as = new simgrid::kernel::routing::AsCluster(AS->id);        break;
+    case A_surfxml_AS_routing_ClusterDragonfly:   new_as = new simgrid::kernel::routing::AsClusterDragonfly(AS->id);   break;
+    case A_surfxml_AS_routing_ClusterTorus:   new_as = new simgrid::kernel::routing::AsClusterTorus(AS->id);   break;
+    case A_surfxml_AS_routing_ClusterFatTree: new_as = new simgrid::kernel::routing::AsClusterFatTree(AS->id); break;
+    case A_surfxml_AS_routing_Dijkstra:       new_as = new simgrid::kernel::routing::AsDijkstra(AS->id, 0);    break;
+    case A_surfxml_AS_routing_DijkstraCache:  new_as = new simgrid::kernel::routing::AsDijkstra(AS->id, 1);    break;
+    case A_surfxml_AS_routing_Floyd:          new_as = new simgrid::kernel::routing::AsFloyd(AS->id);          break;
+    case A_surfxml_AS_routing_Full:           new_as = new simgrid::kernel::routing::AsFull(AS->id);           break;
+    case A_surfxml_AS_routing_None:           new_as = new simgrid::kernel::routing::AsNone(AS->id);           break;
+    case A_surfxml_AS_routing_Vivaldi:        new_as = new simgrid::kernel::routing::AsVivaldi(AS->id);        break;
     default:                                  xbt_die("Not a valid model!");                        break;
   }
 
   /* make a new routing component */
-  simgrid::routing::NetCard *netcard = new simgrid::routing::NetCardImpl(new_as->name(), simgrid::routing::NetCard::Type::As, current_routing);
+  simgrid::kernel::routing::NetCard *netcard = new simgrid::kernel::routing::NetCardImpl(new_as->name(), simgrid::kernel::routing::NetCard::Type::As, current_routing);
 
   if (current_routing == nullptr && routing_platf->root_ == nullptr) { /* it is the first one */
     routing_platf->root_ = new_as;
@@ -854,8 +854,8 @@ simgrid::s4u::As * sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS)
     /* it is a part of the tree */
     new_as->father_ = current_routing;
     /* set the father behavior */
-    if (current_routing->hierarchy_ == simgrid::routing::AsImpl::RoutingMode::unset)
-      current_routing->hierarchy_ = simgrid::routing::AsImpl::RoutingMode::recursive;
+    if (current_routing->hierarchy_ == simgrid::kernel::routing::AsImpl::RoutingMode::unset)
+      current_routing->hierarchy_ = simgrid::kernel::routing::AsImpl::RoutingMode::recursive;
     /* add to the sons dictionary */
     xbt_dict_set(current_routing->children(), AS->id, (void *) new_as, nullptr);
   } else {
@@ -869,7 +869,7 @@ simgrid::s4u::As * sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS)
   current_routing = new_as;
   current_routing->netcard_ = netcard;
 
-  simgrid::routing::asCreatedCallbacks(new_as);
+  simgrid::kernel::routing::asCreatedCallbacks(new_as);
   if (TRACE_is_enabled())
     sg_instr_AS_begin(AS);
 
@@ -886,7 +886,7 @@ void sg_platf_new_AS_seal()
 {
   xbt_assert(current_routing, "Cannot seal the current AS: none under construction");
   current_routing->seal();
-  current_routing = static_cast<simgrid::routing::AsImpl*>(current_routing->father());
+  current_routing = static_cast<simgrid::kernel::routing::AsImpl*>(current_routing->father());
 
   if (TRACE_is_enabled())
     sg_instr_AS_end();
@@ -895,9 +895,9 @@ void sg_platf_new_AS_seal()
 /** @brief Add a link connecting an host to the rest of its AS (which must be cluster or vivaldi) */
 void sg_platf_new_hostlink(sg_platf_host_link_cbarg_t hostlink)
 {
-  simgrid::routing::NetCard *netcard = sg_host_by_name(hostlink->id)->pimpl_netcard;
+  simgrid::kernel::routing::NetCard *netcard = sg_host_by_name(hostlink->id)->pimpl_netcard;
   xbt_assert(netcard, "Host '%s' not found!", hostlink->id);
-  xbt_assert(dynamic_cast<simgrid::routing::AsCluster*>(current_routing),
+  xbt_assert(dynamic_cast<simgrid::kernel::routing::AsCluster*>(current_routing),
       "Only hosts from Cluster and Vivaldi ASes can get an host_link.");
 
   s_surf_parsing_link_up_down_t link_up_down;
@@ -908,7 +908,7 @@ void sg_platf_new_hostlink(sg_platf_host_link_cbarg_t hostlink)
   xbt_assert(link_up_down.linkDown, "Link '%s' not found!",hostlink->link_down);
 
   // If dynar is is greater than netcard id and if the host_link is already defined
-  auto as_cluster = static_cast<simgrid::routing::AsCluster*>(current_routing);
+  auto as_cluster = static_cast<simgrid::kernel::routing::AsCluster*>(current_routing);
   if((int)xbt_dynar_length(as_cluster->privateLinks_) > netcard->id() &&
       xbt_dynar_get_as(as_cluster->privateLinks_, netcard->id(), void*))
   surf_parse_error("Host_link for '%s' is already defined!",hostlink->id);
index 4ff30ed..8a2ec6d 100644 (file)
@@ -287,7 +287,7 @@ void surf_init(int *argc, char **argv)
   XBT_DEBUG("Add routing levels");
   ROUTING_PROP_ASR_LEVEL = xbt_lib_add_level(as_router_lib, nullptr);
   ROUTING_ASR_LEVEL = xbt_lib_add_level(as_router_lib, [](void* p) {
-    delete static_cast<simgrid::routing::NetCard*>(p);
+    delete static_cast<simgrid::kernel::routing::NetCard*>(p);
   });
 
   XBT_DEBUG("Add SURF levels");
index 857e69d..d5771d1 100644 (file)
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
   /* Callbacks */
-  simgrid::xbt::signal<void(simgrid::routing::NetCard*)> netcardCreatedCallbacks;
-  simgrid::xbt::signal<void(simgrid::s4u::As*)> asCreatedCallbacks;
+  simgrid::xbt::signal<void(NetCard*)> netcardCreatedCallbacks;
+  simgrid::xbt::signal<void(s4u::As*)> asCreatedCallbacks;
 
-
-}} // namespace simgrid::routing
+}}} // namespace simgrid::kernel::routing
 
 /**
  * @ingroup SURF_build_api
@@ -53,17 +53,17 @@ int ROUTING_PROP_ASR_LEVEL = -1;     //Where the properties are stored
  *
  * Netcards are the thing that connect host or routers to the network
  */
-simgrid::routing::NetCard *sg_netcard_by_name_or_null(const char *name)
+simgrid::kernel::routing::NetCard *sg_netcard_by_name_or_null(const char *name)
 {
   sg_host_t h = sg_host_by_name(name);
-  simgrid::routing::NetCard *netcard = h==nullptr ? nullptr: h->pimpl_netcard;
+  simgrid::kernel::routing::NetCard *netcard = h==nullptr ? nullptr: h->pimpl_netcard;
   if (!netcard)
-    netcard = (simgrid::routing::NetCard*) xbt_lib_get_or_null(as_router_lib, name, ROUTING_ASR_LEVEL);
+    netcard = (simgrid::kernel::routing::NetCard*) xbt_lib_get_or_null(as_router_lib, name, ROUTING_ASR_LEVEL);
   return netcard;
 }
 
 /* Global vars */
-simgrid::routing::RoutingPlatf *routing_platf = nullptr;
+simgrid::kernel::routing::RoutingPlatf *routing_platf = nullptr;
 
 
 void sg_platf_new_trace(sg_platf_trace_cbarg_t trace)
@@ -80,6 +80,7 @@ void sg_platf_new_trace(sg_platf_trace_cbarg_t trace)
 }
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
 /**
@@ -128,13 +129,12 @@ xbt_dynar_t RoutingPlatf::getOneLinkRoutes(){
   return _recursiveGetOneLinkRoutes(root_);
 }
 
-}
-}
+}}}
 
 /** @brief create the root AS */
 void routing_model_create(Link *loopback)
 {
-  routing_platf = new simgrid::routing::RoutingPlatf(loopback);
+  routing_platf = new simgrid::kernel::routing::RoutingPlatf(loopback);
 }
 
 /* ************************************************************************** */
@@ -145,7 +145,7 @@ static void check_disk_attachment()
   xbt_lib_cursor_t cursor;
   char *key;
   void **data;
-  simgrid::routing::NetCard *host_elm;
+  simgrid::kernel::routing::NetCard *host_elm;
   xbt_lib_foreach(storage_lib, cursor, key, data) {
     if(xbt_lib_get_level(xbt_lib_get_elm_or_null(storage_lib, key), SURF_STORAGE_LEVEL) != nullptr) {
     simgrid::surf::Storage *storage = static_cast<simgrid::surf::Storage*>(xbt_lib_get_level(xbt_lib_get_elm_or_null(storage_lib, key), SURF_STORAGE_LEVEL));
@@ -168,11 +168,11 @@ void routing_exit(void) {
   delete routing_platf;
 }
 
-simgrid::routing::RoutingPlatf::RoutingPlatf(simgrid::surf::Link *loopback)
+simgrid::kernel::routing::RoutingPlatf::RoutingPlatf(simgrid::surf::Link *loopback)
 : loopback_(loopback)
 {
 }
-simgrid::routing::RoutingPlatf::~RoutingPlatf()
+simgrid::kernel::routing::RoutingPlatf::~RoutingPlatf()
 {
   delete root_;
 }
index 420557e..8645ad7 100644 (file)
@@ -24,6 +24,7 @@ XBT_PRIVATE xbt_edge_t new_xbt_graph_edge (xbt_graph_t graph, xbt_node_t s, xbt_
 SG_END_DECL()
 
 namespace simgrid {
+namespace kernel {
 namespace routing {
 
   XBT_PUBLIC_DATA(simgrid::xbt::signal<void(s4u::As*)>) asCreatedCallbacks;
@@ -64,7 +65,7 @@ public:
   {
     if (containingAS != nullptr)
       id_ = containingAS->addComponent(this);
-    simgrid::routing::netcardCreatedCallbacks(this);
+    simgrid::kernel::routing::netcardCreatedCallbacks(this);
   }
   ~NetCardImpl() { xbt_free(name_);};
 
@@ -108,7 +109,6 @@ public:
   void getRouteAndLatency(NetCard *src, NetCard *dst, std::vector<Link*> * links, double *latency);
 };
 
-}
-}
+}}}
 
 #endif /* NETWORK_ROUTING_HPP_ */
index 5e61276..680fce3 100644 (file)
@@ -24,12 +24,12 @@ int main(int argc, char **argv)
   printf("Host number: %zu, link number: %d, elmts number: %d\n", sg_host_count(), sg_link_count(), size);
 
   xbt_dict_foreach(host_list, cursor, key, data) {
-    simgrid::routing::NetCard * nc = sg_netcard_by_name_or_null(key);
+    simgrid::kernel::routing::NetCard * nc = sg_netcard_by_name_or_null(key);
     printf("   - Seen: \"%s\". Type: %s\n", key, nc->isRouter() ? "router" : (nc->isAS()?"AS":"host"));
   }
 
   xbt_lib_foreach(as_router_lib, cursor, key, data) {
-    simgrid::routing::NetCard * nc = sg_netcard_by_name_or_null(key);
+    simgrid::kernel::routing::NetCard * nc = sg_netcard_by_name_or_null(key);
     printf("   - Seen: \"%s\". Type: %s\n", key, nc->isRouter() ? "router" : (nc->isAS()?"AS":"host"));
   }