Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[CpuTI] don't override pstate handling with THROW_UNIMPLEMENTED
[simgrid.git] / src / surf / cpu_ti.hpp
index 75ffbf4..c4fab1d 100644 (file)
@@ -99,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;
 };
@@ -114,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);
@@ -129,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 */
@@ -161,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();