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
Factorize common code to assemble vector<LinkImpl*> and update latency.
[simgrid.git]
/
src
/
kernel
/
routing
/
FloydZone.cpp
diff --git
a/src/kernel/routing/FloydZone.cpp
b/src/kernel/routing/FloydZone.cpp
index 76411b2600ac039706bf3e0a5cda4efd11ced245..e48a4608561f133c9736882424e0f9cd51f1a4d0 100644
(file)
--- a/
src/kernel/routing/FloydZone.cpp
+++ b/
src/kernel/routing/FloydZone.cpp
@@
-53,7
+53,7
@@
void FloydZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route*
route->gw_dst_ = route_stack.front()->gw_dst_;
}
route->gw_dst_ = route_stack.front()->gw_dst_;
}
- NetPoint* prev_dst_gw = nullptr;
+
const
NetPoint* prev_dst_gw = nullptr;
while (not route_stack.empty()) {
const Route* e_route = route_stack.back();
route_stack.pop_back();
while (not route_stack.empty()) {
const Route* e_route = route_stack.back();
route_stack.pop_back();
@@
-62,11
+62,7
@@
void FloydZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route*
get_global_route(prev_dst_gw, e_route->gw_src_, route->link_list_, lat);
}
get_global_route(prev_dst_gw, e_route->gw_src_, route->link_list_, lat);
}
- for (auto const& link : e_route->link_list_) {
- route->link_list_.push_back(link);
- if (lat)
- *lat += link->get_latency();
- }
+ add_link_latency(route->link_list_, e_route->link_list_, lat);
prev_dst_gw = e_route->gw_dst_;
}
prev_dst_gw = e_route->gw_dst_;
}