X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d73f6e9c920e1a054f94c3117281fded81c6cc5b..d7c957a488bb2ebd0ef5ea7a3323f1ccea620f30:/src/surf/cpu_ti.cpp diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index 89cc142f4a..564bbfb782 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -26,8 +26,8 @@ namespace resource { CpuTiProfile::CpuTiProfile(const profile::Profile* profile) { - double integral = 0; - double time = 0; + double integral = 0; + double time = 0; unsigned nb_points = profile->event_list.size() + 1; time_points_.reserve(nb_points); integral_.reserve(nb_points); @@ -55,7 +55,8 @@ double CpuTiTmgr::integrate(double a, double b) const { if ((a < 0.0) || (a > b)) { xbt_die("Error, invalid integration interval [%.2f,%.2f]. " - "You probably have a task executing with negative computation amount. Check your code.", a, b); + "You probably have a task executing with negative computation amount. Check your code.", + a, b); } if (fabs(a - b) < EPSILON) return 0.0; @@ -71,7 +72,7 @@ double CpuTiTmgr::integrate(double a, double b) const a_index = ceil(a / last_time_); double b_index = floor(b / last_time_); - if (a_index > b_index) { /* Same chunk */ + if (a_index > b_index) { /* Same chunk */ return profile_->integrate_simple(a - (a_index - 1) * last_time_, b - b_index * last_time_); } @@ -102,7 +103,7 @@ double CpuTiProfile::integrate_simple(double a, double b) const double CpuTiProfile::integrate_simple_point(double a) const { double integral = 0; - double a_aux = a; + double a_aux = a; int ind = binary_search(time_points_, a); integral += integral_[ind]; @@ -138,8 +139,9 @@ double CpuTiTmgr::solve(double a, double amount) const /* Sanity checks */ if ((a < 0.0) || (amount < 0.0)) { - XBT_CRITICAL ("Error, invalid parameters [a = %.2f, amount = %.2f]. " - "You probably have a task executing with negative computation amount. Check your code.", a, amount); + XBT_CRITICAL("Error, invalid parameters [a = %.2f, amount = %.2f]. " + "You probably have a task executing with negative computation amount. Check your code.", + a, amount); xbt_abort(); } @@ -202,7 +204,7 @@ double CpuTiProfile::solve_simple(double a, double amount) const */ double CpuTiTmgr::get_power_scale(double a) const { - double reduced_a = a - floor(a / last_time_) * last_time_; + double reduced_a = a - floor(a / last_time_) * last_time_; int point = CpuTiProfile::binary_search(profile_->time_points_, reduced_a); kernel::profile::DatedValue val = speed_profile_->event_list.at(point); return val.value_;