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
tend to the google coding standards in all S4U API
[simgrid.git]
/
src
/
s4u
/
s4u_host.cpp
diff --git
a/src/s4u/s4u_host.cpp
b/src/s4u/s4u_host.cpp
index
b131fe6
..
a1520f9
100644
(file)
--- a/
src/s4u/s4u_host.cpp
+++ b/
src/s4u/s4u_host.cpp
@@
-54,7
+54,7
@@
Host::~Host()
delete pimpl_;
if (pimpl_netpoint != nullptr) // not removed yet by a children class
delete pimpl_;
if (pimpl_netpoint != nullptr) // not removed yet by a children class
- simgrid::s4u::Engine::
i
nstance()->netpointUnregister(pimpl_netpoint);
+ simgrid::s4u::Engine::
getI
nstance()->netpointUnregister(pimpl_netpoint);
delete pimpl_cpu;
delete mounts;
}
delete pimpl_cpu;
delete mounts;
}
@@
-123,7
+123,8
@@
bool Host::isOn() {
return this->pimpl_cpu->isOn();
}
return this->pimpl_cpu->isOn();
}
-int Host::pstatesCount() const {
+int Host::getPstatesCount() const
+{
return this->pimpl_cpu->getNbPStates();
}
return this->pimpl_cpu->getNbPStates();
}
@@
-166,7
+167,7
@@
void Host::routeTo(Host* dest, std::vector<surf::LinkImpl*>* links, double* late
{
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(pimpl_netpoint, dest->pimpl_netpoint, links, latency);
if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) {
{
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(pimpl_netpoint, dest->pimpl_netpoint, links, latency);
if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) {
- XBT_CDEBUG(surf_route, "Route from '%s' to '%s' (latency: %f):",
cname(), dest->c
name(),
+ XBT_CDEBUG(surf_route, "Route from '%s' to '%s' (latency: %f):",
getCname(), dest->getC
name(),
(latency == nullptr ? -1 : *latency));
for (auto link : *links)
XBT_CDEBUG(surf_route, "Link %s", link->cname());
(latency == nullptr ? -1 : *latency));
for (auto link : *links)
XBT_CDEBUG(surf_route, "Link %s", link->cname());
@@
-174,14
+175,15
@@
void Host::routeTo(Host* dest, std::vector<surf::LinkImpl*>* links, double* late
}
/** Get the properties assigned to a host */
}
/** Get the properties assigned to a host */
-xbt_dict_t Host::properties() {
+xbt_dict_t Host::getProperties()
+{
return simgrid::simix::kernelImmediate([this] {
return this->pimpl_->getProperties();
});
}
/** Retrieve the property value (or nullptr if not set) */
return simgrid::simix::kernelImmediate([this] {
return this->pimpl_->getProperties();
});
}
/** Retrieve the property value (or nullptr if not set) */
-const char* Host::
p
roperty(const char* key)
+const char* Host::
getP
roperty(const char* key)
{
return this->pimpl_->getProperty(key);
}
{
return this->pimpl_->getProperty(key);
}
@@
-192,7
+194,7
@@
void Host::setProperty(const char* key, const char* value)
}
/** Get the processes attached to the host */
}
/** Get the processes attached to the host */
-void Host::
p
rocesses(std::vector<ActorPtr>* list)
+void Host::
getP
rocesses(std::vector<ActorPtr>* list)
{
smx_actor_t actor = NULL;
xbt_swag_foreach(actor, this->extension<simgrid::simix::Host>()->process_list) {
{
smx_actor_t actor = NULL;
xbt_swag_foreach(actor, this->extension<simgrid::simix::Host>()->process_list) {
@@
-209,12
+211,14
@@
double Host::getPstateSpeed(int pstate_index)
}
/** @brief Get the peak processor speed (in flops/s), at the current pstate */
}
/** @brief Get the peak processor speed (in flops/s), at the current pstate */
-double Host::speed() {
+double Host::getSpeed()
+{
return pimpl_cpu->getSpeed(1.0);
}
/** @brief Returns the number of core of the processor. */
return pimpl_cpu->getSpeed(1.0);
}
/** @brief Returns the number of core of the processor. */
-int Host::coreCount() {
+int Host::getCoreCount()
+{
return pimpl_cpu->coreCount();
}
return pimpl_cpu->coreCount();
}
@@
-226,7
+230,7
@@
void Host::setPstate(int pstate_index)
});
}
/** @brief Retrieve the pstate at which the host is currently running */
});
}
/** @brief Retrieve the pstate at which the host is currently running */
-int Host::
p
state()
+int Host::
getP
state()
{
return this->pimpl_cpu->getPState();
}
{
return this->pimpl_cpu->getPState();
}
@@
-236,14
+240,14
@@
int Host::pstate()
* \brief Returns the list of storages attached to an host.
* \return a vector containing all storages attached to the host
*/
* \brief Returns the list of storages attached to an host.
* \return a vector containing all storages attached to the host
*/
-void Host::
a
ttachedStorages(std::vector<const char*>* storages)
+void Host::
getA
ttachedStorages(std::vector<const char*>* storages)
{
simgrid::simix::kernelImmediate([this, storages] {
this->pimpl_->getAttachedStorageList(storages);
});
}
{
simgrid::simix::kernelImmediate([this, storages] {
this->pimpl_->getAttachedStorageList(storages);
});
}
-std::unordered_map<std::string, Storage*> const& Host::
m
ountedStorages()
+std::unordered_map<std::string, Storage*> const& Host::
getM
ountedStorages()
{
if (mounts == nullptr) {
mounts = new std::unordered_map<std::string, Storage*>();
{
if (mounts == nullptr) {
mounts = new std::unordered_map<std::string, Storage*>();