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;
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<Link*>();
- 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);
}
}
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_);
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);
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;