Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move the vanilla def of executeParallelTask in HostModel
[simgrid.git] / src / surf / cpu_ti.hpp
index 17940d8..be3b561 100644 (file)
@@ -91,7 +91,6 @@ public:
   void updateIndexHeap(int i);
   void suspend() override;
   void resume() override;
-  bool isSuspended() override;
   void setMaxDuration(double duration) override;
   void setPriority(double priority) override;
   double getRemains() override;
@@ -114,15 +113,14 @@ typedef boost::intrusive::list<
  ************/
 class CpuTi : public Cpu {
 public:
-  CpuTi(CpuTiModel *model, simgrid::Host *host, xbt_dynar_t speedPeak,
+  CpuTi(CpuTiModel *model, simgrid::s4u::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) ;
+        int initiallyOn, tmgr_trace_t stateTrace) ;
   ~CpuTi();
 
   void updateState(tmgr_trace_event_t event_type, double value, double date) override;
   void updateActionsFinishTime(double now);
   bool isUsed() override;
-  void printCpuTiModel();
   CpuAction *execute(double size) override;
   CpuAction *sleep(double duration) override;
   double getAvailableSpeed() override;
@@ -130,11 +128,11 @@ public:
   void modified(bool modified);
 
   CpuTiTgmr *p_availTrace;       /*< Structure with data needed to integrate trace file */
-  tmgr_trace_event_t p_stateEvent;       /*< trace file with states events (ON or OFF) */
-  tmgr_trace_event_t p_speedEvent;       /*< trace file with availability events */
+  tmgr_trace_event_t p_stateEvent = NULL; /*< trace file with states events (ON or OFF) */
+  tmgr_trace_event_t p_speedEvent = NULL; /*< trace file with availability events */
   ActionTiList *p_actionSet;        /*< set with all actions running on cpu */
   double m_sumPriority;          /*< the sum of actions' priority that are running on cpu */
-  double m_lastUpdate;           /*< last update of actions' remaining amount done */
+  double m_lastUpdate = 0;       /*< last update of actions' remaining amount done */
 
   double current_frequency;
 
@@ -154,10 +152,10 @@ class CpuTiModel : public CpuModel {
 public:
   CpuTiModel();
   ~CpuTiModel();
-  Cpu *createCpu(simgrid::Host *host,  xbt_dynar_t speedPeak,
+  Cpu *createCpu(simgrid::s4u::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);
   double shareResources(double now) override;
   void updateActionsState(double now, double delta) override;