- CpuTi(CpuTiModelPtr model, string name, double powerPeak,
- double powerScale, tmgr_trace_t powerTrace, int core,
- e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace,
- xbt_dict_t properties) ;
- ~CpuTi() {};
- virtual double getSpeed (double load);
- virtual double getAvailableSpeed ();
- void printCpuTiModel();
- CpuTiModelPtr getModel();
-
- double m_powerPeak; /*< CPU power peak */
- double m_powerScale; /*< Percentage of CPU disponible */
- surf_cpu_ti_tgmr_t m_availTrace; /*< Structure with data needed to integrate trace file */
- e_surf_resource_state_t m_stateCurrent; /*< CPU current state (ON or OFF) */
- tmgr_trace_event_t m_stateEvent; /*< trace file with states events (ON or OFF) */
- tmgr_trace_event_t m_powerEvent; /*< trace file with availabitly events */
- std::vector<CpuTiActionPtr> m_actionSet; /*< set with all actions running on cpu */
- s_xbt_swag_hookup_t m_modifiedCpuHookup; /*< hookup to swag that indicacates whether share resources must be recalculated or not */
- double m_sumPriority; /*< the sum of actions' priority that are running on cpu */
- double m_lastUpdate; /*< last update of actions' remaining amount done */
-
+ CpuTi(CpuTiModel* model, simgrid::s4u::Host* host, std::vector<double>* 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 apply_event(kernel::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
+ {
+ THROW_UNIMPLEMENTED;
+ return nullptr;
+ }
+ CpuAction *sleep(double duration) override;
+ double get_speed_ratio() override;
+
+ void set_modified(bool modified);
+
+ CpuTiTmgr* speed_integrated_trace_ = nullptr; /*< Structure with data needed to integrate trace file */
+ ActionTiList action_set_; /*< set with all actions running on cpu */
+ double sum_priority_ = 0; /*< the sum of actions' priority that are running on cpu */
+ double last_update_ = 0; /*< last update of actions' remaining amount done */
+
+ boost::intrusive::list_member_hook<> cpu_ti_hook;