A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model-checker : MUTEX_UNLOCK is invisible for MC
[simgrid.git]
/
src
/
surf
/
surf_routing_cluster_torus.cpp
diff --git
a/src/surf/surf_routing_cluster_torus.cpp
b/src/surf/surf_routing_cluster_torus.cpp
index
972254c
..
52d0c35
100644
(file)
--- a/
src/surf/surf_routing_cluster_torus.cpp
+++ b/
src/surf/surf_routing_cluster_torus.cpp
@@
-1,3
+1,9
@@
+/* 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");
#include "surf_routing_cluster_torus.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster_torus, surf_route_cluster, "Torus Routing part of surf");
@@
-212,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);
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);
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);
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;
}
current_node = next_node;
next_node = 0;
}