From 54f1b83628996d19f533048e309c020120bc582c Mon Sep 17 00:00:00 2001 From: Christian Heinrich Date: Wed, 7 Feb 2018 14:18:07 +0100 Subject: [PATCH] [DVFS] Cosmetics as proposed by clang-format --- src/surf/plugins/host_dvfs.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/surf/plugins/host_dvfs.cpp b/src/surf/plugins/host_dvfs.cpp index 393c095be5..2f21dcca1a 100644 --- a/src/surf/plugins/host_dvfs.cpp +++ b/src/surf/plugins/host_dvfs.cpp @@ -53,8 +53,8 @@ public: } } - virtual void update() = 0; - virtual std::string getName() =0 ; + virtual void update() = 0; + virtual std::string getName() = 0; double samplingRate() { return sampling_rate; } }; @@ -127,8 +127,7 @@ public: else { XBT_DEBUG("Load: %f > threshold: %f -> but cannot speed up even more, already in highest pstate %d", load, freq_up_threshold, pstate); } - } - else if (load < freq_down_threshold) { + } else if (load < freq_down_threshold) { int max_pstate = host->getPstatesCount() - 1; if (pstate != max_pstate) { // Are we in the slowest pstate already? host->setPstate(pstate + 1); @@ -192,17 +191,13 @@ static void on_host_added(simgrid::s4u::Host& host) simgrid::plugin::dvfs::Governor* governor; if (dvfs_governor == "conservative") { governor = new simgrid::plugin::dvfs::Conservative(daemonProc->getHost()); - } - else if (dvfs_governor == "ondemand") { + } else if (dvfs_governor == "ondemand") { governor = new simgrid::plugin::dvfs::OnDemand(daemonProc->getHost()); - } - else if (dvfs_governor == "performance") { + } else if (dvfs_governor == "performance") { governor = new simgrid::plugin::dvfs::Performance(daemonProc->getHost()); - } - else if (dvfs_governor == "powersave") { + } else if (dvfs_governor == "powersave") { governor = new simgrid::plugin::dvfs::Powersave(daemonProc->getHost()); - } - else { + } else { XBT_CRITICAL("No governor specified for host %s", daemonProc->getHost()->getCname()); } -- 2.20.1