X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b035f4fba1852d16bb9316bb0b23329b108b605b..b2f3150048cd87c9e16e251fea65c40221fd56ea:/src/kernel/routing/AsRoutedGraph.cpp diff --git a/src/kernel/routing/AsRoutedGraph.cpp b/src/kernel/routing/AsRoutedGraph.cpp index b45087ff7f..8dc559fbd7 100644 --- a/src/kernel/routing/AsRoutedGraph.cpp +++ b/src/kernel/routing/AsRoutedGraph.cpp @@ -30,8 +30,6 @@ AsRoutedGraph::AsRoutedGraph(As* father, const char* name) : AsImpl(father, name { } -AsRoutedGraph::~AsRoutedGraph()=default; - }}} // namespace simgrid::kernel::routing /* ************************************************************************** */ @@ -81,7 +79,7 @@ namespace simgrid { namespace kernel { namespace routing { -void AsRoutedGraph::getOneLinkRoutes(xbt_dynar_t accumulator) +void AsRoutedGraph::getOneLinkRoutes(std::vector* accumulator) { sg_platf_route_cbarg_t route = xbt_new0(s_sg_platf_route_cbarg_t, 1); route->link_list = new std::vector(); @@ -92,7 +90,7 @@ void AsRoutedGraph::getOneLinkRoutes(xbt_dynar_t 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); @@ -103,11 +101,12 @@ void AsRoutedGraph::getOneLinkRoutes(xbt_dynar_t accumulator) onelink = new Onelink(link, route->gw_src, route->gw_dst); else onelink = new Onelink(link, nullptr, nullptr); - xbt_dynar_push(accumulator, &onelink); + accumulator->push_back(onelink); } } } - } + 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 +118,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(); - 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());