From 4dac6adc7601ff45e1bb458032c95fab5c73721d Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 24 Jul 2019 15:18:44 +0200 Subject: [PATCH] Host::get_englobing_zone() returns the englobing netzone --- ChangeLog | 1 + include/simgrid/s4u/Host.hpp | 1 + src/s4u/s4u_Host.cpp | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 974a18cb44..c4e8643124 100644 --- 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() + - 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 diff --git a/include/simgrid/s4u/Host.hpp b/include/simgrid/s4u/Host.hpp index 68c5c63205..7702d6bfb6 100644 --- a/include/simgrid/s4u/Host.hpp +++ b/include/simgrid/s4u/Host.hpp @@ -127,6 +127,7 @@ public: void route_to(Host* dest, std::vector& 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. diff --git a/src/s4u/s4u_Host.cpp b/src/s4u/s4u_Host.cpp index b8acf614ca..db85aa3ec9 100644 --- a/src/s4u/s4u_Host.cpp +++ b/src/s4u/s4u_Host.cpp @@ -171,6 +171,12 @@ void Host::route_to(Host* dest, std::vector& 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 m_host_list = {this, dest}; -- 2.20.1