X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/30566ab3f04ba7b85300adab25c47a9fd4a836a2..7b3e6dbec91461f76c2c94185e583654e967be53:/src/surf/cpu_ti.hpp diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index 0196d91788..c4fab1d4d7 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -13,6 +13,9 @@ /* Epsilon */ #define EPSILON 0.000000001 +namespace simgrid { +namespace surf { + /*********** * Classes * ***********/ @@ -96,7 +99,7 @@ public: CpuTi *p_cpu; int m_indexHeap; - int m_suspended; + int m_suspended = 0; public: boost::intrusive::list_member_hook<> action_ti_hook; }; @@ -111,11 +114,9 @@ typedef boost::intrusive::list< ************/ class CpuTi : public Cpu { public: - CpuTi() {}; - CpuTi(CpuTiModel *model, const char *name, xbt_dynar_t speedPeak, + CpuTi(CpuTiModel *model, simgrid::Host *host, xbt_dynar_t speedPeak, int pstate, double speedScale, tmgr_trace_t speedTrace, int core, - e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace, - xbt_dict_t properties) ; + e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace) ; ~CpuTi(); void updateState(tmgr_trace_event_t event_type, double value, double date); @@ -126,11 +127,6 @@ public: 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 */ @@ -158,12 +154,11 @@ class CpuTiModel : public CpuModel { public: CpuTiModel(); ~CpuTiModel(); - Cpu *createCpu(const char *name, xbt_dynar_t speedPeak, + 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, - tmgr_trace_t state_trace, - xbt_dict_t cpu_properties); + tmgr_trace_t state_trace); double shareResources(double now); void updateActionsState(double now, double delta); void addTraces(); @@ -173,10 +168,13 @@ public: xbt_heap_t p_tiActionHeap; protected: - void NotifyResourceTurnedOn(Resource*){}; - void NotifyResourceTurnedOff(Resource*){}; + void NotifyResourceTurnedOn(simgrid::surf::Resource*){}; + void NotifyResourceTurnedOff(simgrid::surf::Resource*){}; void NotifyActionCancel(Action*){}; void NotifyActionResume(Action*){}; void NotifyActionSuspend(Action*){}; }; + +} +}