1 /* Copyright (c) 2009-2010, 2012-2014. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef SMPI_DATATYPE_DERIVED_HPP
8 #define SMPI_DATATYPE_DERIVED_HPP
17 class Type_Contiguous: public Datatype{
20 MPI_Datatype old_type_;
22 Type_Contiguous(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, MPI_Datatype old_type);
25 void serialize( void* noncontiguous, void *contiguous,
27 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
28 int count, MPI_Op op);
31 class Type_Vector: public Datatype{
36 MPI_Datatype old_type_;
38 Type_Vector(int size,MPI_Aint lb, MPI_Aint ub, int flags, int count, int blocklen, int stride, MPI_Datatype old_type);
41 void serialize( void* noncontiguous, void *contiguous,
43 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
44 int count, MPI_Op op);
47 class Type_Hvector: public Datatype{
51 MPI_Aint block_stride_;
52 MPI_Datatype old_type_;
54 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);
57 void serialize( void* noncontiguous, void *contiguous,
59 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
60 int count, MPI_Op op);
63 class Type_Indexed: public Datatype{
68 MPI_Datatype old_type_;
70 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);
73 void serialize( void* noncontiguous, void *contiguous,
75 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
76 int count, MPI_Op op);
79 class Type_Hindexed: public Datatype{
83 MPI_Aint* block_indices_;
84 MPI_Datatype old_type_;
86 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);
89 void serialize( void* noncontiguous, void *contiguous,
91 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
92 int count, MPI_Op op);
95 class Type_Struct: public Datatype{
99 MPI_Aint* block_indices_;
100 MPI_Datatype* old_types_;
102 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);
105 void serialize( void* noncontiguous, void *contiguous,
107 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
108 int count, MPI_Op op);