From: Christian Heinrich Date: Tue, 13 Feb 2018 16:29:51 +0000 (+0100) Subject: [DVFS] Added 'override' specifier X-Git-Tag: v3.19~207 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f3164f15be19f415e96f061c00123abdc7ee5176 [DVFS] Added 'override' specifier --- diff --git a/src/surf/plugins/host_dvfs.cpp b/src/surf/plugins/host_dvfs.cpp index 2f21dcca1a..7f20af00ae 100644 --- a/src/surf/plugins/host_dvfs.cpp +++ b/src/surf/plugins/host_dvfs.cpp @@ -62,16 +62,16 @@ class Performance : public Governor { public: explicit Performance(simgrid::s4u::Host* ptr) : Governor(ptr) {} - void update() { host->setPstate(0); } - std::string getName() { return "Performance"; } + void update() override { host->setPstate(0); } + std::string getName() override { return "Performance"; } }; class Powersave : public Governor { public: explicit Powersave(simgrid::s4u::Host* ptr) : Governor(ptr) {} - void update() { host->setPstate(host->getPstatesCount() - 1); } - std::string getName() { return "Powersave"; } + void update() override { host->setPstate(host->getPstatesCount() - 1); } + std::string getName() override { return "Powersave"; } }; class OnDemand : public Governor { @@ -80,8 +80,8 @@ class OnDemand : public Governor { public: explicit OnDemand(simgrid::s4u::Host* ptr) : Governor(ptr) {} - std::string getName() { return "OnDemand"; } - void update() + std::string getName() override { return "OnDemand"; } + void update() override { double load = sg_host_get_current_load(host); @@ -113,8 +113,8 @@ class Conservative : public Governor { public: explicit Conservative(simgrid::s4u::Host* ptr) : Governor(ptr) {} - virtual std::string getName() { return "Conservative"; } - virtual void update() + virtual std::string getName() override { return "Conservative"; } + virtual void update() override { double load = sg_host_get_current_load(host)*host->getCoreCount(); int pstate = host->getPstate();