X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/406f54970c00ca178fa918763d943027bd09e3ba..f7bfc7f9646c3f1c3b350a78b2fae5a35ea939f7:/src/smpi/smpi_mpi_dt_private.h diff --git a/src/smpi/smpi_mpi_dt_private.h b/src/smpi/smpi_mpi_dt_private.h index 608beffc69..23af198871 100644 --- a/src/smpi/smpi_mpi_dt_private.h +++ b/src/smpi/smpi_mpi_dt_private.h @@ -40,44 +40,54 @@ extern MPI_Datatype MPI_PTR; used for serialization/unserialization of messages */ +typedef struct s_smpi_mpi_contiguous{ + s_smpi_subtype_t base; + MPI_Datatype old_type; + MPI_Aint lb; + size_t size_oldtype; + size_t block_count; +} s_smpi_mpi_contiguous_t; + typedef struct s_smpi_mpi_vector{ s_smpi_subtype_t base; + MPI_Datatype old_type; + size_t size_oldtype; size_t block_stride; size_t block_length; size_t block_count; - MPI_Datatype old_type; - size_t size_oldtype; } s_smpi_mpi_vector_t; typedef struct s_smpi_mpi_hvector{ s_smpi_subtype_t base; + MPI_Datatype old_type; + size_t size_oldtype; MPI_Aint block_stride; size_t block_length; size_t block_count; - MPI_Datatype old_type; - size_t size_oldtype; } s_smpi_mpi_hvector_t; typedef struct s_smpi_mpi_indexed{ s_smpi_subtype_t base; + MPI_Datatype old_type; + size_t size_oldtype; int* block_lengths; int* block_indices; size_t block_count; - MPI_Datatype old_type; - size_t size_oldtype; } s_smpi_mpi_indexed_t; typedef struct s_smpi_mpi_hindexed{ s_smpi_subtype_t base; + MPI_Datatype old_type; + size_t size_oldtype; int* block_lengths; MPI_Aint* block_indices; size_t block_count; - MPI_Datatype old_type; - size_t size_oldtype; } s_smpi_mpi_hindexed_t; typedef struct s_smpi_mpi_struct{ s_smpi_subtype_t base; + MPI_Datatype old_type; + size_t size_oldtype; int* block_lengths; MPI_Aint* block_indices; size_t block_count; @@ -88,7 +98,23 @@ typedef struct s_smpi_mpi_struct{ Functions to handle serialization/unserialization of messages, 3 for each type of MPI_Type One for creating the substructure to handle, one for serialization, one for unserialization */ +void unserialize_contiguous( const void *contiguous_vector, + void *noncontiguous_vector, + size_t count, + void *type); +void serialize_contiguous( const void *noncontiguous_vector, + void *contiguous_vector, + size_t count, + void *type); + +void free_contiguous(MPI_Datatype* type); + +s_smpi_mpi_contiguous_t* smpi_datatype_contiguous_create( MPI_Aint lb, + int block_count, + MPI_Datatype old_type, + int size_oldtype); + void unserialize_vector( const void *contiguous_vector, void *noncontiguous_vector, size_t count,