Host* host = by_name_or_null(name);
if (host == nullptr) {
host = new Host(name);
- xbt_dict_set(host_list, name, host, NULL);
+ xbt_dict_set(host_list, name, host, nullptr);
}
return host;
}
Host *Host::current(){
smx_process_t smx_proc = SIMIX_process_self();
- if (smx_proc == NULL)
+ if (smx_proc == nullptr)
xbt_die("Cannot call Host::current() from the maestro context");
return SIMIX_process_get_host(smx_proc);
}
}
boost::unordered_map<std::string, Storage*> const& Host::mountedStorages() {
- if (mounts == NULL) {
+ if (mounts == nullptr) {
mounts = new boost::unordered_map<std::string, Storage*> ();
xbt_dict_t dict = this->mountedStoragesAsDict();
});
}
-/** Retrieve the property value (or NULL if not set) */
+/** Retrieve the property value (or nullptr if not set) */
const char*Host::property(const char*key) {
simgrid::surf::HostImpl* surf_host = this->extension<simgrid::surf::HostImpl>();
return surf_host->getProperty(key);
}
/** Get the peak power of a host */
-double Host::currentPowerPeak()
+double Host::getPstateSpeedCurrent()
{
return simgrid::simix::kernel([&] {
- return this->pimpl_cpu->getCurrentPowerPeak();
+ return this->pimpl_cpu->getPstateSpeedCurrent();
});
}
/** Get one power peak (in flops/s) of a host at a given pstate */
-double Host::powerPeakAt(int pstate_index)
+double Host::getPstateSpeed(int pstate_index)
{
return simgrid::simix::kernel([&] {
- return this->pimpl_cpu->getPowerPeakAt(pstate_index);
+ return this->pimpl_cpu->getPstateSpeed(pstate_index);
});
}
return pimpl_cpu->getSpeed(1.0);
}
/** @brief Returns the number of core of the processor. */
-int Host::core_count() {
+int Host::coresCount() {
return pimpl_cpu->getCore();
}