Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case routing
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 3 Apr 2018 07:22:39 +0000 (09:22 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 3 Apr 2018 09:51:50 +0000 (11:51 +0200)
23 files changed:
include/simgrid/kernel/routing/ClusterZone.hpp
include/simgrid/kernel/routing/DijkstraZone.hpp
include/simgrid/kernel/routing/DragonflyZone.hpp
include/simgrid/kernel/routing/EmptyZone.hpp
include/simgrid/kernel/routing/FatTreeZone.hpp
include/simgrid/kernel/routing/FloydZone.hpp
include/simgrid/kernel/routing/FullZone.hpp
include/simgrid/kernel/routing/NetZoneImpl.hpp
include/simgrid/kernel/routing/TorusZone.hpp
include/simgrid/kernel/routing/VivaldiZone.hpp
include/simgrid/s4u/NetZone.hpp
src/kernel/routing/ClusterZone.cpp
src/kernel/routing/DijkstraZone.cpp
src/kernel/routing/DragonflyZone.cpp
src/kernel/routing/FatTreeZone.cpp
src/kernel/routing/FloydZone.cpp
src/kernel/routing/FullZone.cpp
src/kernel/routing/NetZoneImpl.cpp
src/kernel/routing/RoutedZone.cpp
src/kernel/routing/TorusZone.cpp
src/kernel/routing/VivaldiZone.cpp
src/s4u/s4u_netzone.cpp
src/surf/sg_platf.cpp

index 3ac7011..0005d46 100644 (file)
@@ -69,7 +69,7 @@ class ClusterZone : public NetZoneImpl {
 public:
   explicit ClusterZone(NetZone* father, std::string name);
 
-  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
+  void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
   void get_graph(xbt_graph_t graph, std::map<std::string, xbt_node_t>* nodes,
                  std::map<std::string, xbt_edge_t>* edges) override;
 
@@ -83,12 +83,12 @@ public:
   /* The pair is {linkUp, linkDown} */
   std::unordered_map<unsigned int, std::pair<surf::LinkImpl*, surf::LinkImpl*>> private_links_;
 
-  unsigned int nodePosition(int id) { return id * num_links_per_node_; }
-  unsigned int nodePositionWithLoopback(int id) { return nodePosition(id) + (has_loopback_ ? 1 : 0); }
-  unsigned int nodePositionWithLimiter(int id) { return nodePositionWithLoopback(id) + (has_limiter_ ? 1 : 0); }
+  unsigned int node_pos(int id) { return id * num_links_per_node_; }
+  unsigned int node_pos_with_loopback(int id) { return node_pos(id) + (has_loopback_ ? 1 : 0); }
+  unsigned int node_pos_with_loopback_limiter(int id) { return node_pos_with_loopback(id) + (has_limiter_ ? 1 : 0); }
 
-  surf::LinkImpl* backbone_      = nullptr;
   void* loopback_                = nullptr;
+  surf::LinkImpl* backbone_        = nullptr;
   NetPoint* router_              = nullptr;
   bool has_limiter_                = false;
   bool has_loopback_               = false;
index 2a638bd..2003a9a 100644 (file)
@@ -51,9 +51,9 @@ public:
    * After this function returns, any node in the graph
    * will have a loopback attached to it.
    */
-  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat) override;
-  void addRoute(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
-                std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical) override;
+  void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat) override;
+  void add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+                 std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical) override;
 
   xbt_graph_t route_graph_ = nullptr;          /* xbt_graph */
   std::map<int, xbt_node_t> graph_node_map_;   /* map */
index f5063d9..4bccc4e 100644 (file)
@@ -63,7 +63,7 @@ public:
   explicit DragonflyZone(NetZone* father, std::string name);
   ~DragonflyZone() override;
   //      void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position) override;
-  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
+  void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
   void parse_specific_arguments(ClusterCreationArgs* cluster) override;
   void seal() override;
   void generateRouters();
index d92f0c0..421e552 100644 (file)
@@ -24,7 +24,7 @@ public:
   explicit EmptyZone(NetZone* father, std::string name);
   ~EmptyZone() override;
 
-  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override
+  void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override
   {
     /* There can't be route in an Empty zone */
   }
index 251cb3d..1fb7230 100644 (file)
@@ -100,7 +100,7 @@ class XBT_PRIVATE FatTreeZone : public ClusterZone {
 public:
   explicit FatTreeZone(NetZone* father, std::string name);
   ~FatTreeZone() override;
-  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
+  void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
 
   /** \brief Generate the fat tree
    *
@@ -131,7 +131,7 @@ private:
 
   ClusterCreationArgs* cluster_ = nullptr;
 
-  void addLink(FatTreeNode* parent, unsigned int parent_port, FatTreeNode* child, unsigned int child_port);
+  void add_link(FatTreeNode* parent, unsigned int parent_port, FatTreeNode* child, unsigned int child_port);
   int getLevelPosition(const unsigned int level);
   void generateLabels();
   void generateSwitches();
index 7046ec9..e9e65ec 100644 (file)
@@ -26,10 +26,10 @@ public:
   explicit FloydZone(NetZone* father, std::string name);
   ~FloydZone() override;
 
-  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
-  void addRoute(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
-                kernel::routing::NetPoint* gw_dst, std::vector<simgrid::surf::LinkImpl*>& link_list,
-                bool symmetrical) override;
+  void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
+  void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
+                 kernel::routing::NetPoint* gw_dst, std::vector<simgrid::surf::LinkImpl*>& link_list,
+                 bool symmetrical) override;
   void seal() override;
 
 private:
index 4890a24..5f8fcde 100644 (file)
@@ -24,10 +24,10 @@ public:
   void seal() override;
   ~FullZone() override;
 
-  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
-  void addRoute(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
-                kernel::routing::NetPoint* gw_dst, std::vector<simgrid::surf::LinkImpl*>& link_list,
-                bool symmetrical) override;
+  void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
+  void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
+                 kernel::routing::NetPoint* gw_dst, std::vector<simgrid::surf::LinkImpl*>& link_list,
+                 bool symmetrical) override;
 
 private:
   RouteCreationArgs** routing_table_ = nullptr;
index 854b1f0..18a525b 100644 (file)
@@ -70,7 +70,7 @@ protected:
    * @param into Container into which the traversed links and gateway informations should be pushed
    * @param latency Accumulator in which the latencies should be added (caller must set it to 0)
    */
-  virtual void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) = 0;
+  virtual void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) = 0;
   /** @brief retrieves the list of all routes of size 1 (of type src x dst x Link) */
   /* returns whether we found a bypass path */
   bool get_bypass_route(routing::NetPoint* src, routing::NetPoint* dst,
index 463f654..22a172e 100644 (file)
@@ -23,7 +23,7 @@ class XBT_PRIVATE TorusZone : public ClusterZone {
 public:
   explicit TorusZone(NetZone* father, std::string name);
   void create_links_for_node(ClusterCreationArgs* cluster, int id, int rank, unsigned int position) override;
-  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
+  void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
   void parse_specific_arguments(ClusterCreationArgs* cluster) override;
 
 private:
index ccec349..a5e1bc6 100644 (file)
@@ -49,7 +49,7 @@ public:
   explicit VivaldiZone(NetZone* father, std::string name);
 
   void setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, std::string coord);
-  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
+  void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
 };
 
 namespace vivaldi {
index defe0ca..2b6b42e 100644 (file)
@@ -46,6 +46,18 @@ public:
 
   XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_name()") const std::string& getName() const { return get_name(); }
   XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_cname()") const char* getCname() const { return get_cname(); }
+  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::add_route()") void addRoute(
+      kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
+      kernel::routing::NetPoint* gw_dst, std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical)
+  {
+    add_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::add_bypass_route()") void addBypassRoute(
+      kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
+      kernel::routing::NetPoint* gw_dst, std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical)
+  {
+    add_bypass_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  }
 
   std::vector<NetZone*>* getChildren();             // Sub netzones
   void getHosts(std::vector<s4u::Host*> * whereto); // retrieve my content as a vector of hosts
@@ -60,9 +72,9 @@ public:
 
   /* Add content to the netzone, at parsing time. It should be sealed afterward. */
   virtual int addComponent(kernel::routing::NetPoint * elm); /* A host, a router or a netzone, whatever */
-  virtual void addRoute(kernel::routing::NetPoint * src, kernel::routing::NetPoint * dst,
-                        kernel::routing::NetPoint * gw_src, kernel::routing::NetPoint * gw_dst,
-                        std::vector<simgrid::surf::LinkImpl*> & link_list, bool symmetrical);
+  virtual void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                         kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                         std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical);
   virtual void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
                                 kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
                                 std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical) = 0;
index 5b2f74c..f162c5b 100644 (file)
@@ -21,7 +21,7 @@ ClusterZone::ClusterZone(NetZone* father, std::string name) : NetZoneImpl(father
 {
 }
 
-void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
+void ClusterZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
 {
   XBT_VERB("cluster getLocalRoute from '%s'[%u] to '%s'[%u]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
   xbt_assert(not private_links_.empty(),
@@ -30,7 +30,7 @@ void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs*
   if ((src->id() == dst->id()) && has_loopback_) {
     xbt_assert(not src->is_router(), "Routing from a cluster private router to itself is meaningless");
 
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePosition(src->id()));
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(node_pos(src->id()));
     route->link_list.push_back(info.first);
     if (lat)
       *lat += info.first->latency();
@@ -39,11 +39,11 @@ void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs*
 
   if (not src->is_router()) { // No private link for the private router
     if (has_limiter_) {      // limiter for sender
-      std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePositionWithLoopback(src->id()));
+      std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(node_pos_with_loopback(src->id()));
       route->link_list.push_back(info.first);
     }
 
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePositionWithLimiter(src->id()));
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(node_pos_with_loopback_limiter(src->id()));
     if (info.first) { // link up
       route->link_list.push_back(info.first);
       if (lat)
@@ -59,14 +59,14 @@ void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs*
 
   if (not dst->is_router()) { // No specific link for router
 
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePositionWithLimiter(dst->id()));
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(node_pos_with_loopback_limiter(dst->id()));
     if (info.second) { // link down
       route->link_list.push_back(info.second);
       if (lat)
         *lat += info.second->latency();
     }
     if (has_limiter_) { // limiter for receiver
-      info = private_links_.at(nodePositionWithLoopback(dst->id()));
+      info = private_links_.at(node_pos_with_loopback(dst->id()));
       route->link_list.push_back(info.first);
     }
   }
index 71715cd..b26b405 100644 (file)
@@ -123,7 +123,7 @@ void DijkstraZone::newRoute(int src_id, int dst_id, simgrid::kernel::routing::Ro
   xbt_graph_new_edge(route_graph_, src, dst, e_route);
 }
 
-void DijkstraZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
+void DijkstraZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
 {
   getRouteCheckParams(src, dst);
   int src_id = src->id();
@@ -269,9 +269,9 @@ DijkstraZone::DijkstraZone(NetZone* father, std::string name, bool cached) : Rou
 {
 }
 
-void DijkstraZone::addRoute(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                            kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                            std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical)
+void DijkstraZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                             kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                             std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical)
 {
   const char* srcName = src->get_cname();
   const char* dstName = dst->get_cname();
index d7bc1a1..5d31232 100644 (file)
@@ -262,7 +262,7 @@ void DragonflyZone::generateLinks()
   }
 }
 
-void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* latency)
+void DragonflyZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* latency)
 {
   // Minimal routing version.
   // TODO : non-minimal random one, and adaptive ?
@@ -274,7 +274,7 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArg
            dst->id());
 
   if ((src->id() == dst->id()) && has_loopback_) {
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePosition(src->id()));
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(node_pos(src->id()));
 
     route->link_list.push_back(info.first);
     if (latency)
@@ -302,7 +302,7 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArg
     *latency += myRouter->my_nodes_[myCoords[3] * num_links_per_link_]->latency();
 
   if (has_limiter_) { // limiter for sender
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePositionWithLoopback(src->id()));
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(node_pos_with_loopback(src->id()));
     route->link_list.push_back(info.first);
   }
 
@@ -352,7 +352,7 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArg
   }
 
   if (has_limiter_) { // limiter for receiver
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePositionWithLoopback(dst->id()));
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(node_pos_with_loopback(dst->id()));
     route->link_list.push_back(info.first);
   }
 
index 66a4fa1..0884942 100644 (file)
@@ -58,7 +58,7 @@ bool FatTreeZone::isInSubTree(FatTreeNode* root, FatTreeNode* node)
   return true;
 }
 
-void FatTreeZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency)
+void FatTreeZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency)
 {
 
   if (dst->is_router() || src->is_router())
@@ -190,8 +190,8 @@ int FatTreeZone::connectNodeToParents(FatTreeNode* node)
                 node->id, node->level, node->position, (*currentParentNode)->id, (*currentParentNode)->level,
                 (*currentParentNode)->position, this->num_port_lower_level_[level]);
       for (unsigned int j = 0; j < this->num_port_lower_level_[level]; j++) {
-        this->addLink(*currentParentNode, node->label[level] + j * this->num_children_per_node_[level], node,
-                      (*currentParentNode)->label[level] + j * this->num_parents_per_node_[level]);
+        this->add_link(*currentParentNode, node->label[level] + j * this->num_children_per_node_[level], node,
+                       (*currentParentNode)->label[level] + j * this->num_parents_per_node_[level]);
       }
       connectionsNumber++;
     }
@@ -346,7 +346,7 @@ void FatTreeZone::add_processing_node(int id)
   this->nodes_.push_back(newNode);
 }
 
-void FatTreeZone::addLink(FatTreeNode* parent, unsigned int parentPort, FatTreeNode* child, unsigned int childPort)
+void FatTreeZone::add_link(FatTreeNode* parent, unsigned int parentPort, FatTreeNode* child, unsigned int childPort)
 {
   FatTreeLink* newLink;
   newLink = new FatTreeLink(this->cluster_, child, parent);
index 2e9732e..c6ace47 100644 (file)
@@ -44,7 +44,7 @@ FloydZone::~FloydZone()
   delete[] cost_table_;
 }
 
-void FloydZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
+void FloydZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
 {
   unsigned int table_size = getTableSize();
 
@@ -85,9 +85,9 @@ void FloydZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* r
   }
 }
 
-void FloydZone::addRoute(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                         kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                         std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical)
+void FloydZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                          kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                          std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical)
 {
   /* set the size of table routing */
   unsigned int table_size = getTableSize();
index c2ca632..f5c8ab5 100644 (file)
@@ -52,7 +52,7 @@ FullZone::~FullZone()
   }
 }
 
-void FullZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* res, double* lat)
+void FullZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* res, double* lat)
 {
   XBT_DEBUG("full getLocalRoute from %s[%u] to %s[%u]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
 
@@ -70,9 +70,9 @@ void FullZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* re
   }
 }
 
-void FullZone::addRoute(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                        kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                        std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical)
+void FullZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                         kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                         std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical)
 {
   addRouteCheckParams(src, dst, gw_src, gw_dst, link_list, symmetrical);
 
index bbff2db..1caed8f 100644 (file)
@@ -333,14 +333,14 @@ void NetZoneImpl::get_global_route(routing::NetPoint* src, routing::NetPoint* ds
   /* If src and dst are in the same netzone, life is good */
   if (src_ancestor == dst_ancestor) { /* SURF_ROUTING_BASE */
     route.link_list = std::move(links);
-    common_ancestor->getLocalRoute(src, dst, &route, latency);
+    common_ancestor->get_local_route(src, dst, &route, latency);
     links = std::move(route.link_list);
     return;
   }
 
   /* Not in the same netzone, no bypass. We'll have to find our path between the netzones recursively */
 
-  common_ancestor->getLocalRoute(src_ancestor->netpoint_, dst_ancestor->netpoint_, &route, latency);
+  common_ancestor->get_local_route(src_ancestor->netpoint_, dst_ancestor->netpoint_, &route, latency);
   xbt_assert((route.gw_src != nullptr) && (route.gw_dst != nullptr), "bad gateways for route from \"%s\" to \"%s\"",
              src->get_cname(), dst->get_cname());
 
index fc95e56..d61f453 100644 (file)
@@ -75,7 +75,7 @@ void RoutedZone::get_graph(xbt_graph_t graph, std::map<std::string, xbt_node_t>*
 
       RouteCreationArgs* route = new RouteCreationArgs();
 
-      getLocalRoute(my_src, my_dst, route, nullptr);
+      get_local_route(my_src, my_dst, route, nullptr);
 
       XBT_DEBUG("get_route_and_latency %s -> %s", my_src->get_cname(), my_dst->get_cname());
 
index d25a3ba..e2041cd 100644 (file)
@@ -93,7 +93,7 @@ void TorusZone::parse_specific_arguments(ClusterCreationArgs* cluster)
   }
 }
 
-void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
+void TorusZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
 {
 
   XBT_VERB("torus getLocalRoute from '%s'[%u] to '%s'[%u]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
index 2d6cb44..39666c0 100644 (file)
@@ -76,7 +76,7 @@ void VivaldiZone::setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, s
   private_links_.insert({netpoint->id(), {linkUp, linkDown}});
 }
 
-void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
+void VivaldiZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
 {
   XBT_DEBUG("vivaldi getLocalRoute from '%s'[%u] '%s'[%u]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
 
index 8cede7f..f15347b 100644 (file)
@@ -104,8 +104,9 @@ int NetZone::addComponent(kernel::routing::NetPoint* elm)
   return vertices_.size() - 1; // The rank of the newly created object
 }
 
-void NetZone::addRoute(sg_netpoint_t /*src*/, sg_netpoint_t /*dst*/, sg_netpoint_t /*gw_src*/, sg_netpoint_t /*gw_dst*/,
-                       std::vector<simgrid::surf::LinkImpl*>& /*link_list*/, bool /*symmetrical*/)
+void NetZone::add_route(sg_netpoint_t /*src*/, sg_netpoint_t /*dst*/, sg_netpoint_t /*gw_src*/,
+                        sg_netpoint_t /*gw_dst*/, std::vector<simgrid::surf::LinkImpl*>& /*link_list*/,
+                        bool /*symmetrical*/)
 {
   xbt_die("NetZone '%s' does not accept new routes (wrong class).", name_.c_str());
 }
index 9d299b9..10f6747 100644 (file)
@@ -227,7 +227,7 @@ void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster
       linkDown = simgrid::surf::LinkImpl::byName(tmp_link);
 
       auto* as_cluster = static_cast<ClusterZone*>(current_as);
-      as_cluster->private_links_.insert({as_cluster->nodePosition(rankId), {linkUp, linkDown}});
+      as_cluster->private_links_.insert({as_cluster->node_pos(rankId), {linkUp, linkDown}});
     }
 
     //add a limiter link (shared link to account for maximal bandwidth of the node)
@@ -245,14 +245,14 @@ void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster
       sg_platf_new_link(&link);
       linkDown = simgrid::surf::LinkImpl::byName(tmp_link);
       linkUp   = linkDown;
-      current_as->private_links_.insert({current_as->nodePositionWithLoopback(rankId), {linkUp, linkDown}});
+      current_as->private_links_.insert({current_as->node_pos_with_loopback(rankId), {linkUp, linkDown}});
     }
 
     //call the cluster function that adds the others links
     if (cluster->topology == simgrid::kernel::routing::ClusterTopology::FAT_TREE) {
       static_cast<FatTreeZone*>(current_as)->add_processing_node(i);
     } else {
-      current_as->create_links_for_node(cluster, i, rankId, current_as->nodePositionWithLimiter(rankId));
+      current_as->create_links_for_node(cluster, i, rankId, current_as->node_pos_with_loopback_limiter(rankId));
     }
     rankId++;
   }
@@ -398,8 +398,8 @@ void sg_platf_new_mount(simgrid::kernel::routing::MountCreationArgs* mount)
 
 void sg_platf_new_route(simgrid::kernel::routing::RouteCreationArgs* route)
 {
-  routing_get_current()->addRoute(route->src, route->dst, route->gw_src, route->gw_dst, route->link_list,
-                                  route->symmetrical);
+  routing_get_current()->add_route(route->src, route->dst, route->gw_src, route->gw_dst, route->link_list,
+                                   route->symmetrical);
 }
 
 void sg_platf_new_bypassRoute(simgrid::kernel::routing::RouteCreationArgs* bypassRoute)