- CpuTi() {};
- CpuTi(CpuTiModel *model, const char *name, xbt_dynar_t powerPeak,
- int pstate, double powerScale, tmgr_trace_t powerTrace, int core,
- e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace,
- xbt_dict_t properties) ;
- ~CpuTi();
-
- void updateState(tmgr_trace_event_t event_type, double value, double date);
- void updateActionsFinishTime(double now);
- bool isUsed();
- void printCpuTiModel();
- CpuAction *execute(double size);
- CpuAction *sleep(double duration);
- double getAvailableSpeed();
-
- double getCurrentPowerPeak() {THROW_UNIMPLEMENTED;};
- double getPowerPeakAt(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
- int getNbPstates() {THROW_UNIMPLEMENTED;};
- void setPstate(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
- int getPstate() { THROW_UNIMPLEMENTED;}
- void modified(bool modified);
-
- CpuTiTgmr *p_availTrace; /*< Structure with data needed to integrate trace file */
- tmgr_trace_event_t p_stateEvent; /*< trace file with states events (ON or OFF) */
- tmgr_trace_event_t p_powerEvent; /*< trace file with availability events */
- ActionTiList *p_actionSet; /*< set with all actions running on cpu */
- double m_sumPriority; /*< the sum of actions' priority that are running on cpu */
- double m_lastUpdate; /*< last update of actions' remaining amount done */
-
- double current_frequency;
-
- void updateRemainingAmount(double now);
+ CpuTi(s4u::Host* host, const std::vector<double>& speed_per_pstate);
+ CpuTi(const CpuTi&) = delete;
+ CpuTi& operator&(const CpuTi&) = delete;
+ ~CpuTi() override;
+
+ CpuImpl* set_speed_profile(profile::Profile* profile) 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() const override;
+ CpuAction* execution_start(double size, double user_bound) override;
+ CpuAction* execution_start(double, int, double) 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;