From: Martin Quinson Date: Fri, 24 Aug 2018 12:13:16 +0000 (+0200) Subject: new function: Host::exec_async X-Git-Tag: v3_21~195 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/66c9e04ef6dbd72bb5dbc76dfaeb7ed02d6a8c57?hp=819ed104855d02c4ec273ab67be8c5347bc19244 new function: Host::exec_async --- diff --git a/include/simgrid/s4u/Host.hpp b/include/simgrid/s4u/Host.hpp index d46e69912c..9153fbe01f 100644 --- a/include/simgrid/s4u/Host.hpp +++ b/include/simgrid/s4u/Host.hpp @@ -153,6 +153,9 @@ public: * The actor will not be migrated in this case. Such remote execution are easy in simulation. */ void execute(double flops); + /** Start an asynchronous computation on that host (possibly remote) */ + ExecPtr exec_async(double flops_amounts); + /** Block the calling actor on an execution located on the called host (with explicit priority) */ void execute(double flops, double priority); diff --git a/src/s4u/s4u_Host.cpp b/src/s4u/s4u_Host.cpp index e78c4eb956..27d5e96402 100644 --- a/src/s4u/s4u_Host.cpp +++ b/src/s4u/s4u_Host.cpp @@ -284,6 +284,11 @@ std::unordered_map const& Host::get_mounted_storages() return *mounts_; } +ExecPtr Host::exec_async(double flops) +{ + return this_actor::exec_init(flops)->set_host(this); +} + void Host::execute(double flops) { execute(flops, 1.0 /* priority */);