From: Arnaud Giersch Date: Sun, 8 Apr 2018 20:11:28 +0000 (+0200) Subject: Fix old typo: CpuTiTgmr -> CpuTiTmgr. X-Git-Tag: v3.20~494 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3eb46e730c0eeedb08609b2303d288a140934ded?hp=1cd245755b7bf835067aba4fde87a4c6bb63ae07 Fix old typo: CpuTiTgmr -> CpuTiTmgr. --- diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index 62b5ce5100..ad16d13b7f 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -45,7 +45,7 @@ CpuTiTrace::~CpuTiTrace() delete [] integral_; } -CpuTiTgmr::~CpuTiTgmr() +CpuTiTmgr::~CpuTiTmgr() { if (trace_) delete trace_; @@ -61,7 +61,7 @@ CpuTiTgmr::~CpuTiTgmr() * \param b End of interval * \return the integrate value. -1 if an error occurs. */ -double CpuTiTgmr::integrate(double a, double b) +double CpuTiTmgr::integrate(double a, double b) { int a_index; @@ -138,7 +138,7 @@ double CpuTiTrace::integrate_simple_point(double a) * \param amount Amount to be executed * \return End time */ -double CpuTiTgmr::solve(double a, double amount) +double CpuTiTmgr::solve(double a, double amount) { /* Fix very small negative numbers */ if ((a < 0.0) && (a > -EPSILON)) { @@ -212,7 +212,7 @@ double CpuTiTrace::solve_simple(double a, double amount) * \param a Time * \return CPU speed scale */ -double CpuTiTgmr::get_power_scale(double a) +double CpuTiTmgr::get_power_scale(double a) { double reduced_a = a - floor(a / last_time_) * last_time_; int point = trace_->binary_search(trace_->time_points_, reduced_a, 0, trace_->nb_points_ - 1); @@ -227,7 +227,7 @@ double CpuTiTgmr::get_power_scale(double a) * \param value Percentage of CPU speed available (useful to fixed tracing) * \return Integration trace structure */ -CpuTiTgmr::CpuTiTgmr(tmgr_trace_t speedTrace, double value) : speed_trace_(speedTrace) +CpuTiTmgr::CpuTiTmgr(tmgr_trace_t speedTrace, double value) : speed_trace_(speedTrace) { double total_time = 0.0; trace_ = 0; @@ -362,7 +362,7 @@ CpuTi::CpuTi(CpuTiModel *model, simgrid::s4u::Host *host, std::vector *s speed_.peak = speedPerPstate->front(); XBT_DEBUG("CPU create: peak=%f", speed_.peak); - speed_integrated_trace_ = new CpuTiTgmr(nullptr, 1 /*scale*/); + speed_integrated_trace_ = new CpuTiTmgr(nullptr, 1 /*scale*/); } CpuTi::~CpuTi() @@ -375,7 +375,7 @@ void CpuTi::set_speed_trace(tmgr_trace_t trace) if (speed_integrated_trace_) delete speed_integrated_trace_; - speed_integrated_trace_ = new CpuTiTgmr(trace, speed_.scale); + speed_integrated_trace_ = new CpuTiTmgr(trace, speed_.scale); /* add a fake trace event if periodicity == 0 */ if (trace && trace->event_list.size() > 1) { @@ -389,7 +389,7 @@ void CpuTi::apply_event(tmgr_trace_event_t event, double value) { if (event == speed_.event) { tmgr_trace_t speedTrace; - CpuTiTgmr *trace; + CpuTiTmgr* trace; XBT_DEBUG("Finish trace date: value %f", value); /* update remaining of actions and put in modified cpu list */ @@ -402,7 +402,7 @@ void CpuTi::apply_event(tmgr_trace_event_t event, double value) delete speed_integrated_trace_; speed_.scale = val.value_; - trace = new CpuTiTgmr(TRACE_FIXED, val.value_); + trace = new CpuTiTmgr(TRACE_FIXED, val.value_); XBT_DEBUG("value %f", val.value_); speed_integrated_trace_ = trace; diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index f42b6ea0e0..76017eba7a 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -48,15 +48,13 @@ enum trace_type { TRACE_DYNAMIC /*< Dynamic, have an availability file */ }; -class CpuTiTgmr { +class CpuTiTmgr { public: - CpuTiTgmr(trace_type type, double value) - : type_(type), value_(value) - {}; - CpuTiTgmr(tmgr_trace_t speedTrace, double value); - CpuTiTgmr(const CpuTiTgmr&) = delete; - CpuTiTgmr& operator=(const CpuTiTgmr&) = delete; - ~CpuTiTgmr(); + CpuTiTmgr(trace_type type, double value) : type_(type), value_(value){}; + CpuTiTmgr(tmgr_trace_t speedTrace, double value); + CpuTiTmgr(const CpuTiTmgr&) = delete; + CpuTiTmgr& operator=(const CpuTiTmgr&) = delete; + ~CpuTiTmgr(); double integrate(double a, double b); double solve(double a, double amount); @@ -125,7 +123,7 @@ public: void set_modified(bool modified); - CpuTiTgmr* speed_integrated_trace_ = nullptr; /*< Structure with data needed to integrate trace file */ + CpuTiTmgr* speed_integrated_trace_ = nullptr; /*< Structure with data needed to integrate trace file */ ActionTiList action_set_; /*< set with all actions running on cpu */ double sum_priority_ = 0; /*< the sum of actions' priority that are running on cpu */ double last_update_ = 0; /*< last update of actions' remaining amount done */