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
further snake_case s4u::Engine
[simgrid.git]
/
teshsuite
/
s4u
/
comm-pt2pt
/
comm-pt2pt.cpp
diff --git
a/teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp
b/teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp
index
6b70db2
..
ab82939
100644
(file)
--- a/
teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp
+++ b/
teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2010-201
7
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-201
8
. 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. */
/* 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. */
@@
-166,11
+166,11
@@
int main(int argc, char* argv[])
std::vector<std::string> argSend{specSend.c_str()};
std::vector<std::string> argRecv{specRecv.c_str()};
std::vector<std::string> argSend{specSend.c_str()};
std::vector<std::string> argRecv{specRecv.c_str()};
- simgrid::s4u::Engine
* e = new simgrid::s4u::Engin
e(&argc, argv);
+ simgrid::s4u::Engine
e(&argc, argv);
if (argc < 2)
usage(argv[0], specSend.c_str(), specRecv.c_str());
if (argc < 2)
usage(argv[0], specSend.c_str(), specRecv.c_str());
- e
->loadP
latform(argv[1]);
+ e
.load_p
latform(argv[1]);
if (argc >= 3) {
argSend.clear();
if (argc >= 3) {
argSend.clear();
@@
-182,14
+182,13
@@
int main(int argc, char* argv[])
}
xbt_assert(argSend.front().size() == argRecv.front().size(), "Sender and receiver spec must be of the same size");
}
xbt_assert(argSend.front().size() == argRecv.front().size(), "Sender and receiver spec must be of the same size");
- simgrid::s4u::Host** hosts = sg_host_list();
- simgrid::s4u::Actor::createActor("sender", hosts[0], sender, argSend);
- simgrid::s4u::Actor::createActor("recver", hosts[1], receiver, argRecv);
- xbt_free(hosts);
+ std::vector<simgrid::s4u::Host*> hosts = e.get_all_hosts();
- e->run();
- XBT_INFO("Simulation time %g", e->getClock());
+ simgrid::s4u::Actor::create("sender", hosts[0], sender, argSend);
+ simgrid::s4u::Actor::create("recver", hosts[1], receiver, argRecv);
+
+ e.run();
+ XBT_INFO("Simulation time %g", e.getClock());
- delete e;
return 0;
}
return 0;
}