Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "kill useless code"
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 3 May 2017 13:17:49 +0000 (15:17 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 3 May 2017 13:18:07 +0000 (15:18 +0200)
This reverts commit 51b60f41f037171a411e084cc07f276a800800f5.

src/smpi/smpi_process.cpp
src/smpi/smpi_process.hpp

index 92cd1d3..194cca9 100644 (file)
@@ -139,6 +139,16 @@ bool Process::replaying(){
     return false;
 }
 
     return false;
 }
 
+void Process::set_user_data(void *data)
+{
+  data_ = data;
+}
+
+void *Process::get_user_data()
+{
+  return data_;
+}
+
 smx_actor_t Process::process(){
   return process_;
 }
 smx_actor_t Process::process(){
   return process_;
 }
index 9cc8a2a..4bf8d0e 100644 (file)
@@ -28,6 +28,7 @@ class Process {
     MPI_Comm comm_self_   = MPI_COMM_NULL;
     MPI_Comm comm_intra_  = MPI_COMM_NULL;
     MPI_Comm* comm_world_ = nullptr;
     MPI_Comm comm_self_   = MPI_COMM_NULL;
     MPI_Comm comm_intra_  = MPI_COMM_NULL;
     MPI_Comm* comm_world_ = nullptr;
+    void* data_           = nullptr; /* user data */
     int index_            = MPI_UNDEFINED;
     char state_;
     int sampling_                   = 0; /* inside an SMPI_SAMPLE_ block? */
     int index_            = MPI_UNDEFINED;
     char state_;
     int sampling_                   = 0; /* inside an SMPI_SAMPLE_ block? */
@@ -51,6 +52,8 @@ class Process {
     void mark_as_initialized();
     void set_replaying(bool value);
     bool replaying();
     void mark_as_initialized();
     void set_replaying(bool value);
     bool replaying();
+    void set_user_data(void *data);
+    void *get_user_data();
     smpi_trace_call_location_t* call_location();
     int index();
     MPI_Comm comm_world();
     smpi_trace_call_location_t* call_location();
     int index();
     MPI_Comm comm_world();