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
[simix] Pass the code by reference in simcall_run_kernel
[simgrid.git]
/
include
/
simgrid
/
simix.hpp
diff --git
a/include/simgrid/simix.hpp
b/include/simgrid/simix.hpp
index
1f88d97
..
901081a
100644
(file)
--- a/
include/simgrid/simix.hpp
+++ b/
include/simgrid/simix.hpp
@@
-24,6
+24,12
@@
XBT_PUBLIC(void) simcall_run_kernel(std::function<void()> const& code);
+template<class F> inline
+void simcall_run_kernel(F& f)
+{
+ simcall_run_kernel(std::function<void()>(std::ref(f)));
+}
+
namespace simgrid {
namespace simix {