From 3c89e084af54896c9dcd71ab064bbfc08dfffb64 Mon Sep 17 00:00:00 2001 From: degomme Date: Tue, 10 Jun 2014 15:09:35 +0200 Subject: [PATCH] torus should provide better results if latency is taken into account .. --- src/surf/surf_routing_cluster_torus.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/surf/surf_routing_cluster_torus.cpp b/src/surf/surf_routing_cluster_torus.cpp index 45b8a935c7..52d0c35960 100644 --- a/src/surf/surf_routing_cluster_torus.cpp +++ b/src/surf/surf_routing_cluster_torus.cpp @@ -218,11 +218,17 @@ void AsClusterTorus::getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, info = xbt_dynar_get_as(p_linkUpDownList,linkOffset, s_surf_parsing_link_up_down_t); - if (use_lnk_up == false) + if (use_lnk_up == false){ xbt_dynar_push_as(route->link_list,void*,info.link_down); - else + + if (lat) + *lat += static_cast(info.link_down)->getLatency(); + }else{ xbt_dynar_push_as(route->link_list,void*,info.link_up); + if (lat) + *lat += static_cast(info.link_up)->getLatency(); + } current_node = next_node; next_node = 0; } -- 2.20.1