+void intrusive_ptr_add_ref(simgrid::s4u::Exec* e)
+{
+ e->refcount_.fetch_add(1, std::memory_order_relaxed);
+}
+
+/** @brief change the execution bound
+ * This means changing the maximal amount of flops per second that it may consume, regardless of what the host may
+ * deliver. Currently, this cannot be changed once the exec started.
+ */
+ExecPtr Exec::set_bound(double bound)
+{
+ xbt_assert(state_ == State::INITED, "Cannot change the bound of an exec after its start");
+ bound_ = bound;
+ return this;
+}
+ExecPtr Exec::set_timeout(double timeout)
+{
+ xbt_assert(state_ == State::INITED, "Cannot change the bound of an exec after its start");
+ timeout_ = timeout;
+ return this;
+}
+
+ExecPtr Exec::set_name(const std::string& name)
+{
+ xbt_assert(state_ == State::INITED, "Cannot change the name of an exec after its start");
+ name_ = name;
+ return this;