Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Modernize simcall mutex_unlock.
[simgrid.git] / include / simgrid / s4u / Host.hpp
index eede647361ee67b4185cbc2eb6680d94d1f023e1..f50f1484b7f413e4d31fdefbc93eb1890b29b09c 100644 (file)
@@ -45,11 +45,8 @@ public:
   explicit Host(const std::string& name);
 
 protected:
-  virtual ~Host();
-  void set_netpoint(kernel::routing::NetPoint* netpoint) { pimpl_netpoint_ = netpoint; }
-
-private:
-  bool currently_destroying_ = false;
+  virtual ~Host(); // Call destroy() instead of manually deleting it.
+  Host* set_netpoint(kernel::routing::NetPoint* netpoint);
 #endif
 
 public:
@@ -103,9 +100,9 @@ public:
   bool is_on() const;
 
   const char* get_property(const std::string& key) const;
-  void set_property(const std::string& key, const std::string& value);
+  Host* set_property(const std::string& key, const std::string& value);
   const std::unordered_map<std::string, std::string>* get_properties() const;
-  void set_properties(const std::unordered_map<std::string, std::string>& properties);
+  Host* set_properties(const std::unordered_map<std::string, std::string>& properties);
 
   void set_state_profile(kernel::profile::Profile* p);
   void set_speed_profile(kernel::profile::Profile* p);
@@ -131,8 +128,11 @@ public:
    * This accounts for external load (see @ref simgrid::surf::Cpu::set_speed_profile()).
    */
   double get_available_speed() const;
+
   /** Returns the number of core of the processor. */
   int get_core_count() const;
+  Host* set_core_count(int core_count);
+
   /** Returns the current computation load (in flops per second)
    *
    * The external load (coming from an availability trace) is not taken in account.
@@ -146,6 +146,7 @@ public:
   int get_pstate() const;
 
   std::vector<Disk*> get_disks() const;
+  Disk* create_disk(const std::string& name, double read_bandwidth, double write_bandwidth);
   void add_disk(const Disk* disk);
   void remove_disk(const std::string& disk_name);
 
@@ -182,6 +183,7 @@ public:
    */
   void execute(double flops) const;
   /** Start an asynchronous computation on that host (possibly remote) */
+  ExecPtr exec_init(double flops_amounts) const;
   ExecPtr exec_async(double flops_amounts) const;
 
   /** Block the calling actor on an execution located on the called host (with explicit priority) */