Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Simplifications.
[simgrid.git] / src / surf / cpu_interface.hpp
index 38ccfc9..16ecdfd 100644 (file)
@@ -10,7 +10,7 @@
 #include "simgrid/kernel/resource/Resource.hpp"
 #include "simgrid/s4u/Host.hpp"
 #include "src/kernel/lmm/maxmin.hpp"
-#include "src/surf/trace_mgr.hpp"
+#include "src/kernel/resource/profile/trace_mgr.hpp"
 
 #include <list>
 
@@ -76,6 +76,8 @@ public:
   Cpu(simgrid::kernel::resource::Model * model, simgrid::s4u::Host * host, std::vector<double> * speedPerPstate,
       int core);
 
+  Cpu(const Cpu&) = delete;
+  Cpu& operator=(const Cpu&) = delete;
   ~Cpu();
 
   /**
@@ -164,13 +166,10 @@ protected:
 class XBT_PUBLIC CpuAction : public simgrid::kernel::resource::Action {
 public:
   /** @brief Signal emitted when the action state changes (ready/running/done, etc)
-   *  Signature: `void(CpuAction *action, simgrid::kernel::resource::Action::State previous)`
+   *  Signature: `void(CpuAction const& action, simgrid::kernel::resource::Action::State previous)`
    */
-  static simgrid::xbt::signal<void(simgrid::surf::CpuAction*, simgrid::kernel::resource::Action::State)> on_state_change;
-  /** @brief Signal emitted when the action share changes (amount of flops it gets)
-   *  Signature: `void(CpuAction *action)`
-   */
-  static simgrid::xbt::signal<void(simgrid::surf::CpuAction*)> on_share_change;
+  static simgrid::xbt::signal<void(simgrid::surf::CpuAction const&, simgrid::kernel::resource::Action::State)>
+      on_state_change;
 
   CpuAction(simgrid::kernel::resource::Model * model, double cost, bool failed) : Action(model, cost, failed) {}
   CpuAction(simgrid::kernel::resource::Model * model, double cost, bool failed, kernel::lmm::Variable* var)
@@ -181,7 +180,7 @@ public:
   void set_state(simgrid::kernel::resource::Action::State state) override;
 
   void update_remains_lazy(double now) override;
-  std::list<Cpu*> cpus();
+  std::list<Cpu*> cpus() const;
 
   void suspend() override;
   void resume() override;