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
Rename the S4U interface stored in internal objects as piface
[simgrid.git]
/
src
/
surf
/
plugins
/
energy.cpp
diff --git
a/src/surf/plugins/energy.cpp
b/src/surf/plugins/energy.cpp
index
76e254d
..
c333364
100644
(file)
--- a/
src/surf/plugins/energy.cpp
+++ b/
src/surf/plugins/energy.cpp
@@
-5,7
+5,6
@@
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <utility>
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <utility>
-#include <vector>
#include "simgrid/plugins/energy.h"
#include "simgrid/simix.hpp"
#include "simgrid/plugins/energy.h"
#include "simgrid/simix.hpp"
@@
-156,7
+155,7
@@
double HostEnergy::getCurrentWattsValue(double cpu_load)
double HostEnergy::getConsumedEnergy()
{
if (last_updated < surf_get_clock()) // We need to simcall this as it modifies the environment
double HostEnergy::getConsumedEnergy()
{
if (last_updated < surf_get_clock()) // We need to simcall this as it modifies the environment
- simgrid::simix::kernel(std::bind(&HostEnergy::update, this));
+ simgrid::simix::kernel
Immediate
(std::bind(&HostEnergy::update, this));
return total_energy;
}
return total_energy;
}
@@
-220,7
+219,7
@@
static void onActionStateChange(simgrid::surf::CpuAction *action, simgrid::surf:
if (vm) // If it's a VM, take the corresponding PM
host = vm->getPm()->extension<simgrid::surf::HostImpl>();
if (vm) // If it's a VM, take the corresponding PM
host = vm->getPm()->extension<simgrid::surf::HostImpl>();
- HostEnergy *host_energy = host->p
_host
->extension<HostEnergy>();
+ HostEnergy *host_energy = host->p
iface
->extension<HostEnergy>();
if(host_energy->last_updated < surf_get_clock())
host_energy->update();
if(host_energy->last_updated < surf_get_clock())
host_energy->update();