X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5b867af718c91a3279c07e08ab9bcf164ff64466..0ea1a3dca97a66f81466333806853c97af7eb398:/src/surf/cpu_interface.cpp diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 4307bd86d0..97473382c5 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -20,7 +20,7 @@ namespace surf { * Model * *********/ -void CpuModel::updateActionsStateLazy(double now, double /*delta*/) +void CpuModel::update_actions_state_lazy(double now, double /*delta*/) { while (not actionHeapIsEmpty() && double_equals(actionHeapTopDate(), now, sg_surf_precision)) { @@ -39,7 +39,7 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/) //defining the last timestamp that we can safely dump to trace file //without losing the event ascending order (considering all CPU's) double smaller = -1; - for (kernel::resource::Action const& action : *getRunningActionSet()) { + for (kernel::resource::Action const& action : *get_running_action_set()) { if (smaller < 0 || action.get_last_update() < smaller) smaller = action.get_last_update(); } @@ -49,9 +49,9 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/) } } -void CpuModel::updateActionsStateFull(double now, double delta) +void CpuModel::update_actions_state_full(double now, double delta) { - for (auto it = std::begin(*getRunningActionSet()); it != std::end(*getRunningActionSet());) { + for (auto it = std::begin(*get_running_action_set()); it != std::end(*get_running_action_set());) { CpuAction& action = static_cast(*it); ++it; // increment iterator here since the following calls to action.finish() may invalidate it if (TRACE_is_enabled()) { @@ -136,7 +136,7 @@ double Cpu::getSpeed(double load) return load * speed_.peak; } -double Cpu::getAvailableSpeed() +double Cpu::get_available_speed() { /* number between 0 and 1 */ return speed_.scale; @@ -158,7 +158,7 @@ void Cpu::setStateTrace(tmgr_trace_t trace) stateEvent_ = future_evt_set->add_trace(trace, this); } -void Cpu::setSpeedTrace(tmgr_trace_t trace) +void Cpu::set_speed_trace(tmgr_trace_t trace) { xbt_assert(speed_.event == nullptr, "Cannot set a second speed trace to Host %s", host_->getCname()); @@ -172,7 +172,8 @@ void Cpu::setSpeedTrace(tmgr_trace_t trace) void CpuAction::update_remains_lazy(double now) { - xbt_assert(get_state_set() == get_model()->getRunningActionSet(), "You're updating an action that is not running."); + xbt_assert(get_state_set() == get_model()->get_running_action_set(), + "You're updating an action that is not running."); xbt_assert(get_priority() > 0, "You're updating an action that seems suspended."); double delta = now - get_last_update();