/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#define DT_FLAG_DESTROYED 0x0001 /**< user destroyed but some other layers still have a reference */
#define DT_FLAG_COMMITED 0x0002 /**< ready to be used for a send/recv operation */
#define DT_FLAG_DESTROYED 0x0001 /**< user destroyed but some other layers still have a reference */
#define DT_FLAG_COMMITED 0x0002 /**< ready to be used for a send/recv operation */
Datatype(int size,MPI_Aint lb, MPI_Aint ub, int flags);
Datatype(char* name, int size,MPI_Aint lb, MPI_Aint ub, int flags);
Datatype(Datatype *datatype, int* ret);
virtual ~Datatype();
Datatype(int size,MPI_Aint lb, MPI_Aint ub, int flags);
Datatype(char* name, int size,MPI_Aint lb, MPI_Aint ub, int flags);
Datatype(Datatype *datatype, int* ret);
virtual ~Datatype();
void get_name(char* name, int* length);
void set_name(char* name);
static int copy(void *sendbuf, int sendcount, MPI_Datatype sendtype,
void get_name(char* name, int* length);
void set_name(char* name);
static int copy(void *sendbuf, int sendcount, MPI_Datatype sendtype,
- int attr_delete(int keyval);
- int attr_get(int keyval, void* attr_value, int* flag);
- int attr_put(int keyval, void* attr_value);
static int keyval_create(MPI_Type_copy_attr_function* copy_fn, MPI_Type_delete_attr_function* delete_fn, int* keyval, void* extra_state);
static int keyval_free(int* keyval);
int pack(void* inbuf, int incount, void* outbuf, int outcount, int* position, MPI_Comm comm);
static int keyval_create(MPI_Type_copy_attr_function* copy_fn, MPI_Type_delete_attr_function* delete_fn, int* keyval, void* extra_state);
static int keyval_free(int* keyval);
int pack(void* inbuf, int incount, void* outbuf, int outcount, int* position, MPI_Comm comm);
static int create_indexed(int count, int* blocklens, int* indices, MPI_Datatype old_type, MPI_Datatype* new_type);
static int create_hindexed(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* new_type);
static int create_struct(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype* old_types, MPI_Datatype* new_type);
static int create_indexed(int count, int* blocklens, int* indices, MPI_Datatype old_type, MPI_Datatype* new_type);
static int create_hindexed(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* new_type);
static int create_struct(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype* old_types, MPI_Datatype* new_type);