/* 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"
return;
}
- auto cpu_model_pm = std::make_shared<simgrid::kernel::resource::CpuCas01Model>();
- 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<simgrid::kernel::resource::CpuCas01Model>("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);
}
namespace kernel {
namespace resource {
-CpuCas01Model::CpuCas01Model()
+CpuCas01Model::CpuCas01Model(const std::string& name) : CpuModel(name)
{
if (config::get_value<std::string>("cpu/optim") == "Lazy")
set_update_algorithm(Model::UpdateAlgo::LAZY);
set_maxmin_system(new lmm::System(select));
}
-Cpu* CpuCas01Model::create_cpu(s4u::Host* host, const std::vector<double>& speed_per_pstate)
+CpuImpl* CpuCas01Model::create_cpu(s4u::Host* host, const std::vector<double>& speed_per_pstate)
{
return (new CpuCas01(host, speed_per_pstate))->set_model(this);
}
action->requested_core() * speed_.scale * speed_.peak);
}
- Cpu::on_speed_change();
+ CpuImpl::on_speed_change();
}
void CpuCas01::apply_event(profile::Event* event, double value)