X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8dadf249202bc6834a1d680b8ec8446937b3c4a6..5c979a2a19b47295bc467cfda3c6541f60b6fe13:/src/surf/cpu_interface.hpp diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index 2cb2d53843..861ab24b0f 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -56,7 +56,7 @@ public: virtual Cpu *createCpu(simgrid::Host *host, xbt_dynar_t speedPeak, int pstate, double speedScale, tmgr_trace_t speedTrace, int core, - e_surf_resource_state_t state_initial, + int initiallyOn, tmgr_trace_t state_trace)=0; void updateActionsStateLazy(double now, double delta); @@ -74,8 +74,6 @@ public: */ XBT_PUBLIC_CLASS Cpu : public simgrid::surf::Resource { public: - Cpu(); - /** * @brief Cpu constructor * @@ -90,7 +88,7 @@ public: Cpu(simgrid::surf::Model *model, simgrid::Host *host, lmm_constraint_t constraint, xbt_dynar_t speedPeakList, int pstate, int core, double speedPeak, double speedScale, - e_surf_resource_state_t stateInitial); + int initiallyOn); /** * @brief Cpu constructor @@ -105,14 +103,7 @@ public: Cpu(simgrid::surf::Model *model, simgrid::Host *host, xbt_dynar_t speedPeakList, int pstate, int core, double speedPeak, double speedScale, - e_surf_resource_state_t stateInitial); - - Cpu(simgrid::surf::Model *model, simgrid::Host *host, lmm_constraint_t constraint, - xbt_dynar_t speedPeakList, int pstate, - int core, double speedPeak, double speedScale); - Cpu(simgrid::surf::Model *model, simgrid::Host *host, - xbt_dynar_t speedPeakList, int pstate, - int core, double speedPeak, double speedScale); + int initiallyOn); ~Cpu(); @@ -138,6 +129,11 @@ public: /** @brief Get the speed, accounting for the trace load and provided process load instead of the real current one */ virtual double getSpeed(double load); +protected: + /** @brief Take speed changes (either load or max) into account */ + virtual void onSpeedChange(); + +public: /** @brief Get the available speed of the current Cpu */ virtual double getAvailableSpeed(); @@ -186,7 +182,7 @@ public: /** @brief CpuAction constructor */ CpuAction(simgrid::surf::Model *model, double cost, bool failed) - : Action(model, cost, failed) {} //FIXME:REMOVE + : Action(model, cost, failed) {} //FIXME:DEADCODE? /** @brief CpuAction constructor */ CpuAction(simgrid::surf::Model *model, double cost, bool failed, lmm_variable_t var)