Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill trailing whitespaces in source code files.
[simgrid.git] / src / smpi / include / smpi_datatype.hpp
index 8b7f947..cacdfbe 100644 (file)
@@ -90,10 +90,11 @@ class Datatype_contents {
   std::vector<int> integers_;
   std::vector<MPI_Aint> addresses_;
   std::vector<MPI_Datatype> datatypes_;
-  Datatype_contents(int combiner, 
-                    int number_of_integers, const int* integers, 
-                    int number_of_addresses, const MPI_Aint* addresses, 
-                    int number_of_datatypes, const MPI_Datatype* datatypes);
+  Datatype_contents(int combiner, int number_of_integers, const int* integers, int number_of_addresses,
+                    const MPI_Aint* addresses, int number_of_datatypes, const MPI_Datatype* datatypes);
+  Datatype_contents(const Datatype_contents&) = delete;
+  Datatype_contents& operator=(const Datatype_contents&) = delete;
+  ~Datatype_contents();
 };
 
 class Datatype : public F2C, public Keyval{
@@ -109,6 +110,7 @@ class Datatype : public F2C, public Keyval{
   int flags_;
   int refcount_ = 1;
   std::unique_ptr<Datatype_contents> contents_ = nullptr;
+  MPI_Datatype duplicated_datatype_ = MPI_DATATYPE_NULL;
 
 protected:
   template <typename... Args> void set_contents(Args&&... args)
@@ -133,6 +135,7 @@ public:
   MPI_Aint ub() const { return ub_; }
   int flags() const { return flags_; }
   int refcount() const { return refcount_; }
+  MPI_Datatype duplicated_datatype() const { return duplicated_datatype_; }
 
   void ref();
   static void unref(MPI_Datatype datatype);
@@ -142,7 +145,6 @@ public:
   bool is_basic() const;
   static const char* encode(const Datatype* dt) { return dt->id.c_str(); }
   static MPI_Datatype decode(const std::string& datatype_id);
-  bool is_replayable() const;
   void addflag(int flag);
   int extent(MPI_Aint* lb, MPI_Aint* extent) const;
   MPI_Aint get_extent() const { return ub_ - lb_; };