}
}
-kernel::resource::Action* HostL07Model::execute_parallel(const std::vector<s4u::Host*>& host_list,
- const double* flops_amount, const double* bytes_amount,
- double rate)
+kernel::resource::CpuAction* HostL07Model::execute_parallel(const std::vector<s4u::Host*>& host_list,
+ const double* flops_amount, const double* bytes_amount,
+ double rate)
{
return new L07Action(this, host_list, flops_amount, bytes_amount, rate);
}
return res;
}
-Cpu* CpuL07Model::create_cpu(simgrid::s4u::Host* host, const std::vector<double>& speed_per_pstate, int core)
+kernel::resource::Cpu* CpuL07Model::create_cpu(s4u::Host* host, const std::vector<double>& speed_per_pstate, int core)
{
return new CpuL07(this, host, speed_per_pstate, core);
}
s4u::Link::on_creation(this->piface_);
}
-kernel::resource::Action* CpuL07::execution_start(double size)
+kernel::resource::CpuAction* CpuL07::execution_start(double size)
{
std::vector<s4u::Host*> host_list = {get_host()};
double* flops_amount = new double[host_list.size()]();
flops_amount[0] = size;
- kernel::resource::Action* res =
+ kernel::resource::CpuAction* res =
static_cast<CpuL07Model*>(get_model())->hostModel_->execute_parallel(host_list, flops_amount, nullptr, -1);
static_cast<L07Action*>(res)->free_arrays_ = true;
return res;
}
-kernel::resource::Action* CpuL07::sleep(double duration)
+kernel::resource::CpuAction* CpuL07::sleep(double duration)
{
L07Action *action = static_cast<L07Action*>(execution_start(1.0));
action->set_max_duration(duration);
- action->suspended_ = kernel::resource::Action::SuspendStates::sleeping;
+ action->set_suspend_state(kernel::resource::Action::SuspendStates::SLEEPING);
get_model()->get_maxmin_system()->update_variable_weight(action->get_variable(), 0.0);
return action;
}
double lat_bound = kernel::resource::NetworkModel::cfg_tcp_gamma / (2.0 * lat_current);
XBT_DEBUG("action (%p) : lat_bound = %g", this, lat_bound);
- if ((latency_ <= 0.0) && (suspended_ == Action::SuspendStates::not_suspended)) {
+ if ((latency_ <= 0.0) && is_running()) {
if (rate_ < 0)
get_model()->get_maxmin_system()->update_variable_bound(get_variable(), lat_bound);
else