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
more explicit header inclusion guard
[simgrid.git]
/
src
/
surf
/
plugins
/
energy.hpp
diff --git
a/src/surf/plugins/energy.hpp
b/src/surf/plugins/energy.hpp
index
5839da8
..
18af57f
100644
(file)
--- a/
src/surf/plugins/energy.hpp
+++ b/
src/surf/plugins/energy.hpp
@@
-1,33
+1,37
@@
-/* Copyright (c) 2014. The SimGrid Team.
+/* Copyright (c) 2014
-2015
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <xbt/base.h>
+
#include "../cpu_interface.hpp"
#include <map>
#include "../cpu_interface.hpp"
#include <map>
-#ifndef CALLBACK_HPP_
-#define CALLBACK_HPP_
+#ifndef
ENERGY_
CALLBACK_HPP_
+#define
ENERGY_
CALLBACK_HPP_
-class CpuEnergy;
-typedef CpuEnergy *CpuEnergyPtr;
+class XBT_PRIVATE CpuEnergy;
-extern
std::map<CpuPtr, CpuEnergyPtr
> *surf_energy;
+extern
XBT_PRIVATE std::map<Cpu*, CpuEnergy*
> *surf_energy;
class CpuEnergy {
public:
class CpuEnergy {
public:
- CpuEnergy(Cpu
Ptr
ptr);
+ CpuEnergy(Cpu
*
ptr);
~CpuEnergy();
double getCurrentWattsValue(double cpu_load);
double getConsumedEnergy();
~CpuEnergy();
double getCurrentWattsValue(double cpu_load);
double getConsumedEnergy();
- xbt_dynar_t getWattsRangeList();
+ double getWattMinAt(int pstate);
+ double getWattMaxAt(int pstate);
- xbt_dynar_t power_range_watts_list; /*< List of (min_power,max_power) pairs corresponding to each cpu pstate */
+ xbt_dynar_t getWattsRangeList();
+ xbt_dynar_t power_range_watts_list; /*< List of (min_power,max_power) pairs corresponding to each cpu pstate */
+ double watts_off; /*< Consumption when the machine is turned off (shutdown) */
double total_energy; /*< Total energy consumed by the host */
double last_updated; /*< Timestamp of the last energy update event*/
double total_energy; /*< Total energy consumed by the host */
double last_updated; /*< Timestamp of the last energy update event*/
- Cpu
Ptr
cpu;
+ Cpu
*
cpu;
};
};
-#endif /* CALLBACK_HPP_ */
+#endif /*
ENERGY_
CALLBACK_HPP_ */