X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f2aaadd437ac30adad539d969164098b50cd2338..3f367762081b50ecd16c09ef850e2daa823a99a0:/src/surf/cpu_cas01.cpp diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index e11e31460f..2223a80369 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -3,12 +3,13 @@ /* 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 "cpu_cas01.hpp" #include "simgrid/kernel/routing/NetZoneImpl.hpp" #include "simgrid/s4u/Engine.hpp" + #include "simgrid/sg_config.hpp" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/resource/profile/Event.hpp" +#include "src/surf/cpu_cas01.hpp" #include "src/surf/cpu_ti.hpp" #include "src/surf/surf_interface.hpp" #include "surf/surf.hpp" @@ -44,9 +45,8 @@ void surf_cpu_model_init_Cas01() return; } - auto cpu_model_pm = std::make_shared(); - simgrid::kernel::EngineImpl::get_instance()->add_model(simgrid::kernel::resource::Model::Type::CPU_PM, cpu_model_pm, - true); + auto cpu_model_pm = std::make_shared("Cpu_Cas01"); + simgrid::kernel::EngineImpl::get_instance()->add_model(cpu_model_pm); simgrid::s4u::Engine::get_instance()->get_netzone_root()->get_impl()->set_cpu_pm_model(cpu_model_pm); } @@ -54,7 +54,7 @@ namespace simgrid { namespace kernel { namespace resource { -CpuCas01Model::CpuCas01Model() +CpuCas01Model::CpuCas01Model(const std::string& name) : CpuModel(name) { if (config::get_value("cpu/optim") == "Lazy") set_update_algorithm(Model::UpdateAlgo::LAZY); @@ -70,7 +70,7 @@ CpuCas01Model::CpuCas01Model() set_maxmin_system(new lmm::System(select)); } -Cpu* CpuCas01Model::create_cpu(s4u::Host* host, const std::vector& speed_per_pstate) +CpuImpl* CpuCas01Model::create_cpu(s4u::Host* host, const std::vector& speed_per_pstate) { return (new CpuCas01(host, speed_per_pstate))->set_model(this); } @@ -97,7 +97,7 @@ void CpuCas01::on_speed_change() action->requested_core() * speed_.scale * speed_.peak); } - Cpu::on_speed_change(); + CpuImpl::on_speed_change(); } void CpuCas01::apply_event(profile::Event* event, double value)