X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d3a5b5e5113cf4438faf96f6dc442240c5b9d085..cc4eceb15c80a597e44222b8c0ff60caf85db959:/src/smpi/include/smpi_datatype_derived.hpp diff --git a/src/smpi/include/smpi_datatype_derived.hpp b/src/smpi/include/smpi_datatype_derived.hpp index 5c46639a24..30b4e9e232 100644 --- a/src/smpi/include/smpi_datatype_derived.hpp +++ b/src/smpi/include/smpi_datatype_derived.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2010, 2012-2017. The SimGrid Team. +/* Copyright (c) 2009-2019. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -18,25 +18,13 @@ class Type_Contiguous: public Datatype { public: Type_Contiguous(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, MPI_Datatype old_type); + Type_Contiguous(const Type_Contiguous&) = delete; + Type_Contiguous& operator=(const Type_Contiguous&) = delete; ~Type_Contiguous(); void serialize(void* noncontiguous, void* contiguous, int count); void unserialize(void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op); }; -class Type_Vector: public Datatype{ - int block_count_; - int block_length_; - int block_stride_; - MPI_Datatype old_type_; - -public: - Type_Vector(int size, MPI_Aint lb, MPI_Aint ub, int flags, int count, int blocklen, int stride, - MPI_Datatype old_type); - ~Type_Vector(); - void serialize(void* noncontiguous, void* contiguous, int count); - void unserialize(void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op); -}; - class Type_Hvector: public Datatype{ int block_count_; int block_length_; @@ -46,23 +34,17 @@ class Type_Hvector: public Datatype{ public: Type_Hvector(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, int block_length, MPI_Aint block_stride, MPI_Datatype old_type); + Type_Hvector(const Type_Hvector&) = delete; + Type_Hvector& operator=(const Type_Hvector&) = delete; ~Type_Hvector(); void serialize(void* noncontiguous, void* contiguous, int count); void unserialize(void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op); }; -class Type_Indexed: public Datatype{ - int block_count_; - int* block_lengths_; - int* block_indices_; - MPI_Datatype old_type_; - +class Type_Vector : public Type_Hvector { public: - Type_Indexed(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, int* block_lengths, int* block_indices, - MPI_Datatype old_type); - ~Type_Indexed(); - void serialize(void* noncontiguous, void* contiguous, int count); - void unserialize(void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op); + Type_Vector(int size, MPI_Aint lb, MPI_Aint ub, int flags, int count, int blocklen, int stride, + MPI_Datatype old_type); }; class Type_Hindexed: public Datatype{ @@ -74,11 +56,21 @@ class Type_Hindexed: public Datatype{ public: Type_Hindexed(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, int* block_lengths, MPI_Aint* block_indices, MPI_Datatype old_type); + Type_Hindexed(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, int* block_lengths, int* block_indices, + MPI_Datatype old_type, MPI_Aint factor); + Type_Hindexed(const Type_Hindexed&) = delete; + Type_Hindexed& operator=(const Type_Hindexed&) = delete; ~Type_Hindexed(); void serialize(void* noncontiguous, void* contiguous, int count); void unserialize(void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op); }; +class Type_Indexed : public Type_Hindexed { +public: + Type_Indexed(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, int* block_lengths, int* block_indices, + MPI_Datatype old_type); +}; + class Type_Struct: public Datatype{ int block_count_; int* block_lengths_; @@ -88,6 +80,8 @@ class Type_Struct: public Datatype{ public: Type_Struct(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, int* block_lengths, MPI_Aint* block_indices, MPI_Datatype* old_types); + Type_Struct(const Type_Struct&) = delete; + Type_Struct& operator=(const Type_Struct&) = delete; ~Type_Struct(); void serialize(void* noncontiguous, void* contiguous, int count); void unserialize(void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op);