Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
provide a simpler API of Engine::getHostList (returning the structure) and use it
[simgrid.git] / examples / s4u / exec-ptask / s4u-exec-ptask.cpp
index 7a9a31f..4de50c2 100644 (file)
@@ -28,8 +28,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_energyptask, "Messages specific for this s4u ex
 static void runner()
 {
   /* Retrieve the list of all hosts as an array of hosts */
 static void runner()
 {
   /* Retrieve the list of all hosts as an array of hosts */
-  std::vector<simgrid::s4u::Host*> hosts;
-  simgrid::s4u::Engine::getInstance()->getHostList(&hosts);
+  std::vector<simgrid::s4u::Host*> hosts = simgrid::s4u::Engine::getInstance()->getHostList();
   int hosts_count = hosts.size();
 
   XBT_INFO("First, build a classical parallel task, with 1 Gflop to execute on each node, "
   int hosts_count = hosts.size();
 
   XBT_INFO("First, build a classical parallel task, with 1 Gflop to execute on each node, "