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
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);
24 void serialize( void* noncontiguous, void *contiguous,
26 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
27 int count, MPI_Op op);
30 class Type_Vector: public Datatype{
35 MPI_Datatype old_type_;
37 Type_Vector(int size,MPI_Aint lb, MPI_Aint ub, int flags, int count, int blocklen, int stride, MPI_Datatype old_type);
39 void serialize( void* noncontiguous, void *contiguous,
41 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
42 int count, MPI_Op op);
45 class Type_Hvector: public Datatype{
49 MPI_Aint block_stride_;
50 MPI_Datatype old_type_;
52 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);
54 void serialize( void* noncontiguous, void *contiguous,
56 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
57 int count, MPI_Op op);
60 class Type_Indexed: public Datatype{
65 MPI_Datatype old_type_;
67 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);
69 void serialize( void* noncontiguous, void *contiguous,
71 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
72 int count, MPI_Op op);
75 class Type_Hindexed: public Datatype{
79 MPI_Aint* block_indices_;
80 MPI_Datatype old_type_;
82 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);
84 void serialize( void* noncontiguous, void *contiguous,
86 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
87 int count, MPI_Op op);
90 class Type_Struct: public Datatype{
94 MPI_Aint* block_indices_;
95 MPI_Datatype* old_types_;
97 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);
99 void serialize( void* noncontiguous, void *contiguous,
101 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
102 int count, MPI_Op op);