From 6bc0ed8b82677712adaf34d995bc32c0c45eb31f Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 10 Jan 2016 00:12:54 +0100 Subject: [PATCH 1/1] kill 2 useless calls --- src/include/surf/surf.h | 10 ---------- src/simgrid/host.cpp | 4 ++-- src/surf/surf_c_bindings.cpp | 7 ------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index b7d707e7e5..25e8a47400 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -450,17 +450,7 @@ XBT_PUBLIC(double) surf_host_get_current_power_peak(sg_host_t host); */ XBT_PUBLIC(double) surf_host_get_power_peak_at(sg_host_t host, int pstate_index); -/** - * @brief [brief description] - * @details [long description] - * - * @param host [description] - * @return [description] - */ -XBT_PUBLIC(int) surf_host_get_nb_pstates(sg_host_t host); - XBT_PUBLIC(void) surf_host_set_pstate(sg_host_t host, int pstate_index); -XBT_PUBLIC(int) surf_host_get_pstate(sg_host_t host); 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); diff --git a/src/simgrid/host.cpp b/src/simgrid/host.cpp index 38d3e172be..c5c482375d 100644 --- a/src/simgrid/host.cpp +++ b/src/simgrid/host.cpp @@ -154,7 +154,7 @@ double sg_host_get_consumed_energy(sg_host_t host) { * See also @ref SURF_plugin_energy. */ int sg_host_get_nb_pstates(sg_host_t host) { - return surf_host_get_nb_pstates(host); + return host->p_cpu->getNbPStates(); } /** @brief Gets the pstate at which that host currently runs. @@ -162,7 +162,7 @@ int sg_host_get_nb_pstates(sg_host_t host) { * See also @ref SURF_plugin_energy. */ int sg_host_get_pstate(sg_host_t host) { - return surf_host_get_pstate(host); + return host->p_cpu->getPState(); } namespace simgrid { diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index 75f095fb6e..a683814a84 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -267,16 +267,9 @@ double surf_host_get_power_peak_at(sg_host_t host, int pstate_index){ return host->p_cpu->getPowerPeakAt(pstate_index); } -int surf_host_get_nb_pstates(sg_host_t host){ - return host->p_cpu->getNbPStates(); -} - void surf_host_set_pstate(sg_host_t host, int pstate_index){ host->p_cpu->setPState(pstate_index); } -int surf_host_get_pstate(sg_host_t host){ - return host->p_cpu->getPState(); -} using simgrid::energy::HostEnergy; using simgrid::energy::surf_energy; -- 2.20.1