* @param resource The surf host
* @return [description]
*/
-XBT_PUBLIC(double) surf_host_get_available_speed(surf_resource_t resource);
+XBT_PUBLIC(double) surf_host_get_available_speed(surf_resource_t host);
/** @brief Get the number of cores of the cpu associated to a host */
-XBT_PUBLIC(int) surf_host_get_core(surf_resource_t resource);
+XBT_PUBLIC(int) surf_host_get_core(surf_resource_t host);
/** @brief Create a computation action on the given host */
-XBT_PUBLIC(surf_action_t) surf_host_execute(surf_resource_t resource, double size);
+XBT_PUBLIC(surf_action_t) surf_host_execute(surf_resource_t host, double size);
/** @brief Create a sleep action on the given host */
-XBT_PUBLIC(surf_action_t) surf_host_sleep(surf_resource_t resource, double duration);
+XBT_PUBLIC(surf_action_t) surf_host_sleep(surf_resource_t host, double duration);
/** @brief Create a file opening action on the given host */
XBT_PUBLIC(surf_action_t) surf_host_open(surf_resource_t host, const char* fullpath);
p_cpu->setState(state);
}
-int Host::getCore(){
- return p_cpu->getCore();
-}
-
-double Host::getSpeed(double load){
- return p_cpu->getSpeed(load);
-}
-
-double Host::getAvailableSpeed(){
- return p_cpu->getAvailableSpeed();
-}
-
-double Host::getCurrentPowerPeak()
-{
- return p_cpu->getCurrentPowerPeak();
-}
-
-double Host::getPowerPeakAt(int pstate_index)
-{
- return p_cpu->getPowerPeakAt(pstate_index);
-}
-
-int Host::getNbPstates()
-{
- return p_cpu->getNbPstates();
-}
-
-void Host::setPstate(int pstate_index)
-{
- p_cpu->setPstate(pstate_index);
-}
-int Host::getPstate()
-{
- return p_cpu->getPstate();
-}
-
xbt_dict_t Host::getProperties()
{
return p_cpu->getProperties();
*/
virtual Action *sleep(double duration)=0;
- /**
- * @brief Get the number of cores of the associated Cpu
- *
- * @return The number of cores of the associated Cpu
- * @see Cpu
- */
- virtual int getCore();
-
- /**
- * @brief Get the speed of the associated Cpu
- *
- * @param load [TODO]
- * @return The speed of the associated Cpu
- * @see Cpu
- */
- virtual double getSpeed(double load);
-
- /**
- * @brief Get the available speed of the associated Cpu
- * @details [TODO]
- *
- * @return The available speed of the associated Cpu
- * @see Cpu
- */
- virtual double getAvailableSpeed();
-
- /** @brief Get the associated Cpu power peak */
- virtual double getCurrentPowerPeak();
-
- virtual double getPowerPeakAt(int pstate_index);
- virtual int getNbPstates();
- virtual void setPstate(int pstate_index);
- virtual int getPstate();
-
/** @brief Return the storage of corresponding mount point */
virtual Storage *findStorageOnMountList(const char* storage);
resource->setState(state);
}
-surf_action_t surf_host_sleep(surf_resource_t resource, double duration){
- return get_casted_host(resource)->sleep(duration);
+surf_action_t surf_host_sleep(surf_resource_t host, double duration){
+ return get_casted_host(host)->sleep(duration);
}
-double surf_host_get_speed(surf_resource_t resource, double load){
- return get_casted_host(resource)->getSpeed(load);
+double surf_host_get_speed(surf_resource_t host, double load){
+ return sg_host_surfcpu(host)->getSpeed(load);
}
-double surf_host_get_available_speed(surf_resource_t resource){
- return get_casted_host(resource)->getAvailableSpeed();
+double surf_host_get_available_speed(surf_resource_t host){
+ return sg_host_surfcpu(host)->getAvailableSpeed();
}
-int surf_host_get_core(surf_resource_t resource){
- return get_casted_host(resource)->getCore();
+int surf_host_get_core(surf_resource_t host){
+ return sg_host_surfcpu(host)->getCore();
}
-surf_action_t surf_host_execute(surf_resource_t resource, double size){
- return get_casted_host(resource)->execute(size);
+surf_action_t surf_host_execute(surf_resource_t host, double size){
+ return get_casted_host(host)->execute(size);
}
-double surf_host_get_current_power_peak(surf_resource_t resource){
- return get_casted_host(resource)->getCurrentPowerPeak();
+double surf_host_get_current_power_peak(surf_resource_t host){
+ return sg_host_surfcpu(host)->getCurrentPowerPeak();
}
-double surf_host_get_power_peak_at(surf_resource_t resource, int pstate_index){
- return get_casted_host(resource)->getPowerPeakAt(pstate_index);
+double surf_host_get_power_peak_at(surf_resource_t host, int pstate_index){
+ return sg_host_surfcpu(host)->getPowerPeakAt(pstate_index);
}
-int surf_host_get_nb_pstates(surf_resource_t resource){
- return get_casted_host(resource)->getNbPstates();
+int surf_host_get_nb_pstates(surf_resource_t host){
+ return sg_host_surfcpu(host)->getNbPstates();
}
-void surf_host_set_pstate(surf_resource_t resource, int pstate_index){
- get_casted_host(resource)->setPstate(pstate_index);
+void surf_host_set_pstate(surf_resource_t host, int pstate_index){
+ sg_host_surfcpu(host)->setPstate(pstate_index);
}
-int surf_host_get_pstate(surf_resource_t resource){
- return get_casted_host(resource)->getPstate();
+int surf_host_get_pstate(surf_resource_t host){
+ return sg_host_surfcpu(host)->getPstate();
}
double surf_host_get_wattmin_at(surf_resource_t resource, int pstate){
xbt_assert(surf_energy!=NULL, "The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");