Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New: s4u::Comm::get_dst_data()
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 10 Jan 2021 15:05:45 +0000 (16:05 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 10 Jan 2021 15:05:45 +0000 (16:05 +0100)
ChangeLog
include/simgrid/s4u/Comm.hpp
src/s4u/s4u_Comm.cpp

index 9897130..933eb36 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,7 @@ S4U:
   type of the pointee. Untyped functions are deprecated. Use Mailbox::get<void>()
   or Mailbox::get_async<void>() if you really want to play with void*.
 - Unify the interface of Activity::on_{start/activity}
+- New function: Comm::get_dst_data()
 
 ----------------------------------------------------------------------------
 
index 2c6be0f..20f031f 100644 (file)
@@ -107,6 +107,8 @@ public:
    *
    * That's a buffer where the sent data will be copied  */
   CommPtr set_dst_data(void** buff, size_t size);
+  /** Retrieve where the data will be copied on the receiver side */
+  void* get_dst_data();
 
   /** Retrieve the mailbox on which this comm acts */
   Mailbox* get_mailbox() const;
index 55a79e5..a7ab9e3 100644 (file)
@@ -95,10 +95,13 @@ CommPtr Comm::set_dst_data(void** buff)
   dst_buff_ = buff;
   return this;
 }
+void* Comm::get_dst_data()
+{
+  return dst_buff_;
+}
 
 size_t Comm::get_dst_data_size() const
 {
-  xbt_assert(state_ == State::FINISHED, "You cannot use %s before your communication terminated", __FUNCTION__);
   return dst_buff_size_;
 }
 CommPtr Comm::set_dst_data(void** buff, size_t size)