Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Host: non-linear constraints
[simgrid.git] / include / simgrid / s4u / Host.hpp
index c39588f..4280793 100644 (file)
@@ -157,6 +157,16 @@ public:
   int get_core_count() const;
   Host* set_core_count(int core_count);
 
+  enum class SharingPolicy { NONLINEAR = 1, LINEAR = 0 };
+  /**
+   * @brief Describes how the CPU is shared between concurrent tasks
+   *
+   * @param policy Sharing policy
+   * @param cb Callback for NONLINEAR policies
+   */
+  Host* set_sharing_policy(SharingPolicy policy, const s4u::NonLinearResourceCb& cb = {});
+  SharingPolicy get_sharing_policy() const;
+
   /** Returns the current computation load (in flops per second)
    *
    * The external load (coming from an availability trace) is not taken in account.