Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix lua compilation
[simgrid.git] / src / surf / ptask_L07.hpp
index a2192e1..f153895 100644 (file)
@@ -35,10 +35,9 @@ class XBT_PRIVATE L07Action;
  *********/
 class HostL07Model : public HostModel {
 public:
-  HostL07Model();
+  explicit HostL07Model(const std::string& name);
   HostL07Model(const HostL07Model&) = delete;
   HostL07Model& operator=(const HostL07Model&) = delete;
-  ~HostL07Model() override;
 
   double next_occurring_event(double now) override;
   void update_actions_state(double now, double delta) override;
@@ -48,33 +47,35 @@ public:
 
 class CpuL07Model : public kernel::resource::CpuModel {
 public:
-  CpuL07Model(HostL07Model* hmodel, kernel::lmm::System* sys);
+  CpuL07Model(const std::string& name, HostL07Model* hmodel, kernel::lmm::System* sys);
   CpuL07Model(const CpuL07Model&) = delete;
   CpuL07Model& operator=(const CpuL07Model&) = delete;
   ~CpuL07Model() override;
-  /* this action is done by HostL07Model which shares the LMM system with the CPU model
-   * Overriding to an empty function here allows us to handle the Cpu07Model as a regular
-   * method in surf_presolve */
-  void update_actions_state(double now, double delta) override{};
+  void update_actions_state(double /*now*/, double /*delta*/) override{
+      /* this action is done by HostL07Model which shares the LMM system with the CPU model
+       * Overriding to an empty function here allows us to handle the Cpu07Model as a regular
+       * method in surf_presolve */
+  };
 
-  kernel::resource::Cpu* create_cpu(s4u::Host* host, const std::vector<double>& speed_per_pstate) override;
+  kernel::resource::CpuImpl* create_cpu(s4u::Host* host, const std::vector<double>& speed_per_pstate) override;
   HostL07Model* hostModel_;
 };
 
 class NetworkL07Model : public kernel::resource::NetworkModel {
 public:
-  NetworkL07Model(HostL07Model* hmodel, kernel::lmm::System* sys);
+  NetworkL07Model(const std::string& name, HostL07Model* hmodel, kernel::lmm::System* sys);
   NetworkL07Model(const NetworkL07Model&) = delete;
   NetworkL07Model& operator=(const NetworkL07Model&) = delete;
   ~NetworkL07Model() override;
-  kernel::resource::LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths,
-                                          s4u::Link::SharingPolicy policy) override;
+  kernel::resource::LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths) final;
+  kernel::resource::LinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bandwidths) override;
 
   kernel::resource::Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override;
-  /* this action is done by HostL07Model which shares the LMM system with the CPU model
-   * Overriding to an empty function here allows us to handle the Cpu07Model as a regular
-   * method in surf_presolve */
-  void update_actions_state(double now, double delta) override{};
+  void update_actions_state(double /*now*/, double /*delta*/) override{
+      /* this action is done by HostL07Model which shares the LMM system with the CPU model
+       * Overriding to an empty function here allows us to handle the Cpu07Model as a regular
+       * method in surf_presolve */
+  };
 
   HostL07Model* hostModel_;
 };
@@ -83,9 +84,9 @@ public:
  * Resource *
  ************/
 
-class CpuL07 : public kernel::resource::Cpu {
+class CpuL07 : public kernel::resource::CpuImpl {
 public:
-  CpuL07(s4u::Host* host, const std::vector<double>& speed_per_pstate) : Cpu(host, speed_per_pstate){};
+  using kernel::resource::CpuImpl::CpuImpl;
   CpuL07(const CpuL07&) = delete;
   CpuL07& operator=(const CpuL07&) = delete;
 
@@ -105,7 +106,7 @@ protected:
 
 class LinkL07 : public kernel::resource::LinkImpl {
 public:
-  LinkL07(const std::string& name, double bandwidth, s4u::Link::SharingPolicy policy, kernel::lmm::System* system);
+  LinkL07(const std::string& name, double bandwidth, kernel::lmm::System* system);
   LinkL07(const LinkL07&) = delete;
   LinkL07& operator=(const LinkL07&) = delete;
   ~LinkL07() override;