Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
new function: Host::exec_async
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 24 Aug 2018 12:13:16 +0000 (14:13 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 24 Aug 2018 12:13:16 +0000 (14:13 +0200)
include/simgrid/s4u/Host.hpp
src/s4u/s4u_Host.cpp

index d46e699..9153fbe 100644 (file)
@@ -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);
 
index e78c4eb..27d5e96 100644 (file)
@@ -284,6 +284,11 @@ std::unordered_map<std::string, Storage*> 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 */);