mpi
Class Datatype

java.lang.Object
  extended by mpi.Datatype

public abstract class Datatype
extends java.lang.Object


Constructor Summary
Datatype()
           
 
Method Summary
 void Commit()
          Commit a derived datatype.
static Datatype Contiguous(int count, Datatype oldtype)
          Construct new datatype representing replication of old datatype into contiguous locations.
 int Extent()
          Returns the extent of a datatype.
 void finalize()
          Destructor.
 java.lang.String Get_name()
          Get the print name for a datatype.
static Datatype Hindexed(int[] array_of_blocklengths, int[] array_of_displacements, Datatype oldtype)
          Identical to Indexed except that the displacements are expressed directly in terms of the buffer index, rather than the units of the old type.
static Datatype Hvector(int count, int blocklength, int stride, Datatype oldtype)
          Identical to Vector except that the stride is expressed directly in terms of the buffer index, rather than the units of the old type.
static Datatype Indexed(int[] array_of_blocklengths, int[] array_of_displacements, Datatype oldtype)
          Construct new datatype representing replication of the old datatype into a sequence of blocks where each block can contain a different number of copies and have a different displacement.
 int Lb()
          Find the lower bound of a datatype - the least value in its displacement sequence.
 void Set_name(java.lang.String name)
          Set datatype name.
 int Size()
          Returns the total size of the type.
static Datatype Struct(int[] array_of_blocklengths, int[] array_of_displacements, Datatype[] array_of_types)
          The most general type constructor.
 int Ub()
          Find the upper bound of a datatype - the greatest value in its displacement sequence.
static Datatype Vector(int count, int blocklength, int stride, Datatype oldtype)
          Construct new datatype representing replication of old datatype into locations that consist of equally spaced blocks.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Datatype

public Datatype()
Method Detail

Size

public int Size()
         throws MPIException
Returns the total size of the type.

returns: datatype size

Java binding of the MPI operation MPI_TYPE_SIZE.

Size is defined as the total number of buffer elements incorporated by the data type, or equivalently as the length of the displacement sequence. Unlike other language bindings, the size is not measured in bytes.

Throws:
MPIException

Extent

public int Extent()
           throws MPIException
Returns the extent of a datatype.

returns: datatype extent

Java binding of the MPI operation MPI_TYPE_EXTENT.

Returns the difference between upper and lower bound.

Throws:
MPIException

Lb

public int Lb()
       throws MPIException
Find the lower bound of a datatype - the least value in its displacement sequence.

returns: displacement of lower bound from origin

Java binding of the MPI operation MPI_TYPE_LB.

Throws:
MPIException

Ub

public int Ub()
       throws MPIException
Find the upper bound of a datatype - the greatest value in its displacement sequence.

returns: displacement of upper bound from origin

Java binding of the MPI operation MPI_TYPE_UB.

Throws:
MPIException

Commit

public void Commit()
            throws MPIException
Commit a derived datatype.

Java binding of the MPI operation MPI_TYPE_COMMIT.

Throws:
MPIException

finalize

public void finalize()
              throws MPIException
Destructor.

Java binding of the MPI operation MPI_TYPE_FREE.

Overrides:
finalize in class java.lang.Object
Throws:
MPIException

Set_name

public void Set_name(java.lang.String name)
              throws MPIException
Set datatype name.

name Name of the datatype

Java binding of the MPI operation MPI_TYPE_SET_NAME.

Throws:
MPIException

Get_name

public java.lang.String Get_name()
                          throws MPIException
Get the print name for a datatype.

returns: Name of the datatype

Java binding of the MPI operation MPI_TYPE_GET_NAME.

Throws:
MPIException

Contiguous

public static Datatype Contiguous(int count,
                                  Datatype oldtype)
                           throws MPIException
Construct new datatype representing replication of old datatype into contiguous locations.

count replication count
oldtype old datatype
returns: new datatype

Java binding of the MPI operation MPI_TYPE_CONTIGUOUS.

The base type of the new datatype is the same as the base type of oldtype.

Throws:
MPIException

Vector

public static Datatype Vector(int count,
                              int blocklength,
                              int stride,
                              Datatype oldtype)
                       throws MPIException
Construct new datatype representing replication of old datatype into locations that consist of equally spaced blocks.

count number of blocks
blocklength number of elements in each block
stride number of elements between start of each block
oldtype old datatype
returns: new datatype

Java binding of the MPI operation MPI_TYPE_VECTOR.

The base type of the new datatype is the same as the base type of oldtype.

Not implemented in the current release

Throws:
MPIException

Hvector

public static Datatype Hvector(int count,
                               int blocklength,
                               int stride,
                               Datatype oldtype)
                        throws MPIException
Identical to Vector except that the stride is expressed directly in terms of the buffer index, rather than the units of the old type.

count number of blocks
blocklength number of elements in each block
stride number of elements between start of each block
oldtype old datatype
returns: new datatype

Java binding of the MPI operation MPI_TYPE_HVECTOR.

Unlike other language bindings, the value of stride is not measured in bytes.

Not implemented in the current release

Throws:
MPIException

Indexed

public static Datatype Indexed(int[] array_of_blocklengths,
                               int[] array_of_displacements,
                               Datatype oldtype)
                        throws MPIException
Construct new datatype representing replication of the old datatype into a sequence of blocks where each block can contain a different number of copies and have a different displacement.

array_of_blocklengths number of elements per block
array_of_displacements displacement of each block in units of old type
oldtype old datatype
returns: new datatype

Java binding of the MPI operation MPI_TYPE_INDEXED.

The number of blocks is taken to be size of the array_of_blocklengths argument. The second argument, array_of_displacements, should be the same size. The base type of the new datatype is the same as the base type of oldtype.

Not implemented in the current release

Throws:
MPIException

Hindexed

public static Datatype Hindexed(int[] array_of_blocklengths,
                                int[] array_of_displacements,
                                Datatype oldtype)
                         throws MPIException
Identical to Indexed except that the displacements are expressed directly in terms of the buffer index, rather than the units of the old type.

array_of_blocklengths number of elements per block
array_of_displacements displacement in buffer for each block
oldtype old datatype
returns: new datatype

Java binding of the MPI operation MPI_TYPE_HINDEXED.

Unlike other language bindings, the values in array_of_displacements are not measured in bytes.

Not implemented in the current release

Throws:
MPIException

Struct

public static Datatype Struct(int[] array_of_blocklengths,
                              int[] array_of_displacements,
                              Datatype[] array_of_types)
                       throws MPIException
The most general type constructor.

array_of_blocklengths number of elements per block
array_of_displacements displacement in buffer for each block
array_of_types type of elements in each block
returns: new datatype

Java binding of the MPI operation MPI_TYPE_STRUCT.

The number of blocks 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. Unlike other language bindings, the values in array_of_displacements are not measured in bytes. All elements of array_of_types with definite base types must have the same base type: this will be the base type of new datatype.

Not implemented in the current release

Throws:
MPIException