Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Drop unused parameters.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 14 Oct 2020 15:17:23 +0000 (17:17 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 14 Oct 2020 15:23:19 +0000 (17:23 +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 d338fc5..877d5cc 100644 (file)
@@ -56,9 +56,14 @@ public:
                  std::map<std::string, xbt_edge_t>* edges) override;
 
 protected:
-  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);
+  RouteCreationArgs* new_extended_route(RoutingMode hierarchy, NetPoint* gw_src, NetPoint* gw_dst,
+                                        std::vector<resource::LinkImpl*>& link_list, bool change_order);
+  XBT_ATTRIB_DEPRECATED_v330("Please drop 2nd, 3rd and 7th parameters") 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)
+  {
+    return new_extended_route(hierarchy, gw_src, gw_dst, link_list, change_order);
+  }
   void get_route_check_params(NetPoint* src, NetPoint* dst) const;
   void add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
                               const std::vector<resource::LinkImpl*>& link_list, bool symmetrical) const;
index 2fa52db..ecd5ac3 100644 (file)
@@ -227,12 +227,10 @@ void DijkstraZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, Net
 {
   add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
 
-  new_edge(src->id(), dst->id(),
-           new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, true));
+  new_edge(src->id(), dst->id(), new_extended_route(hierarchy_, gw_src, gw_dst, link_list, true));
 
   if (symmetrical == true)
-    new_edge(dst->id(), src->id(),
-             new_extended_route(hierarchy_, dst, src, gw_dst, gw_src, link_list, symmetrical, false));
+    new_edge(dst->id(), src->id(), new_extended_route(hierarchy_, gw_dst, gw_src, link_list, false));
 }
 
 void DijkstraZone::new_edge(int src_id, int dst_id, RouteCreationArgs* route)
index 7bfd8ba..de725b3 100644 (file)
@@ -117,8 +117,7 @@ void FloydZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoi
                "The route between %s and %s already exists (Rq: routes are symmetrical by default).", src->get_cname(),
                dst->get_cname());
 
-  TO_FLOYD_LINK(src->id(), dst->id()) =
-      new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, true);
+  TO_FLOYD_LINK(src->id(), dst->id()) = new_extended_route(hierarchy_, gw_src, gw_dst, link_list, true);
   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();
 
@@ -145,8 +144,7 @@ void FloydZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoi
       XBT_DEBUG("Load NetzoneRoute from \"%s(%s)\" to \"%s(%s)\"", dst->get_cname(), gw_src->get_cname(),
                 src->get_cname(), gw_dst->get_cname());
 
-    TO_FLOYD_LINK(dst->id(), src->id()) =
-        new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, false);
+    TO_FLOYD_LINK(dst->id(), src->id()) = new_extended_route(hierarchy_, gw_src, gw_dst, link_list, false);
     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 7948547..37bf653 100644 (file)
@@ -93,8 +93,7 @@ void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoin
                dst->get_cname());
 
   /* Add the route to the base */
-  TO_ROUTE_FULL(src->id(), dst->id()) =
-      new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, true);
+  TO_ROUTE_FULL(src->id(), dst->id()) = new_extended_route(hierarchy_, gw_src, gw_dst, link_list, true);
 
   if (symmetrical == true && src != dst) {
     if (gw_dst && gw_src) {
@@ -112,8 +111,7 @@ void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoin
                  "The route between %s and %s already exists. You should not declare the reverse path as symmetrical.",
                  dst->get_cname(), src->get_cname());
 
-    TO_ROUTE_FULL(dst->id(), src->id()) =
-        new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, false);
+    TO_ROUTE_FULL(dst->id(), src->id()) = new_extended_route(hierarchy_, gw_src, gw_dst, link_list, false);
   }
 }
 }
index 0b7f207..3d1d214 100644 (file)
@@ -115,10 +115,8 @@ void RoutedZone::get_graph(const s_xbt_graph_t* graph, std::map<std::string, xbt
 /* ************************************************************************** */
 /* ************************* GENERIC AUX FUNCTIONS ************************** */
 /* change a route containing link names into a route containing link entities */
-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* RoutedZone::new_extended_route(RoutingMode hierarchy, NetPoint* gw_src, NetPoint* gw_dst,
+                                                  std::vector<resource::LinkImpl*>& link_list, bool change_order)
 {
   auto* result = new RouteCreationArgs();