double HostLoad::getCurrentLoad()
{
- return current_flops / (host->speed() * host->coreCount());
+ return current_flops / (host->getSpeed() * host->getCoreCount());
}
double HostLoad::getAverageLoad()
{
- return getComputedFlops() / (host->speed() * host->coreCount() * (surf_get_clock() - last_reset));
+ return getComputedFlops() / (host->getSpeed() * host->getCoreCount() * (surf_get_clock() - last_reset));
}
double HostLoad::getComputedFlops()
/* This callback is called when an action (computation, idle, ...) terminates */
static void onActionStateChange(simgrid::surf::CpuAction* action, simgrid::surf::Action::State previous)
{
- for (simgrid::surf::Cpu* cpu : action->cpus()) {
+ for (simgrid::surf::Cpu* const& cpu : action->cpus()) {
simgrid::s4u::Host* host = cpu->getHost();
if (host != nullptr) {
}
/* **************************** Public interface *************************** */
-SG_BEGIN_DECL()
+extern "C" {
/** \ingroup plugin_load
* \brief Initializes the HostLoad plugin
host->extension<HostLoad>()->reset();
}
-
-SG_END_DECL()
+}