*/
XBT_PUBLIC(double) surf_host_get_power_peak_at(sg_host_t host, int pstate_index);
-XBT_PUBLIC(void) surf_host_set_pstate(sg_host_t host, int pstate_index);
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);
/** Set the pstate at which the host should run */
void Host::setPstate(int pstate_index)
{
- simgrid::simix::kernel(
- std::bind(SIMIX_host_set_pstate, this, pstate_index));
+ simgrid::simix::kernel(std::bind(
+ &simgrid::surf::Cpu::setPState, p_cpu, pstate_index
+ ));
}
/** Get the amount of watt dissipated at the given pstate when the host is idling */
return surf_host_get_power_peak_at(host, pstate_index);
}
-void SIMIX_host_set_pstate(sg_host_t host, int pstate_index) {
- surf_host_set_pstate(host, pstate_index);
-}
double SIMIX_host_get_wattmin_at(sg_host_t host,int pstate) {
return surf_host_get_wattmin_at(host,pstate);
}
XBT_PRIVATE double SIMIX_host_get_power_peak_at(sg_host_t host, int pstate_index);
XBT_PRIVATE double SIMIX_host_get_wattmin_at(sg_host_t host,int pstate);
XBT_PRIVATE double SIMIX_host_get_wattmax_at(sg_host_t host,int pstate);
-XBT_PRIVATE void SIMIX_host_set_pstate(sg_host_t host, int pstate_index);
XBT_PRIVATE smx_synchro_t SIMIX_process_execute(smx_process_t issuer, const char *name,
double flops_amount, double priority, double bound, unsigned long affinity_mask);
XBT_PRIVATE smx_synchro_t SIMIX_process_parallel_execute(const char *name,
return host->p_cpu->getPowerPeakAt(pstate_index);
}
-void surf_host_set_pstate(sg_host_t host, int pstate_index){
- host->p_cpu->setPState(pstate_index);
-}
-
using simgrid::energy::HostEnergy;
using simgrid::energy::surf_energy;