1 /* Copyright (c) 2009-2010, 2012-2017. 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
13 #include "src/smpi/smpi_datatype.hpp"
18 class Type_Contiguous: public Datatype {
21 MPI_Datatype old_type_;
23 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);
40 void serialize( void* noncontiguous, void *contiguous,
42 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
43 int count, MPI_Op op);
46 class Type_Hvector: public Datatype{
50 MPI_Aint block_stride_;
51 MPI_Datatype old_type_;
53 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);
55 void serialize( void* noncontiguous, void *contiguous,
57 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
58 int count, MPI_Op op);
61 class Type_Indexed: public Datatype{
66 MPI_Datatype old_type_;
68 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);
70 void serialize( void* noncontiguous, void *contiguous,
72 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
73 int count, MPI_Op op);
76 class Type_Hindexed: public Datatype{
80 MPI_Aint* block_indices_;
81 MPI_Datatype old_type_;
83 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);
85 void serialize( void* noncontiguous, void *contiguous,
87 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
88 int count, MPI_Op op);
91 class Type_Struct: public Datatype{
95 MPI_Aint* block_indices_;
96 MPI_Datatype* old_types_;
98 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);
100 void serialize( void* noncontiguous, void *contiguous,
102 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
103 int count, MPI_Op op);