ExecPtr set_priority(double priority);
ExecPtr set_bound(double bound);
ExecPtr set_host(Host* host);
+ ExecPtr set_name(std::string name);
Host* get_host();
double get_remaining() override;
double flops_amount_ = 0.0;
double priority_ = 1.0;
double bound_ = 0.0;
+ std::string name_ = "";
std::atomic_int_fast32_t refcount_{0};
}; // class
}
Activity* Exec::start()
{
- pimpl_ = simcall_execution_start("", flops_amount_, 1. / priority_, bound_, host_);
+ pimpl_ = simcall_execution_start(name_, flops_amount_, 1. / priority_, bound_, host_);
state_ = State::STARTED;
return this;
}
return this;
}
+ExecPtr Exec::set_name(std::string name)
+{
+ xbt_assert(state_ == State::INITED, "Cannot change the name of an exec after its start");
+ name_ = name;
+ return this;
+}
+
/** @brief Retrieve the host on which this activity takes place. */
Host* Exec::get_host()
{