X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1b4dc02411d79e4c367d331b85c1b295ec41edff..12e37132d1b9b141fa8497e17b0629cfd4173c36:/src/surf/ptask_L07.cpp diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 674c35d961..5b6be896af 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -121,7 +121,7 @@ void HostL07Model::update_actions_state(double /*now*/, double delta) while (cnst != nullptr) { i++; void* constraint_id = cnst->get_id(); - if (static_cast(constraint_id)->is_off()) { + if (not static_cast(constraint_id)->is_on()) { XBT_DEBUG("Action (%p) Failed!!", &action); action.finish(kernel::resource::Action::State::FAILED); break; @@ -132,14 +132,15 @@ void HostL07Model::update_actions_state(double /*now*/, double delta) } } -kernel::resource::Action* HostL07Model::execute_parallel(size_t host_nb, sg_host_t* host_list, double* flops_amount, - double* bytes_amount, double rate) +kernel::resource::Action* HostL07Model::execute_parallel(size_t host_nb, s4u::Host* const* host_list, + const double* flops_amount, const double* bytes_amount, + double rate) { return new L07Action(this, host_nb, host_list, flops_amount, bytes_amount, rate); } -L07Action::L07Action(kernel::resource::Model* model, size_t host_nb, sg_host_t* host_list, double* flops_amount, - double* bytes_amount, double rate) +L07Action::L07Action(kernel::resource::Model* model, size_t host_nb, s4u::Host* const* host_list, + const double* flops_amount, const double* bytes_amount, double rate) : CpuAction(model, 1, 0), computationAmount_(flops_amount), communicationAmount_(bytes_amount), rate_(rate) { size_t link_nb = 0; @@ -314,7 +315,7 @@ bool LinkL07::is_used() return get_model()->get_maxmin_system()->constraint_used(get_constraint()); } -void CpuL07::apply_event(tmgr_trace_event_t triggered, double value) +void CpuL07::apply_event(kernel::profile::Event* triggered, double value) { XBT_DEBUG("Updating cpu %s (%p) with value %g", get_cname(), this, value); if (triggered == speed_.event) { @@ -324,7 +325,7 @@ void CpuL07::apply_event(tmgr_trace_event_t triggered, double value) } else if (triggered == state_event_) { if (value > 0) { - if (is_off()) { + if (not is_on()) { XBT_VERB("Restart processes on host %s", get_host()->get_cname()); get_host()->turn_on(); } @@ -337,7 +338,7 @@ void CpuL07::apply_event(tmgr_trace_event_t triggered, double value) } } -void LinkL07::apply_event(tmgr_trace_event_t triggered, double value) +void LinkL07::apply_event(kernel::profile::Event* triggered, double value) { XBT_DEBUG("Updating link %s (%p) with value=%f", get_cname(), this, value); if (triggered == bandwidth_.event) {