Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reworking user_bound for Exec actions.
[simgrid.git] / teshsuite / surf / surf_usage / surf_usage.cpp
index 9e43b7b..5135d17 100644 (file)
@@ -42,19 +42,19 @@ int main(int argc, char** argv)
   xbt_assert(argc > 1, "Usage: %s platform.xml\n", argv[0]);
   parse_platform_file(argv[1]);
 
-  sg_netzone_t as_zone                               = sg_zone_get_by_name("AS0");
-  simgrid::kernel::resource::NetworkModel* net_model = as_zone->get_impl()->get_network_model();
-  simgrid::kernel::resource::CpuModel* cpu_model_pm  = as_zone->get_impl()->get_cpu_pm_model();
+  const_sg_netzone_t as_zone = sg_zone_get_by_name("AS0");
+  auto net_model             = as_zone->get_impl()->get_network_model();
+  auto cpu_model_pm          = as_zone->get_impl()->get_cpu_pm_model();
 
-  XBT_DEBUG("CPU model: %p", cpu_model_pm);
-  XBT_DEBUG("Network model: %p", net_model);
+  XBT_DEBUG("CPU model: %p", cpu_model_pm.get());
+  XBT_DEBUG("Network model: %p", net_model.get());
   simgrid::s4u::Host* hostA = sg_host_by_name("Cpu A");
   simgrid::s4u::Host* hostB = sg_host_by_name("Cpu B");
 
   /* Let's do something on it */
-  const simgrid::kernel::resource::Action* actionA = hostA->pimpl_cpu->execution_start(1000.0);
-  const simgrid::kernel::resource::Action* actionB = hostB->pimpl_cpu->execution_start(1000.0);
-  const simgrid::kernel::resource::Action* actionC = hostB->pimpl_cpu->sleep(7.32);
+  const simgrid::kernel::resource::Action* actionA = hostA->get_cpu()->execution_start(1000.0, -1);
+  const simgrid::kernel::resource::Action* actionB = hostB->get_cpu()->execution_start(1000.0, -1);
+  const simgrid::kernel::resource::Action* actionC = hostB->get_cpu()->sleep(7.32);
 
   simgrid::kernel::resource::Action::State stateActionA = actionA->get_state();
   simgrid::kernel::resource::Action::State stateActionB = actionB->get_state();