Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename AsRoute to BypassRoute, and move it to its own file
[simgrid.git] / src / kernel / routing / AsImpl.cpp
index 86c782b..1be8910 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "simgrid/s4u/host.hpp"
 #include "src/kernel/routing/AsImpl.hpp"
+#include "src/kernel/routing/BypassRoute.hpp"
 #include "src/kernel/routing/NetCard.hpp"
 #include "src/surf/cpu_interface.hpp"
 #include "src/surf/network_interface.hpp"
@@ -41,17 +42,6 @@ namespace simgrid {
     return res;
   }
 
-  void AsImpl::getOneLinkRoutes(std::vector<Onelink*>* accumulator)
-  {
-    // recursing only. I have no route myself :)
-    char* key;
-    xbt_dict_cursor_t cursor = nullptr;
-    AsImpl* rc_child;
-    xbt_dict_foreach (children(), cursor, key, rc_child) {
-      rc_child->getOneLinkRoutes(accumulator);
-    }
-  }
-
   /** @brief Get the common ancestor and its first children in each line leading to src and dst
    *
    * In the recursive case, this sets common_ancestor, src_ancestor and dst_ancestor are set as follows.
@@ -171,7 +161,7 @@ namespace simgrid {
     /* Base case, no recursion is needed */
     if (dst->containingAS() == this && src->containingAS() == this) {
       if (bypassRoutes_.find({src, dst}) != bypassRoutes_.end()) {
-        AsRoute* bypassedRoute = bypassRoutes_.at({src, dst});
+        BypassRoute* bypassedRoute = bypassRoutes_.at({src, dst});
         for (surf::Link* link : bypassedRoute->links) {
           links->push_back(link);
           if (latency)
@@ -215,7 +205,7 @@ namespace simgrid {
     int max_index = std::max(max_index_src, max_index_dst);
 
     /* (3) Search for a bypass making the path up to the ancestor useless */
-    AsRoute* bypassedRoute = nullptr;
+    BypassRoute* bypassedRoute = nullptr;
     std::pair<kernel::routing::NetCard*, kernel::routing::NetCard*> key;
     for (int max = 0; max <= max_index; max++) {
       for (int i = 0; i < max; i++) {