X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2ffca84edbea56d2142bda01affe79fdb4747851..fdab189916cad1bf47afa4f3c272c8ba26c36ed1:/src/surf/cpu_ti.hpp diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index 2e9ec6db18..fa3a3e83fc 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -12,7 +12,8 @@ #include namespace simgrid { -namespace surf { +namespace kernel { +namespace resource { /*********** * Classes * @@ -25,7 +26,7 @@ class XBT_PRIVATE CpuTi; *********/ class CpuTiProfile { public: - explicit CpuTiProfile(kernel::profile::Profile* profile); + explicit CpuTiProfile(profile::Profile* profile); CpuTiProfile(const CpuTiProfile&) = delete; CpuTiProfile& operator=(const CpuTiProfile&) = delete; ~CpuTiProfile(); @@ -48,7 +49,7 @@ class CpuTiTmgr { public: explicit CpuTiTmgr(double value) : type_(Type::FIXED), value_(value){}; - CpuTiTmgr(kernel::profile::Profile* speed_profile, double value); + CpuTiTmgr(profile::Profile* speed_profile, double value); CpuTiTmgr(const CpuTiTmgr&) = delete; CpuTiTmgr& operator=(const CpuTiTmgr&) = delete; ~CpuTiTmgr(); @@ -66,7 +67,7 @@ private: double total_ = 0.0; /*< Integral total between 0 and last_pointn */ CpuTiProfile* profile_ = nullptr; - kernel::profile::Profile* speed_profile_ = nullptr; + profile::Profile* speed_profile_ = nullptr; }; /********** @@ -77,9 +78,11 @@ class XBT_PRIVATE CpuTiAction : public CpuAction { friend class CpuTi; public: CpuTiAction(CpuTi* cpu, double cost); + CpuTiAction(const CpuTiAction&) = delete; + CpuTiAction& operator=(const CpuTiAction&) = delete; ~CpuTiAction(); - void set_state(kernel::resource::Action::State state) override; + void set_state(Action::State state) override; void cancel() override; void suspend() override; void resume() override; @@ -100,23 +103,25 @@ typedef boost::intrusive::list ActionTiList; ************/ class CpuTi : public Cpu { public: - CpuTi(CpuTiModel* model, simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core); + CpuTi(CpuTiModel* model, s4u::Host* host, const std::vector& speed_per_pstate, int core); + CpuTi(const CpuTi&) = delete; + CpuTi& operator&(const CpuTi&) = delete; ~CpuTi() override; - void set_speed_profile(kernel::profile::Profile* profile) override; + void set_speed_profile(profile::Profile* profile) override; - void apply_event(kernel::profile::Event* event, double value) override; + void apply_event(profile::Event* event, double value) override; void update_actions_finish_time(double now); void update_remaining_amount(double now); bool is_used() override; - CpuAction *execution_start(double size) override; - kernel::resource::Action* execution_start(double, int) override + CpuAction* execution_start(double size) override; + Action* execution_start(double, int) override { THROW_UNIMPLEMENTED; return nullptr; } - CpuAction *sleep(double duration) override; + CpuAction* sleep(double duration) override; double get_speed_ratio() override; void set_modified(bool modified); @@ -140,15 +145,18 @@ public: static void create_pm_vm_models(); // Make both models be TI models CpuTiModel(); + CpuTiModel(const CpuTiModel&) = delete; + CpuTiModel& operator=(const CpuTiModel&) = delete; ~CpuTiModel() override; - Cpu* create_cpu(simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core) override; + Cpu* create_cpu(s4u::Host* host, const std::vector& speed_per_pstate, int core) override; double next_occuring_event(double now) override; void update_actions_state(double now, double delta) override; CpuTiList modified_cpus_; }; -} -} +} // namespace resource +} // namespace kernel +} // namespace simgrid #endif /* SURF_MODEL_CPUTI_H_ */