X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dae0945417b60dd56b2d01d3190873f1c7eee08d..5eb856761d5f073b07eac25c05012cfa8075e1f1:/src/smpi/smpi_datatype.hpp diff --git a/src/smpi/smpi_datatype.hpp b/src/smpi/smpi_datatype.hpp index dc5ea855bd..1cec8fb33d 100644 --- a/src/smpi/smpi_datatype.hpp +++ b/src/smpi/smpi_datatype.hpp @@ -10,6 +10,7 @@ #include #include "private.h" +#include #define DT_FLAG_DESTROYED 0x0001 /**< user destroyed but some other layers still have a reference */ #define DT_FLAG_COMMITED 0x0002 /**< ready to be used for a send/recv operation */ @@ -31,6 +32,12 @@ extern const MPI_Datatype MPI_PTR; +typedef struct s_smpi_mpi_type_key_elem { + MPI_Type_copy_attr_function* copy_fn; + MPI_Type_delete_attr_function* delete_fn; +} s_smpi_mpi_type_key_elem_t; +typedef struct s_smpi_mpi_type_key_elem *smpi_type_key_elem; + //The following are datatypes for the MPI functions MPI_MAXLOC and MPI_MINLOC. typedef struct { float value; @@ -86,6 +93,10 @@ class Datatype : public F2C{ int flags_; xbt_dict_t attributes_; int refcount_; + + static std::unordered_map keyvals_; + static int keyval_id_; + public: static MPI_Datatype null_id_;