bool isOff() { return !isOn(); }
double speed();
- int coresCount();
+ int coreCount();
xbt_dict_t properties();
const char*property(const char*key);
void setProperty(const char*key, const char *value);
* \return the number of cores
*/
int MSG_host_get_core_number(msg_host_t host) {
- return host->coresCount();
+ return host->coreCount();
}
/** \ingroup m_host_management
return pimpl_cpu->getSpeed(1.0);
}
/** @brief Returns the number of core of the processor. */
-int Host::coresCount() {
- return pimpl_cpu->getCoreCount();
+int Host::coreCount() {
+ return pimpl_cpu->coreCount();
}
/** @brief Set the pstate at which the host should run */
TRACE_surf_host_set_speed(surf_get_clock(), getName(), coresAmount_ * speed_.scale * speed_.peak);
}
-int Cpu::getCoreCount()
+int Cpu::coreCount()
{
return coresAmount_;
}
virtual simgrid::surf::Action *sleep(double duration)=0;
/** @brief Get the amount of cores */
- virtual int getCoreCount();
+ virtual int coreCount();
/** @brief Get the speed, accounting for the trace load and provided process load instead of the real current one */
virtual double getSpeed(double load);
cpu_load = lmm_constraint_get_usage(surf_host->cpu_->getConstraint()) / surf_host->cpu_->getPstateSpeedCurrent();
/** Divide by the number of cores here **/
- cpu_load /= surf_host->cpu_->getCoreCount();
+ cpu_load /= surf_host->cpu_->coreCount();
if (cpu_load > 1) // A machine with a load > 1 consumes as much as a fully loaded machine, not more
cpu_load = 1;
for (i = 0; i < totalHosts; i++) {
std::printf(" <host id=\"%s\" speed=\"%.0f\"", sg_host_get_name(hosts[i]), sg_host_speed(hosts[i]));
props = sg_host_get_properties(hosts[i]);
- if (hosts[i]->coresCount()>1) {
- std::printf(" core=\"%d\"", hosts[i]->coresCount());
+ if (hosts[i]->coreCount()>1) {
+ std::printf(" core=\"%d\"", hosts[i]->coreCount());
}
if (props && !xbt_dict_is_empty(props)) {
std::printf(">\n");