Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
less VM in surf.h
[simgrid.git] / src / kernel / routing / AsRoutedGraph.cpp
index 592ad3c..6e56149 100644 (file)
@@ -10,6 +10,7 @@
 #include "xbt/graph.h"
 
 #include "src/kernel/routing/AsRoutedGraph.hpp"
+#include "src/kernel/routing/NetCard.hpp"
 #include "src/surf/network_interface.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_routing_generic, surf_route, "Generic implementation of the surf routing");
@@ -30,8 +31,6 @@ AsRoutedGraph::AsRoutedGraph(As* father, const char* name) : AsImpl(father, name
 {
 }
 
-AsRoutedGraph::~AsRoutedGraph()=default;
-
 }}} // namespace simgrid::kernel::routing
 
 /* ************************************************************************** */
@@ -92,7 +91,7 @@ void AsRoutedGraph::getOneLinkRoutes(std::vector<Onelink*>* accumulator)
       route->link_list->clear();
       NetCard* src_elm = vertices_.at(src);
       NetCard* dst_elm = vertices_.at(dst);
-      this->getRouteAndLatency(src_elm, dst_elm, route, nullptr);
+      this->getLocalRoute(src_elm, dst_elm, route, nullptr);
 
       if (route->link_list->size() == 1) {
         Link* link = route->link_list->at(0);
@@ -107,7 +106,8 @@ void AsRoutedGraph::getOneLinkRoutes(std::vector<Onelink*>* accumulator)
       }
     }
   }
-  }
+  AsImpl::getOneLinkRoutes(accumulator); // Recursivly call this function on all my childs too
+}
 
 void AsRoutedGraph::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)
 {
@@ -119,7 +119,7 @@ void AsRoutedGraph::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edg
       sg_platf_route_cbarg_t route = xbt_new0(s_sg_platf_route_cbarg_t, 1);
       route->link_list = new std::vector<Link*>();
 
-      getRouteAndLatency(my_src, my_dst, route, nullptr);
+      getLocalRoute(my_src, my_dst, route, nullptr);
 
       XBT_DEBUG("get_route_and_latency %s -> %s", my_src->name().c_str(), my_dst->name().c_str());