]> AND Public Git Repository - simgrid.git/blobdiff - src/surf/host_clm03.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
include cleanups (mostly surf/surf.hpp)
[simgrid.git] / src / surf / host_clm03.cpp
index 5e49c86e2f23d2cab31f32f3996bea3189ab593a..21c9623761cc944c9d51a90fc1f8e0d75ac12b38 100644 (file)
@@ -3,22 +3,23 @@
 /* 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. */
 
-#include "src/surf/host_clm03.hpp"
-#include "simgrid/kernel/routing/NetPoint.hpp"
-#include "simgrid/kernel/routing/NetZoneImpl.hpp"
-#include "simgrid/s4u/Engine.hpp"
+#include <simgrid/kernel/routing/NetPoint.hpp>
+#include <simgrid/kernel/routing/NetZoneImpl.hpp>
+#include <simgrid/s4u/Engine.hpp>
+
 #include "simgrid/sg_config.hpp"
 #include "src/kernel/EngineImpl.hpp"
-#include "surf/surf.hpp"
+#include "src/surf/host_clm03.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_host);
 
 void surf_host_model_init_current_default()
 {
-  auto host_model = std::make_shared<simgrid::surf::HostCLM03Model>("Host_CLM03");
   simgrid::config::set_default<bool>("network/crosstraffic", true);
-  simgrid::kernel::EngineImpl::get_instance()->add_model(host_model);
-  simgrid::s4u::Engine::get_instance()->get_netzone_root()->get_impl()->set_host_model(host_model);
+  auto host_model = std::make_shared<simgrid::surf::HostCLM03Model>("Host_CLM03");
+  auto* engine    = simgrid::kernel::EngineImpl::get_instance();
+  engine->add_model(host_model);
+  engine->get_netzone_root()->set_host_model(host_model);
   surf_cpu_model_init_Cas01();
   surf_network_model_init_LegrandVelho();
 }
@@ -26,8 +27,9 @@ void surf_host_model_init_current_default()
 void surf_host_model_init_compound()
 {
   auto host_model = std::make_shared<simgrid::surf::HostCLM03Model>("Host_CLM03");
-  simgrid::kernel::EngineImpl::get_instance()->add_model(host_model);
-  simgrid::s4u::Engine::get_instance()->get_netzone_root()->get_impl()->set_host_model(host_model);
+  auto* engine    = simgrid::kernel::EngineImpl::get_instance();
+  engine->add_model(host_model);
+  engine->get_netzone_root()->set_host_model(host_model);
 }
 
 namespace simgrid {