Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename some symbols around Link::isShared to make their purpose clear
[simgrid.git] / src / surf / host_ptask_L07.hpp
index 34d7a2c..86acc7d 100644 (file)
@@ -38,7 +38,7 @@ public:
 
   double shareResources(double now);
   void updateActionsState(double now, double delta);
 
   double shareResources(double now);
   void updateActionsState(double now, double delta);
-  Host *createHost(const char *name);
+  Host *createHost(const char *name,RoutingEdge *netElm, Cpu *cpu);
   Action *executeParallelTask(int host_nb,
                               sg_host_t *host_list,
                                                          double *flops_amount,
   Action *executeParallelTask(int host_nb,
                               sg_host_t *host_list,
                                                          double *flops_amount,
@@ -93,17 +93,11 @@ public:
 class HostL07 : public Host {
 public:
   HostL07(HostModel *model, const char* name, xbt_dict_t props, RoutingEdge *netElm, Cpu *cpu);
 class HostL07 : public Host {
 public:
   HostL07(HostModel *model, const char* name, xbt_dict_t props, RoutingEdge *netElm, Cpu *cpu);
-  //bool isUsed();
   bool isUsed() {DIE_IMPOSSIBLE;};
   void updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) {DIE_IMPOSSIBLE;};
   bool isUsed() {DIE_IMPOSSIBLE;};
   void updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) {DIE_IMPOSSIBLE;};
-  Action *execute(double size);
-  Action *sleep(double duration);
+  Action *execute(double size) {return p_cpu->execute(size);};
+  Action *sleep(double duration) {return p_cpu->sleep(duration);};
   e_surf_resource_state_t getState();
   e_surf_resource_state_t getState();
-  double getPowerPeakAt(int pstate_index);
-  int getNbPstates();
-  void setPstate(int pstate_index);
-  int  getPstate();
-  double getConsumedEnergy();
 };
 
 class CpuL07 : public Cpu {
 };
 
 class CpuL07 : public Cpu {
@@ -115,10 +109,9 @@ public:
                 double power_scale, double power_initial, tmgr_trace_t power_trace,
      int core, e_surf_resource_state_t state_initial, tmgr_trace_t state_trace);
   bool isUsed();
                 double power_scale, double power_initial, tmgr_trace_t power_trace,
      int core, e_surf_resource_state_t state_initial, tmgr_trace_t state_trace);
   bool isUsed();
-  //bool isUsed() {DIE_IMPOSSIBLE;};
   void updateState(tmgr_trace_event_t event_type, double value, double date);
   void updateState(tmgr_trace_event_t event_type, double value, double date);
-  CpuAction *execute(double /*size*/) {DIE_IMPOSSIBLE;};
-  CpuAction *sleep(double /*duration*/) {DIE_IMPOSSIBLE;};
+  Action *execute(double size);
+  Action *sleep(double duration);
 
   double getCurrentPowerPeak() {THROW_UNIMPLEMENTED;};
   double getPowerPeakAt(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
 
   double getCurrentPowerPeak() {THROW_UNIMPLEMENTED;};
   double getPowerPeakAt(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
@@ -145,7 +138,7 @@ public:
   void updateState(tmgr_trace_event_t event_type, double value, double date);
   double getBandwidth();
   double getLatency();
   void updateState(tmgr_trace_event_t event_type, double value, double date);
   double getBandwidth();
   double getLatency();
-  bool isShared();
+  int sharingPolicy();
   void updateBandwidth(double value, double date=surf_get_clock());
   void updateLatency(double value, double date=surf_get_clock());
 
   void updateBandwidth(double value, double date=surf_get_clock());
   void updateLatency(double value, double date=surf_get_clock());
 
@@ -159,8 +152,8 @@ public:
  * Action *
  **********/
 class L07Action : public HostAction {
  * Action *
  **********/
 class L07Action : public HostAction {
-  friend Action *HostL07::execute(double size);
-  friend Action *HostL07::sleep(double duration);
+  friend Action *CpuL07::execute(double size);
+  friend Action *CpuL07::sleep(double duration);
   friend Action *HostL07Model::executeParallelTask(int host_nb,
                                                    sg_host_t*host_list,
                                                    double *flops_amount,
   friend Action *HostL07Model::executeParallelTask(int host_nb,
                                                    sg_host_t*host_list,
                                                    double *flops_amount,