Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
pull up two more methods in the surf::Host hierarchy
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 22 Dec 2015 08:55:05 +0000 (09:55 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 22 Dec 2015 08:55:05 +0000 (09:55 +0100)
src/surf/host_clm03.cpp
src/surf/host_clm03.hpp
src/surf/host_interface.cpp
src/surf/host_interface.hpp
src/surf/host_ptask_L07.cpp
src/surf/host_ptask_L07.hpp

index f0c3459..1dc8e21 100644 (file)
@@ -139,14 +139,6 @@ void HostCLM03::updateState(tmgr_trace_event_t /*event_type*/, double /*value*/,
   THROW_IMPOSSIBLE;             /* This model does not implement parallel tasks */
 }
 
-Action *HostCLM03::execute(double size) {
-  return p_cpu->execute(size);
-}
-
-Action *HostCLM03::sleep(double duration) {
-  return p_cpu->sleep(duration);
-}
-
 /**********
  * Action *
  **********/
index 8f4cffe..0a4d47e 100644 (file)
@@ -55,9 +55,6 @@ public:
   ~HostCLM03();
   void updateState(tmgr_trace_event_t event_type, double value, double date) override;
 
-  virtual Action *execute(double size) override;
-  virtual Action *sleep(double duration) override;
-
   bool isUsed() override;
 
   xbt_dynar_t getVms();
index 38676b8..2c40395 100644 (file)
@@ -146,6 +146,14 @@ void Host::setState(e_surf_resource_state_t state){
   p_cpu->setState(state);
 }
 
+Action *Host::execute(double size) {
+  return p_cpu->execute(size);
+}
+Action *Host::sleep(double duration) {
+  return p_cpu->sleep(duration);
+}
+
+
 simgrid::surf::Storage *Host::findStorageOnMountList(const char* mount)
 {
   simgrid::surf::Storage *st = NULL;
index 42a31e9..793e99d 100644 (file)
@@ -135,7 +135,7 @@ public:
    * @return The CpuAction corresponding to the processing
    * @see Cpu
    */
-  virtual Action *execute(double flops_amount)=0;
+  Action *execute(double flops_amount);
 
   /**
    * @brief Make a process sleep for duration seconds
@@ -144,7 +144,7 @@ public:
    * @return The CpuAction corresponding to the sleeping
    * @see Cpu
    */
-  virtual Action *sleep(double duration)=0;
+  Action *sleep(double duration);
 
   /** @brief Return the storage of corresponding mount point */
   virtual simgrid::surf::Storage *findStorageOnMountList(const char* storage);
index 15dab6d..3fb1fa6 100644 (file)
@@ -392,16 +392,6 @@ void HostL07Model::addTraces()
 /************
  * Resource *
  ************/
-
-HostL07::HostL07(HostModel *model, const char* name, xbt_dict_t props, RoutingEdge *netElm, Cpu *cpu)
-  : Host(model, name, props, NULL, netElm, cpu)
-{
-}
-
-HostL07::~HostL07()
-{
-}
-
 CpuL07::CpuL07(CpuL07Model *model, const char* name,
                     double speedInitial, double speedScale, tmgr_trace_t speedTrace,
                           int core, e_surf_resource_state_t state_initial, tmgr_trace_t state_trace)
index 55645be..bc37f53 100644 (file)
@@ -96,12 +96,13 @@ public:
 
 class HostL07 : public Host {
 public:
-  HostL07(HostModel *model, const char* name, xbt_dict_t props, RoutingEdge *netElm, Cpu *cpu);
-  ~HostL07();
+  HostL07(HostModel *model, const char* name, xbt_dict_t props, RoutingEdge *netElm, Cpu *cpu)
+       : Host(model, name, props, NULL, netElm, cpu)
+       {}
+  ~HostL07()
+       {}
   bool isUsed() override {DIE_IMPOSSIBLE;};
   void updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) override {DIE_IMPOSSIBLE;};
-  Action *execute(double size) override {return p_cpu->execute(size);};
-  Action *sleep(double duration) override {return p_cpu->sleep(duration);};
 };
 
 class CpuL07 : public Cpu {