X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9a02e3654bd28c13ac053247383566f54fa4498a..54c6af05c8bb790633aef957cfd8ab99ff6ccf21:/src/kernel/routing/AsDijkstra.cpp diff --git a/src/kernel/routing/AsDijkstra.cpp b/src/kernel/routing/AsDijkstra.cpp index 02106e65e2..eaf1b27b06 100644 --- a/src/kernel/routing/AsDijkstra.cpp +++ b/src/kernel/routing/AsDijkstra.cpp @@ -51,7 +51,7 @@ void AsDijkstra::seal() graphNodeMap_ = xbt_dict_new_homogeneous(&graph_node_map_elem_free); /* Add the loopback if needed */ - if (routing_platf->loopback_ && hierarchy_ == RoutingMode::base) { + if (surf_network_model->loopback_ && hierarchy_ == RoutingMode::base) { xbt_dynar_foreach(xbt_graph_get_nodes(routeGraph_), cursor, node) { xbt_edge_t edge = nullptr; @@ -66,7 +66,7 @@ void AsDijkstra::seal() if (!found) { sg_platf_route_cbarg_t e_route = xbt_new0(s_sg_platf_route_cbarg_t, 1); e_route->link_list = new std::vector(); - e_route->link_list->push_back(routing_platf->loopback_); + e_route->link_list->push_back(surf_network_model->loopback_); xbt_graph_new_edge(routeGraph_, node, node, e_route); } } @@ -138,14 +138,13 @@ void AsDijkstra::newRoute(int src_id, int dst_id, sg_platf_route_cbarg_t e_route xbt_graph_new_edge(routeGraph_, src, dst, e_route); } -void AsDijkstra::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat) +void AsDijkstra::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat) { getRouteCheckParams(src, dst); int src_id = src->id(); int dst_id = dst->id(); int *pred_arr = nullptr; - sg_platf_route_cbarg_t e_route; int size = 0; xbt_dynar_t nodes = xbt_graph_get_nodes(routeGraph_); @@ -166,7 +165,7 @@ void AsDijkstra::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_c if (edge == nullptr) THROWF(arg_error, 0, "No route from '%s' to '%s'", src->name().c_str(), dst->name().c_str()); - e_route = (sg_platf_route_cbarg_t) xbt_graph_edge_get_data(edge); + sg_platf_route_cbarg_t e_route = (sg_platf_route_cbarg_t)xbt_graph_edge_get_data(edge); for (auto link: *e_route->link_list) { route->link_list->insert(route->link_list->begin(), link); @@ -252,7 +251,7 @@ void AsDijkstra::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_c prev_gw_src = gw_src; - e_route = (sg_platf_route_cbarg_t) xbt_graph_edge_get_data(edge); + sg_platf_route_cbarg_t e_route = (sg_platf_route_cbarg_t)xbt_graph_edge_get_data(edge); gw_src = e_route->gw_src; gw_dst = e_route->gw_dst;