From: Martin Quinson Date: Sat, 9 Jan 2016 23:12:54 +0000 (+0100) Subject: kill 2 useless calls X-Git-Tag: v3_13~1301 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6bc0ed8b82677712adaf34d995bc32c0c45eb31f kill 2 useless calls --- 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;