Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Host::get_englobing_zone() returns the englobing netzone
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 24 Jul 2019 13:18:44 +0000 (15:18 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 24 Jul 2019 13:39:13 +0000 (15:39 +0200)
ChangeLog
include/simgrid/s4u/Host.hpp
src/s4u/s4u_Host.cpp

index 974a18c..c4e8643 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ SimGrid (3.23.3) NOT RELEASED YET (v3.24 expected September 23. 7:50 UTC)
 S4U:
  - Barrier::wait returns SG_BARRIER_SERIAL_THREAD for (only) one actor
    for consistency with pthread_barrier_wait()
 S4U:
  - Barrier::wait returns SG_BARRIER_SERIAL_THREAD for (only) one actor
    for consistency with pthread_barrier_wait()
+ - Host::get_englobing_zone() returns the englobing netzone
 
 MSG:
  - convert a new set of functions to the S4U C interface and move the old MSG
 
 MSG:
  - convert a new set of functions to the S4U C interface and move the old MSG
index 68c5c63..7702d6b 100644 (file)
@@ -127,6 +127,7 @@ public:
   void route_to(Host* dest, std::vector<kernel::resource::LinkImpl*>& links, double* latency);
   void send_to(Host* dest, double byte_amount);
 
   void route_to(Host* dest, std::vector<kernel::resource::LinkImpl*>& links, double* latency);
   void send_to(Host* dest, double byte_amount);
 
+  NetZone* get_englobing_zone();
   /** Block the calling actor on an execution located on the called host
    *
    * It is not a problem if the actor is not located on the called host.
   /** Block the calling actor on an execution located on the called host
    *
    * It is not a problem if the actor is not located on the called host.
index b8acf61..db85aa3 100644 (file)
@@ -171,6 +171,12 @@ void Host::route_to(Host* dest, std::vector<kernel::resource::LinkImpl*>& links,
   }
 }
 
   }
 }
 
+/** @brief Returns the networking zone englobing that host */
+NetZone* Host::get_englobing_zone()
+{
+  return pimpl_netpoint->get_englobing_zone()->get_iface();
+}
+
 void Host::send_to(Host* dest, double byte_amount)
 {
   std::vector<Host*> m_host_list   = {this, dest};
 void Host::send_to(Host* dest, double byte_amount)
 {
   std::vector<Host*> m_host_list   = {this, dest};