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
cosmetics in cpu_ti
[simgrid.git]
/
src
/
simgrid
/
host.cpp
diff --git
a/src/simgrid/host.cpp
b/src/simgrid/host.cpp
index 9e24002bf7bfb7de5d8652e6c8285d908be3ca8c..32f2e5d1cf8c9d2aa98c2eff171d88e51cac402e 100644
(file)
--- a/
src/simgrid/host.cpp
+++ b/
src/simgrid/host.cpp
@@
-19,8
+19,6
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sg_host, sd, "Logging specific to sg_hosts");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sg_host, sd, "Logging specific to sg_hosts");
-extern "C" {
-
size_t sg_host_count()
{
return simgrid::s4u::Engine::getInstance()->getHostCount();
size_t sg_host_count()
{
return simgrid::s4u::Engine::getInstance()->getHostCount();
@@
-153,7
+151,7
@@
int sg_host_core_count(sg_host_t host)
double sg_host_get_available_speed(sg_host_t host)
{
double sg_host_get_available_speed(sg_host_t host)
{
- return host->pimpl_cpu->get
AvailableS
peed();
+ return host->pimpl_cpu->get
_available_s
peed();
}
/** @brief Returns the number of power states for a host.
}
/** @brief Returns the number of power states for a host.
@@
-333,4
+331,8
@@
void sg_host_get_actor_list(sg_host_t host, xbt_dynar_t whereto)
}
}
}
}
-} // extern "C"
+sg_host_t sg_host_self()
+{
+ smx_actor_t process = SIMIX_process_self();
+ return (process == nullptr) ? nullptr : process->host;
+}