next up previous contents
Next: Pack and unpack Up: Point-to-Point Communication Previous: Null processes   Contents


Derived datatypes

Every derived data type constructable in the Java binding has a uniquely defined base type. This is a Java primitive type. For the system-defined Datatype values, the base type is (naturally) the Java primitive type for which the value stands. Derived types inherit their base types from their precursors in a straightforward way.

static Datatype Datatype.Contiguous(int count, Datatype oldtype)
Java binding of the MPI operation MPI_TYPE_CONTIGUOUS. The return value is newtype. The base type of newtype is the same as the base type of oldtype.

static Datatype Datatype.Vector(int count, int blocklength,
                                int stride, Datatype oldtype)
Java binding of the MPI operation MPI_TYPE_VECTOR. The return value is newtype. The base type of newtype is the same as the base type of oldtype.

static Datatype Datatype.Hvector(int count, int blocklength,
                                 int stride, Datatype oldtype)
Java binding of the MPI operation MPI_TYPE_HVECTOR. Arguments as for Vector. Unlike other language bindings, the value of stride is given in units of the base type, not bytes.

static Datatype Datatype.Indexed(int [] array_of_blocklengths,
                                 int [] array_of_displacements,
                                 Datatype oldtype)
Java binding of the MPI operation MPI_TYPE_INDEXED. The value of count is taken to be size of the array_of_blocklengths argument. The second argument, array_of_displacements, should be the same size. The return value is newtype. The base type of newtype is the same as the base type of oldtype.

static Datatype Datatype.Hindexed(int [] array_of_blocklengths,
                                  int [] array_of_displacements,
                                  Datatype oldtype)
Java binding of the MPI operation MPI_TYPE_HINDEXED. Arguments as for Indexed. Unlike other language bindings, the values in array_of_displacements are given in units of the base type, not bytes.

static Datatype Datatype.Struct(int [] array_of_blocklengths,
                                int [] array_of_displacements,
                                Datatype [] array_of_types)
Java binding of the MPI operation MPI_TYPE_STRUCT. The value of count is taken to be size of the array_of_blocklengths argument. The second and third arguments, array_of_displacements and array_of_types, should be the same size. The return value is newtype. All elements of array_of_types should have the same base type; this will also be the base type of newtype. Unlike other language bindings, the values in array_of_displacements are given in units of the base type, not bytes.

int Datatype.Extent()
Java binding of the MPI operation MPI_TYPE_EXTENT. The return value is extent.

int Datatype.Size()
Java binding of the MPI operation MPI_TYPE_SIZE. The return value is size.

int Datatype.Lb()
Java binding of the MPI operation MPI_TYPE_LB. The return value is displacement.

int Datatype.Ub()
Java binding of the MPI operation MPI_TYPE_UB. The return value is displacement.

void Datatype.Commit()
Java binding of the MPI operation MPI_TYPE_COMMIT.

void Datatype.finalize()
The Datatype destructor will invoke the MPI operation MPI_TYPE_FREE.

int Status.Get_elements(Datatype datatype)
Java binding of the MPI operation MPI_GET_ELEMENTS. The return value is count.


next up previous contents
Next: Pack and unpack Up: Point-to-Point Communication Previous: Null processes   Contents
Bryan Carpenter 2002-07-12