A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kill two more useless calls
[simgrid.git]
/
src
/
simgrid
/
host.cpp
diff --git
a/src/simgrid/host.cpp
b/src/simgrid/host.cpp
index
af13e1a
..
b3f5bd6
100644
(file)
--- 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) {
* 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.
}
/** @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) {
* 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 {
}
namespace simgrid {
@@
-177,13
+177,13
@@
Host::~Host()
}
/** Start the host if it is off */
}
/** Start the host if it is off */
-void Host::
o
n()
+void Host::
turnO
n()
{
simgrid::simix::kernel(std::bind(SIMIX_host_on, this));
}
/** Stop the host if it is on */
{
simgrid::simix::kernel(std::bind(SIMIX_host_on, this));
}
/** Stop the host if it is on */
-void Host::
o
ff()
+void Host::
turnO
ff()
{
/* Go to that function to follow the code flow through the simcall barrier */
if (0) simcall_HANDLER_host_off(&SIMIX_process_self()->simcall, this);
{
/* Go to that function to follow the code flow through the simcall barrier */
if (0) simcall_HANDLER_host_off(&SIMIX_process_self()->simcall, this);
@@
-251,22
+251,25
@@
Host* Host::by_name_or_create(const char* name)
/** Set the pstate at which the host should run */
void Host::setPstate(int pstate_index)
{
/** 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 */
double Host::getWattMinAt(int pstate)
{
}
/** Get the amount of watt dissipated at the given pstate when the host is idling */
double Host::getWattMinAt(int pstate)
{
- return simgrid::simix::kernel(
- std::bind(SIMIX_host_get_wattmin_at, this, pstate));
+ return simgrid::simix::kernel(std::bind(
+ surf_host_get_wattmin_at, this, pstate
+ ));
}
/** Get the amount of watt dissipated at the given pstate when the host burns CPU at 100% */
double Host::getWattMaxAt(int pstate)
{
}
/** Get the amount of watt dissipated at the given pstate when the host burns CPU at 100% */
double Host::getWattMaxAt(int pstate)
{
- return simgrid::simix::kernel(
- std::bind(SIMIX_host_get_wattmax_at, this, pstate));
+ return simgrid::simix::kernel(std::bind(
+ surf_host_get_wattmax_at, this, pstate
+ ));
}
void Host::getParams(vm_params_t params)
}
void Host::getParams(vm_params_t params)