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
Merge branch 'actor-yield' of github.com:Takishipp/simgrid into actor-yield
[simgrid.git]
/
src
/
surf
/
network_interface.cpp
diff --git
a/src/surf/network_interface.cpp
b/src/surf/network_interface.cpp
index
2bbbd86
..
f88a72d
100644
(file)
--- a/
src/surf/network_interface.cpp
+++ b/
src/surf/network_interface.cpp
@@
-30,6
+30,13
@@
namespace simgrid {
{
return links->size();
}
+ void LinkImpl::linksList(std::vector<s4u::Link*>* linkList)
+ {
+ for (auto const& kv : *links) {
+ linkList->push_back(&kv.second->piface_);
+ }
+ }
+
/** @brief Returns a list of all existing links */
LinkImpl** LinkImpl::linksList()
{
@@
-82,10
+89,10
@@
namespace simgrid {
{
double minRes = Model::nextOccuringEventFull(now);
- for
(auto it(getRunningActionSet()->begin()), itend(getRunningActionSet()->end()); it != itend ; it++
) {
-
NetworkAction *action = static_cast<NetworkAction*>(&*it
);
- if (
action->
latency_ > 0)
- minRes = (minRes < 0) ?
action->latency_ : std::min(minRes, action->
latency_);
+ for
(Action const& action : *getRunningActionSet()
) {
+
const NetworkAction& net_action = static_cast<const NetworkAction&>(action
);
+ if (
net_action.
latency_ > 0)
+ minRes = (minRes < 0) ?
net_action.latency_ : std::min(minRes, net_action.
latency_);
}
XBT_DEBUG("Min of share resources %f", minRes);