+/* Copyright (c) 2014. The SimGrid Team.
+ * All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
#include "surf_routing_cluster_torus.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster_torus, surf_route_cluster, "Torus Routing part of surf");
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<NetworkLinkPtr>(info.link_down)->getLatency();
+ }else{
xbt_dynar_push_as(route->link_list,void*,info.link_up);
+ if (lat)
+ *lat += static_cast<NetworkLinkPtr>(info.link_up)->getLatency();
+ }
current_node = next_node;
next_node = 0;
}