A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unify the naming of that property
[simgrid.git]
/
src
/
surf
/
plugins
/
energy.hpp
diff --git
a/src/surf/plugins/energy.hpp
b/src/surf/plugins/energy.hpp
index
b854921
..
26fa299
100644
(file)
--- a/
src/surf/plugins/energy.hpp
+++ b/
src/surf/plugins/energy.hpp
@@
-8,7
+8,7
@@
#include <xbt/base.h>
#include <xbt/base.h>
-#include <
map
>
+#include <
utility
>
#include "src/surf/HostImpl.hpp"
#include "src/surf/HostImpl.hpp"
@@
-20,12
+20,21
@@
namespace energy {
class XBT_PRIVATE HostEnergy;
class XBT_PRIVATE HostEnergy;
+class PowerRange {
+ public:
+ double idle;
+ double min;
+ double max;
+
+ PowerRange(double idle, double min, double max) : idle(idle), min(min), max(max) {
+ }
+};
+
class HostEnergy {
public:
static simgrid::xbt::Extension<simgrid::s4u::Host, HostEnergy> EXTENSION_ID;
class HostEnergy {
public:
static simgrid::xbt::Extension<simgrid::s4u::Host, HostEnergy> EXTENSION_ID;
- typedef std::pair<double,double> power_range;
- HostEnergy(simgrid::s4u::Host *ptr);
+
explicit
HostEnergy(simgrid::s4u::Host *ptr);
~HostEnergy();
double getCurrentWattsValue(double cpu_load);
~HostEnergy();
double getCurrentWattsValue(double cpu_load);
@@
-37,7
+46,7
@@
public:
private:
void initWattsRangeList();
simgrid::s4u::Host *host = nullptr;
private:
void initWattsRangeList();
simgrid::s4u::Host *host = nullptr;
- std::vector<
power_r
ange> power_range_watts_list; /*< List of (min_power,max_power) pairs corresponding to each cpu pstate */
+ std::vector<
PowerR
ange> power_range_watts_list; /*< List of (min_power,max_power) pairs corresponding to each cpu pstate */
public:
double watts_off = 0.0; /*< Consumption when the machine is turned off (shutdown) */
double total_energy = 0.0; /*< Total energy consumed by the host */
public:
double watts_off = 0.0; /*< Consumption when the machine is turned off (shutdown) */
double total_energy = 0.0; /*< Total energy consumed by the host */