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
10 #include "src/smpi/smpi_datatype.hpp"
15 class Type_Contiguous: public Datatype {
18 MPI_Datatype old_type_;
20 Type_Contiguous(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, MPI_Datatype old_type);
22 void serialize( void* noncontiguous, void *contiguous,
24 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
25 int count, MPI_Op op);
28 class Type_Vector: public Datatype{
33 MPI_Datatype old_type_;
35 Type_Vector(int size,MPI_Aint lb, MPI_Aint ub, int flags, int count, int blocklen, int stride, MPI_Datatype old_type);
37 void serialize( void* noncontiguous, void *contiguous,
39 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
40 int count, MPI_Op op);
43 class Type_Hvector: public Datatype{
47 MPI_Aint block_stride_;
48 MPI_Datatype old_type_;
50 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);
52 void serialize( void* noncontiguous, void *contiguous,
54 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
55 int count, MPI_Op op);
58 class Type_Indexed: public Datatype{
63 MPI_Datatype old_type_;
65 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);
67 void serialize( void* noncontiguous, void *contiguous,
69 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
70 int count, MPI_Op op);
73 class Type_Hindexed: public Datatype{
77 MPI_Aint* block_indices_;
78 MPI_Datatype old_type_;
80 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);
82 void serialize( void* noncontiguous, void *contiguous,
84 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
85 int count, MPI_Op op);
88 class Type_Struct: public Datatype{
92 MPI_Aint* block_indices_;
93 MPI_Datatype* old_types_;
95 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);
97 void serialize( void* noncontiguous, void *contiguous,
99 void unserialize( void* contiguous_vector, void *noncontiguous_vector,
100 int count, MPI_Op op);