X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cf975a3147956b454a79d81f3557a13ba7800083..d883ac7f9b2786862be1fcb700193f66ceecc030:/src/surf/cpu_interface.hpp diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index 8b66b85f68..e92c13320f 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -10,6 +10,7 @@ #include "simgrid/kernel/resource/Resource.hpp" #include "simgrid/s4u/Host.hpp" #include "src/kernel/lmm/maxmin.hpp" +#include "src/surf/trace_mgr.hpp" #include @@ -26,6 +27,8 @@ namespace surf { */ class XBT_PUBLIC CpuModel : public kernel::resource::Model { public: + explicit CpuModel(kernel::resource::Model::UpdateAlgo algo) : Model(algo) {} + /** * @brief Create a Cpu * @@ -35,8 +38,8 @@ public: */ virtual Cpu *createCpu(simgrid::s4u::Host *host, std::vector *speedPerPstate, int core)=0; - void updateActionsStateLazy(double now, double delta) override; - void updateActionsStateFull(double now, double delta) override; + void update_actions_state_lazy(double now, double delta) override; + void update_actions_state_full(double now, double delta) override; }; /************ @@ -111,7 +114,7 @@ protected: public: /** @brief Get the available speed of the current Cpu */ - virtual double getAvailableSpeed(); + virtual double get_available_speed(); /** @brief Get the current Cpu computational speed */ virtual double getPstateSpeed(int pstate_index); @@ -129,7 +132,9 @@ public: int pstate_ = 0; /*< Current pstate (index in the speedPeakList)*/ virtual void setStateTrace(tmgr_trace_t trace); /*< setup the trace file with states events (ON or OFF). Trace must contain boolean values (0 or 1). */ - virtual void setSpeedTrace(tmgr_trace_t trace); /*< setup the trace file with availability events (peak speed changes due to external load). Trace must contain relative values (ratio between 0 and 1) */ + virtual void + set_speed_trace(tmgr_trace_t trace); /*< setup the trace file with availability events (peak speed changes due to + external load). Trace must contain relative values (ratio between 0 and 1) */ tmgr_trace_event_t stateEvent_ = nullptr; Metric speed_ = {1.0, 0, nullptr}; @@ -165,7 +170,7 @@ public: void update_remains_lazy(double now) override; std::list cpus(); - + void suspend() override; void resume() override; };