Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanings in k:r:Cpu
[simgrid.git] / src / s4u / s4u_Host.cpp
index 1fbbf94..3ac5c47 100644 (file)
@@ -133,7 +133,7 @@ bool Host::is_on()
 
 int Host::getPstatesCount() const
 {
-  return this->pimpl_cpu->getNbPStates();
+  return this->pimpl_cpu->get_pstates_count();
 }
 
 /**
@@ -223,34 +223,41 @@ void Host::set_property(std::string key, std::string value)
 /** @brief Get the peak processor speed (in flops/s), at the specified pstate  */
 double Host::getPstateSpeed(int pstate_index)
 {
-  return simgrid::simix::simcall([this, pstate_index] { return this->pimpl_cpu->getPstateSpeed(pstate_index); });
+  return simgrid::simix::simcall([this, pstate_index] { return this->pimpl_cpu->get_pstate_peak_speed(pstate_index); });
 }
 
-/** @brief Get the peak processor speed (under full load (=1.0), in flops/s), at the current pstate */
+/** @brief Get the peak processor speed in flops/s, (under full load (=1.0), at the current pstate)
+ *
+ *  The result also takes the external load into account.
+ */
 double Host::getSpeed()
 {
-  return pimpl_cpu->getSpeed(1.0);
+  return this->pimpl_cpu->get_speed(1.0);
 }
+/** @brief Get the available speed ratio, between 0 and 1.
+ *
+ * This accounts for external load (see @ref set_speed_trace()).
+ */
 double Host::get_available_speed()
 {
-  return pimpl_cpu->get_available_speed();
+  return this->pimpl_cpu->get_speed_ratio();
 }
 
 /** @brief Returns the number of core of the processor. */
 int Host::getCoreCount()
 {
-  return pimpl_cpu->coreCount();
+  return this->pimpl_cpu->get_cores_count();
 }
 
 /** @brief Set the pstate at which the host should run */
 void Host::setPstate(int pstate_index)
 {
-  simgrid::simix::simcall([this, pstate_index] { this->pimpl_cpu->setPState(pstate_index); });
+  simgrid::simix::simcall([this, pstate_index] { this->pimpl_cpu->set_pstate(pstate_index); });
 }
 /** @brief Retrieve the pstate at which the host is currently running */
 int Host::getPstate()
 {
-  return this->pimpl_cpu->getPState();
+  return this->pimpl_cpu->get_pstate();
 }
 
 /**