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 f95c819..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,8 +114,7 @@ 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) ;
   ~CpuTi();
@@ -128,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 */
@@ -160,7 +154,7 @@ 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,