*/
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);
* 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.
* 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 {
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;