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
[mc] Remove redundant 'mc_mode' global variable
[simgrid.git]
/
src
/
surf
/
plugins
/
energy.hpp
diff --git
a/src/surf/plugins/energy.hpp
b/src/surf/plugins/energy.hpp
index
04a413c
..
b854921
100644
(file)
--- a/
src/surf/plugins/energy.hpp
+++ b/
src/surf/plugins/energy.hpp
@@
-8,9
+8,10
@@
#include <xbt/base.h>
#include <xbt/base.h>
-#include "src/surf/host_interface.hpp"
#include <map>
#include <map>
+#include "src/surf/HostImpl.hpp"
+
#ifndef ENERGY_CALLBACK_HPP_
#define ENERGY_CALLBACK_HPP_
#ifndef ENERGY_CALLBACK_HPP_
#define ENERGY_CALLBACK_HPP_
@@
-21,10
+22,10
@@
class XBT_PRIVATE HostEnergy;
class HostEnergy {
public:
class HostEnergy {
public:
- static simgrid::xbt::Extension<simgrid::Host, HostEnergy> EXTENSION_ID;
+ static simgrid::xbt::Extension<simgrid::
s4u::
Host, HostEnergy> EXTENSION_ID;
typedef std::pair<double,double> power_range;
typedef std::pair<double,double> power_range;
- HostEnergy(simgrid::Host *ptr);
+ HostEnergy(simgrid::
s4u::
Host *ptr);
~HostEnergy();
double getCurrentWattsValue(double cpu_load);
~HostEnergy();
double getCurrentWattsValue(double cpu_load);
@@
-35,7
+36,7
@@
public:
private:
void initWattsRangeList();
private:
void initWattsRangeList();
- simgrid::Host *host = nullptr;
+ simgrid::
s4u::
Host *host = nullptr;
std::vector<power_range> 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) */
std::vector<power_range> 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) */
@@
-43,12
+44,7
@@
public:
double last_updated; /*< Timestamp of the last energy update event*/
};
double last_updated; /*< Timestamp of the last energy update event*/
};
-XBT_PUBLIC(double) surf_host_get_wattmin_at(sg_host_t resource, int pstate);
-XBT_PUBLIC(double) surf_host_get_wattmax_at(sg_host_t resource, int pstate);
-XBT_PUBLIC(double) surf_host_get_consumed_energy(sg_host_t host);
}
}
}
}
-
-
#endif /* ENERGY_CALLBACK_HPP_ */
#endif /* ENERGY_CALLBACK_HPP_ */