29 MPI::Datatype::Create_contiguous(
int count)
const
32 (void)MPI_Type_contiguous(count, mpi_datatype, &newtype);
37 MPI::Datatype::Create_vector(
int count,
int blocklength,
41 (void)MPI_Type_vector(count, blocklength, stride, mpi_datatype, &newtype);
46 MPI::Datatype::Create_indexed(
int count,
47 const int array_of_blocklengths[],
48 const int array_of_displacements[])
const
51 (void)MPI_Type_indexed(count, const_cast<int *>(array_of_blocklengths),
52 const_cast<int *
>(array_of_displacements), mpi_datatype, &newtype);
57 MPI::Datatype::Create_struct(
int count,
const int array_of_blocklengths[],
58 const MPI::Aint array_of_displacements[],
59 const MPI::Datatype array_of_types[])
64 for (i=0; i < count; i++)
65 type_array[i] = array_of_types[i];
67 (void)MPI_Type_create_struct(count, const_cast<int *>(array_of_blocklengths),
68 const_cast<MPI_Aint*
>(array_of_displacements),
69 type_array, &newtype);
75 MPI::Datatype::Create_hindexed(
int count,
const int array_of_blocklengths[],
76 const MPI::Aint array_of_displacements[])
const
79 (void)MPI_Type_create_hindexed(count, const_cast<int *>(array_of_blocklengths),
80 const_cast<MPI_Aint*
>(array_of_displacements),
81 mpi_datatype, &newtype) ;
86 MPI::Datatype::Create_hvector(
int count,
int blocklength,
87 MPI::Aint stride)
const
90 (void)MPI_Type_create_hvector(count, blocklength, (MPI_Aint)stride,
91 mpi_datatype, &newtype);
97 MPI::Datatype::Create_indexed_block(
int count,
int blocklength,
98 const int array_of_displacements[])
const
101 (void)MPI_Type_create_indexed_block(count, blocklength, const_cast<int *>(array_of_displacements),
102 mpi_datatype, &newtype);
107 MPI::Datatype::Create_resized(
const MPI::Aint lb,
const MPI::Aint extent)
const
111 (void) MPI_Type_create_resized(mpi_datatype, lb, extent, &newtype);
116 MPI::Datatype::Get_size()
const
119 (void)MPI_Type_size(mpi_datatype, &size);
124 MPI::Datatype::Get_extent(MPI::Aint& lb, MPI::Aint& extent)
const
126 (void)MPI_Type_get_extent(mpi_datatype, &lb, &extent);
130 MPI::Datatype::Get_true_extent(MPI::Aint& lb, MPI::Aint& extent)
const
132 (void) MPI_Type_get_true_extent(mpi_datatype, &lb, &extent);
136 MPI::Datatype::Commit()
138 (void)MPI_Type_commit(&mpi_datatype);
142 MPI::Datatype::Pack(
const void* inbuf,
int incount,
143 void *outbuf,
int outsize,
144 int& position,
const MPI::Comm &comm)
const
146 (void)MPI_Pack(const_cast<void *>(inbuf), incount, mpi_datatype, outbuf,
147 outsize, &position, comm);
151 MPI::Datatype::Unpack(
const void* inbuf,
int insize,
152 void *outbuf,
int outcount,
int& position,
153 const MPI::Comm& comm)
const
155 (void)MPI_Unpack(const_cast<void *>(inbuf), insize, &position,
156 outbuf, outcount, mpi_datatype, comm);
160 MPI::Datatype::Pack_size(
int incount,
const MPI::Comm& comm)
const
163 (void)MPI_Pack_size(incount, mpi_datatype, comm, &size);
168 MPI::Datatype::Pack_external(
const char* datarep,
const void* inbuf,
int incount,
169 void* outbuf, MPI::Aint outsize, MPI::Aint& position)
const
171 (void)MPI_Pack_external(const_cast<char *>(datarep),
const_cast<void *
>(inbuf),
172 incount, mpi_datatype, outbuf, outsize, &position);
176 MPI::Datatype::Pack_external_size(
const char* datarep,
int incount)
const
179 (void)MPI_Pack_external_size(const_cast<char *>(datarep), incount, mpi_datatype, &addr);
184 MPI::Datatype::Unpack_external(
const char* datarep,
const void* inbuf,
185 MPI::Aint insize, MPI::Aint& position,
void* outbuf,
int outcount)
const
187 (void)MPI_Unpack_external(const_cast<char *>(datarep),
const_cast<void *
>(inbuf),
188 insize, &position, outbuf, outcount, mpi_datatype);
196 MPI::Datatype::Create_subarray(
int ndims,
const int array_of_sizes[],
197 const int array_of_subsizes[],
198 const int array_of_starts[],
int order)
202 (void) MPI_Type_create_subarray(ndims, const_cast<int *>(array_of_sizes),
203 const_cast<int *
>(array_of_subsizes),
204 const_cast<int *>(array_of_starts),
205 order, mpi_datatype, &type);
210 MPI::Datatype::Create_darray(
int size,
int rank,
int ndims,
211 const int array_of_gsizes[],
const int array_of_distribs[],
212 const int array_of_dargs[],
const int array_of_psizes[],
216 (void) MPI_Type_create_darray(size, rank, ndims,
217 const_cast<int *>(array_of_gsizes),
218 const_cast<int *
>(array_of_distribs),
219 const_cast<int *>(array_of_dargs),
220 const_cast<int *
>(array_of_psizes),
221 order, mpi_datatype, &type);
226 MPI::Datatype::Create_f90_complex(
int p,
int r)
229 (void) MPI_Type_create_f90_complex(p, r, &type);
234 MPI::Datatype::Create_f90_integer(
int r)
237 (void) MPI_Type_create_f90_integer(r, &type);
242 MPI::Datatype::Create_f90_real(
int p,
int r)
245 (void) MPI_Type_create_f90_real(p, r, &type);
250 MPI::Datatype::Match_size(
int typeclass,
int size)
253 (void) MPI_Type_match_size(typeclass, size, &type);
263 MPI::Datatype::Dup()
const
266 (void) MPI_Type_dup(mpi_datatype, &type);
274 MPI::Datatype::Create_keyval(MPI::Datatype::Copy_attr_function* type_copy_attr_fn,
275 MPI::Datatype::Delete_attr_function* type_delete_attr_fn,
280 ret = do_create_keyval(NULL, NULL,
281 type_copy_attr_fn, type_delete_attr_fn,
282 extra_state, keyval);
283 return (MPI_SUCCESS == ret) ? keyval : ret;
289 MPI::Datatype::Create_keyval(MPI_Type_copy_attr_function* type_copy_attr_fn,
290 MPI_Type_delete_attr_function* type_delete_attr_fn,
295 ret = do_create_keyval(type_copy_attr_fn, type_delete_attr_fn,
297 extra_state, keyval);
298 return (MPI_SUCCESS == ret) ? keyval : ret;
304 MPI::Datatype::Create_keyval(MPI::Datatype::Copy_attr_function* type_copy_attr_fn,
305 MPI_Type_delete_attr_function* type_delete_attr_fn,
310 ret = do_create_keyval(NULL, type_delete_attr_fn,
311 type_copy_attr_fn, NULL,
312 extra_state, keyval);
313 return (MPI_SUCCESS == ret) ? keyval : ret;
319 MPI::Datatype::Create_keyval(MPI_Type_copy_attr_function* type_copy_attr_fn,
320 MPI::Datatype::Delete_attr_function* type_delete_attr_fn,
325 ret = do_create_keyval(type_copy_attr_fn, NULL,
326 NULL, type_delete_attr_fn,
327 extra_state, keyval);
328 return (MPI_SUCCESS == ret) ? keyval : ret;
332 MPI::Datatype::Delete_attr(
int type_keyval)
334 (void) MPI_Type_delete_attr(mpi_datatype, type_keyval);
338 MPI::Datatype::Free_keyval(
int& type_keyval)
340 (void) MPI_Type_free_keyval(&type_keyval);
344 MPI::Datatype::Get_attr(
int type_keyval,
345 void* attribute_val)
const
348 (void) MPI_Type_get_attr(mpi_datatype, type_keyval, attribute_val, &ret);
349 return OPAL_INT_TO_BOOL(ret);
354 MPI::Datatype::Get_contents(
int max_integers,
int max_addresses,
355 int max_datatypes,
int array_of_integers[],
356 MPI::Aint array_of_addresses[],
357 MPI::Datatype array_of_datatypes[])
const
362 (void) MPI_Type_get_contents(mpi_datatype, max_integers, max_addresses,
364 const_cast<int *>(array_of_integers),
365 const_cast<MPI_Aint*
>(array_of_addresses),
369 for (i = 0; i < max_datatypes; ++i) {
370 array_of_datatypes[i] = c_datatypes[i];
372 delete[] c_datatypes;
376 MPI::Datatype::Get_envelope(
int& num_integers,
int& num_addresses,
377 int& num_datatypes,
int& combiner)
const
379 (void) MPI_Type_get_envelope(mpi_datatype, &num_integers, &num_addresses,
380 &num_datatypes, &combiner);
384 MPI::Datatype::Get_name(
char* type_name,
int& resultlen)
const
386 (void) MPI_Type_get_name(mpi_datatype, type_name, &resultlen);
390 MPI::Datatype::Set_attr(
int type_keyval,
const void* attribute_val)
392 (void) MPI_Type_set_attr(mpi_datatype, type_keyval, const_cast<void *>(attribute_val));
396 MPI::Datatype::Set_name(
const char* type_name)
398 (void) MPI_Type_set_name(mpi_datatype, const_cast<char *>(type_name));
407 typedef int MPI::Datatype::Copy_attr_function(
const Datatype& oldtype,
410 void* attribute_val_in,
411 void* attribute_val_out,
414 typedef int MPI::Datatype::Delete_attr_function(
Datatype& type,
Definition: datatype.h:24
Definition: ompi_datatype.h:68