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
python: First working example
[simgrid.git]
/
src
/
s4u
/
s4u_Host.cpp
diff --git
a/src/s4u/s4u_Host.cpp
b/src/s4u/s4u_Host.cpp
index
27d5e96
..
b44b000
100644
(file)
--- a/
src/s4u/s4u_Host.cpp
+++ b/
src/s4u/s4u_Host.cpp
@@
-223,7
+223,9
@@
double Host::get_speed() const
return this->pimpl_cpu->get_speed(1.0);
}
/** @brief Returns the current computation load (in flops per second)
return this->pimpl_cpu->get_speed(1.0);
}
/** @brief Returns the current computation load (in flops per second)
+ *
* The external load (coming from an availability trace) is not taken in account.
* The external load (coming from an availability trace) is not taken in account.
+ * You may also be interested in the load plugin.
*/
double Host::get_load() const
{
*/
double Host::get_load() const
{
@@
-626,3
+628,8
@@
sg_host_t sg_host_self()
smx_actor_t process = SIMIX_process_self();
return (process == nullptr) ? nullptr : process->host_;
}
smx_actor_t process = SIMIX_process_self();
return (process == nullptr) ? nullptr : process->host_;
}
+
+double sg_host_load(sg_host_t host)
+{
+ return host->get_load();
+}