X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f60c6c67576ca97e84d781811f9076c18f183b11..d896265a56dbf34328e32566da1932835d840d27:/src/surf/cpu_cas01.hpp diff --git a/src/surf/cpu_cas01.hpp b/src/surf/cpu_cas01.hpp index 438f3c2ff4..b40cd044fd 100644 --- a/src/surf/cpu_cas01.hpp +++ b/src/surf/cpu_cas01.hpp @@ -29,14 +29,13 @@ public: double (CpuCas01Model::*shareResources)(double now); void (CpuCas01Model::*updateActionsState)(double now, double delta); - void parseInit(sg_platf_host_cbarg_t host); - CpuPtr createResource(const char *name, xbt_dynar_t power_peak, int pstate, - double power_scale, + CpuPtr createCpu(const char *name, xbt_dynar_t power_peak, int pstate, + double power_scale, tmgr_trace_t power_trace, int core, e_surf_resource_state_t state_initial, tmgr_trace_t state_trace, xbt_dict_t cpu_properties); - double shareResourcesFull(double now); + double shareResourcesFull(double now); void addTraces(); ActionListPtr p_cpuRunningActionSetThatDoesNotNeedBeingChecked; }; @@ -59,7 +58,8 @@ public: double getCurrentPowerPeak(); double getPowerPeakAt(int pstate_index); int getNbPstates(); - void setPowerPeakAt(int pstate_index); + void setPstate(int pstate_index); + int getPstate(); bool isUsed(); void setStateEvent(tmgr_trace_event_t stateEvent); void setPowerEvent(tmgr_trace_event_t stateEvent); @@ -70,8 +70,8 @@ public: private: tmgr_trace_event_t p_stateEvent; tmgr_trace_event_t p_powerEvent; - xbt_dynar_t p_powerPeakList; /*< List of supported CPU capacities */ - int m_pstate; /*< Current pstate (index in the power_peak_list)*/ + xbt_dynar_t p_powerPeakList; /*< List of supported CPU capacities */ + int m_pstate; /*< Current pstate (index in the power_peak_list)*/ }; /********** @@ -81,7 +81,8 @@ class CpuCas01Action: public CpuAction { friend CpuActionPtr CpuCas01::execute(double size); friend CpuActionPtr CpuCas01::sleep(double duration); public: - CpuCas01Action(ModelPtr model, double cost, bool failed, double power, lmm_constraint_t constraint); + CpuCas01Action(ModelPtr model, double cost, bool failed, double power, + lmm_constraint_t constraint); ~CpuCas01Action() {}; };