Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Coding style: no global "using namespace".
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 1 Jun 2021 13:30:44 +0000 (15:30 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 1 Jun 2021 13:55:03 +0000 (15:55 +0200)
teshsuite/s4u/issue71/issue71.cpp

index cc1a018..f4708af 100644 (file)
@@ -1,26 +1,23 @@
 #include <simgrid/s4u.hpp>
 #include <vector>
 
-using namespace std;
-using namespace simgrid;
-
 static void runner()
 {
-  auto e                    = s4u::Engine::get_instance();
+  auto e                    = simgrid::s4u::Engine::get_instance();
   simgrid::s4u::Host* host0 = e->host_by_name("c1_0");
   simgrid::s4u::Host* host1 = e->host_by_name("c2_0");
 
   std::vector<double> comp = {1e6, 1e6};
   std::vector<double> comm = {1, 2, 3, 4};
 
-  vector<simgrid::s4u::Host*> h1 = {host0, host1};
+  std::vector<simgrid::s4u::Host*> h1 = {host0, host1};
   simgrid::s4u::this_actor::parallel_execute(h1, comp, comm);
 }
 
 int main(int argc, char* argv[])
 {
-  s4u::Engine e(&argc, argv);
-  e.set_config("host/model:ptask_L07");
+  simgrid::s4u::Engine e(&argc, argv);
+  simgrid::s4u::Engine::set_config("host/model:ptask_L07");
 
   xbt_assert(argc == 2,
              "\nUsage: %s platform_ok.xml\n"