Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case RoutedZone
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 23 Jun 2018 08:18:32 +0000 (10:18 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 23 Jun 2018 08:18:37 +0000 (10:18 +0200)
include/simgrid/kernel/routing/RoutedZone.hpp
src/kernel/routing/DijkstraZone.cpp
src/kernel/routing/FloydZone.cpp
src/kernel/routing/FullZone.cpp
src/kernel/routing/RoutedZone.cpp

index 443cd4e..097e849 100644 (file)
@@ -54,14 +54,33 @@ public:
 
   void get_graph(xbt_graph_t graph, std::map<std::string, xbt_node_t>* nodes,
                  std::map<std::string, xbt_edge_t>* edges) 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;
-  virtual RouteCreationArgs* newExtendedRoute(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
-                                              NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
-                                              bool symmetrical, bool change_order);
 
 protected:
 
 protected:
-  void getRouteCheckParams(NetPoint* src, NetPoint* dst);
-  void addRouteCheckParams(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
-                           std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
+  virtual RouteCreationArgs* new_extended_route(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
+                                                NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
+                                                bool symmetrical, bool change_order);
+  void get_route_check_params(NetPoint* src, NetPoint* dst);
+  void add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+                              std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
+
+  // deprecated
+  XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::new_extended_route()") virtual RouteCreationArgs* newExtendedRoute(
+      RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+      std::vector<resource::LinkImpl*>& link_list, bool symmetrical, bool change_order)
+  {
+    return new_extended_route(hierarchy, src, dst, gw_src, gw_dst, link_list, symmetrical, change_order);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::get_route_check_params()") void getRouteCheckParams(NetPoint* src,
+                                                                                                         NetPoint* dst)
+  {
+    get_route_check_params(src, dst);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::add_route_check_params()") void addRouteCheckParams(
+      NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
+      bool symmetrical)
+  {
+    add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  }
 };
 } // namespace routing
 } // namespace kernel
 };
 } // namespace routing
 } // namespace kernel
index a377dc5..b5642e3 100644 (file)
@@ -126,7 +126,7 @@ void DijkstraZone::new_route(int src_id, int dst_id, simgrid::kernel::routing::R
 
 void DijkstraZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
 {
 
 void DijkstraZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
 {
-  getRouteCheckParams(src, dst);
+  get_route_check_params(src, dst);
   int src_id = src->id();
   int dst_id = dst->id();
 
   int src_id = src->id();
   int dst_id = dst->id();
 
@@ -276,7 +276,7 @@ void DijkstraZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, Net
   const char* srcName = src->get_cname();
   const char* dstName = dst->get_cname();
 
   const char* srcName = src->get_cname();
   const char* dstName = dst->get_cname();
 
-  addRouteCheckParams(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
 
   /* Create the topology graph */
   if (not route_graph_)
 
   /* Create the topology graph */
   if (not route_graph_)
@@ -286,7 +286,7 @@ void DijkstraZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, Net
    * nodes */
 
   /* Add the route to the base */
    * nodes */
 
   /* Add the route to the base */
-  RouteCreationArgs* e_route = newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
+  RouteCreationArgs* e_route = new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
   new_route(src->id(), dst->id(), e_route);
 
   // Symmetrical YES
   new_route(src->id(), dst->id(), e_route);
 
   // Symmetrical YES
@@ -314,7 +314,7 @@ void DijkstraZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, Net
       gw_dst           = gw_tmp;
     }
     RouteCreationArgs* link_route_back =
       gw_dst           = gw_tmp;
     }
     RouteCreationArgs* link_route_back =
-        newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
+        new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
     new_route(dst->id(), src->id(), link_route_back);
   }
 }
     new_route(dst->id(), src->id(), link_route_back);
   }
 }
index dd92bc8..5286d2e 100644 (file)
@@ -48,7 +48,7 @@ void FloydZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs*
 {
   unsigned int table_size = get_table_size();
 
 {
   unsigned int table_size = get_table_size();
 
-  getRouteCheckParams(src, dst);
+  get_route_check_params(src, dst);
 
   /* create a result route */
   std::vector<RouteCreationArgs*> route_stack;
 
   /* create a result route */
   std::vector<RouteCreationArgs*> route_stack;
@@ -91,7 +91,7 @@ void FloydZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoi
   /* set the size of table routing */
   unsigned int table_size = get_table_size();
 
   /* set the size of table routing */
   unsigned int table_size = get_table_size();
 
-  addRouteCheckParams(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
 
   if (not link_table_) {
     /* Create Cost, Predecessor and Link tables */
 
   if (not link_table_) {
     /* Create Cost, Predecessor and Link tables */
@@ -119,7 +119,7 @@ void FloydZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoi
                dst->get_cname());
 
   TO_FLOYD_LINK(src->id(), dst->id()) =
                dst->get_cname());
 
   TO_FLOYD_LINK(src->id(), dst->id()) =
-      newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
+      new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
   TO_FLOYD_PRED(src->id(), dst->id()) = src->id();
   TO_FLOYD_COST(src->id(), dst->id()) = (TO_FLOYD_LINK(src->id(), dst->id()))->link_list.size();
 
   TO_FLOYD_PRED(src->id(), dst->id()) = src->id();
   TO_FLOYD_COST(src->id(), dst->id()) = (TO_FLOYD_LINK(src->id(), dst->id()))->link_list.size();
 
@@ -147,7 +147,7 @@ void FloydZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoi
                 src->get_cname(), gw_dst->get_cname());
 
     TO_FLOYD_LINK(dst->id(), src->id()) =
                 src->get_cname(), gw_dst->get_cname());
 
     TO_FLOYD_LINK(dst->id(), src->id()) =
-        newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
+        new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
     TO_FLOYD_PRED(dst->id(), src->id()) = dst->id();
     TO_FLOYD_COST(dst->id(), src->id()) =
         (TO_FLOYD_LINK(dst->id(), src->id()))->link_list.size(); /* count of links, old model assume 1 */
     TO_FLOYD_PRED(dst->id(), src->id()) = dst->id();
     TO_FLOYD_COST(dst->id(), src->id()) =
         (TO_FLOYD_LINK(dst->id(), src->id()))->link_list.size(); /* count of links, old model assume 1 */
index 16d3969..77904a4 100644 (file)
@@ -74,7 +74,7 @@ void FullZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs*
 void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
                          std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
 {
 void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
                          std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
 {
-  addRouteCheckParams(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
 
   unsigned int table_size = get_table_size();
 
 
   unsigned int table_size = get_table_size();
 
@@ -93,7 +93,7 @@ void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoin
 
   /* Add the route to the base */
   TO_ROUTE_FULL(src->id(), dst->id()) =
 
   /* Add the route to the base */
   TO_ROUTE_FULL(src->id(), dst->id()) =
-      newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, true);
+      new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, true);
 
   if (symmetrical == true && src != dst) {
     if (gw_dst && gw_src) {
 
   if (symmetrical == true && src != dst) {
     if (gw_dst && gw_src) {
@@ -112,7 +112,7 @@ void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoin
                  dst->get_cname(), src->get_cname());
 
     TO_ROUTE_FULL(dst->id(), src->id()) =
                  dst->get_cname(), src->get_cname());
 
     TO_ROUTE_FULL(dst->id(), src->id()) =
-        newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, false);
+        new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, false);
   }
 }
 }
   }
 }
 }
index 2de68c1..dc502fd 100644 (file)
@@ -120,9 +120,9 @@ void RoutedZone::get_graph(xbt_graph_t graph, std::map<std::string, xbt_node_t>*
 /* ************************************************************************** */
 /* ************************* GENERIC AUX FUNCTIONS ************************** */
 /* change a route containing link names into a route containing link entities */
 /* ************************************************************************** */
 /* ************************* GENERIC AUX FUNCTIONS ************************** */
 /* change a route containing link names into a route containing link entities */
-RouteCreationArgs* RoutedZone::newExtendedRoute(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
-                                                NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
-                                                bool symmetrical, bool change_order)
+RouteCreationArgs* RoutedZone::new_extended_route(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
+                                                  NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
+                                                  bool symmetrical, bool change_order)
 {
   RouteCreationArgs* result = new RouteCreationArgs();
 
 {
   RouteCreationArgs* result = new RouteCreationArgs();
 
@@ -147,7 +147,7 @@ RouteCreationArgs* RoutedZone::newExtendedRoute(RoutingMode hierarchy, NetPoint*
   return result;
 }
 
   return result;
 }
 
-void RoutedZone::getRouteCheckParams(NetPoint* src, NetPoint* dst)
+void RoutedZone::get_route_check_params(NetPoint* src, NetPoint* dst)
 {
   xbt_assert(src, "Cannot find a route from nullptr to %s", dst->get_cname());
   xbt_assert(dst, "Cannot find a route from %s to nullptr", src->get_cname());
 {
   xbt_assert(src, "Cannot find a route from nullptr to %s", dst->get_cname());
   xbt_assert(dst, "Cannot find a route from %s to nullptr", src->get_cname());
@@ -164,8 +164,8 @@ void RoutedZone::getRouteCheckParams(NetPoint* src, NetPoint* dst)
              "%s@%s). Please report that bug.",
              src->get_cname(), dst->get_cname(), src_as->get_cname(), dst_as->get_cname(), get_cname());
 }
              "%s@%s). Please report that bug.",
              src->get_cname(), dst->get_cname(), src_as->get_cname(), dst_as->get_cname(), get_cname());
 }
-void RoutedZone::addRouteCheckParams(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
-                                     std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
+void RoutedZone::add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+                                        std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
 {
   const char* srcName = src->get_cname();
   const char* dstName = dst->get_cname();
 {
   const char* srcName = src->get_cname();
   const char* dstName = dst->get_cname();