public abstract class Datatype
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
baseType |
Constructor and Description |
---|
Datatype() |
Modifier and Type | Method and Description |
---|---|
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 - the difference between upper and lower
bound.
|
void |
finalize() |
void |
free() |
int |
getByteSize() |
int |
getType() |
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 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.
|
int |
Size()
Returns the total size of a datatype - the number of buffer elements it
represents.
|
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.
|
public int getType()
public int getByteSize()
public int Extent() throws MPIException
returns: | datatype extent |
Java binding of the MPI operation MPI_TYPE_EXTENT.
MPIException
public int Size() throws MPIException
returns: | datatype size |
Java binding of the MPI operation MPI_TYPE_SIZE.
MPIException
public int Lb() throws MPIException
returns: | displacement of lower bound from origin |
Java binding of the MPI operation MPI_TYPE_LB.
MPIException
public int Ub() throws MPIException
returns: | displacement of upper bound from origin |
Java binding of the MPI operation MPI_TYPE_UB.
MPIException
public void Commit() throws MPIException
MPIException
public void finalize() throws MPIException
finalize
in class java.lang.Object
MPIException
public static Datatype Contiguous(int count, Datatype oldtype) throws MPIException
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.
MPIException
public static Datatype Vector(int count, int blocklength, int stride, Datatype oldtype) throws MPIException
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.
MPIException
public static Datatype Hvector(int count, int blocklength, int stride, Datatype oldtype) throws MPIException
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.
MPIException
public static Datatype Indexed(int[] array_of_blocklengths, int[] array_of_displacements, Datatype oldtype) throws MPIException
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.
MPIException
public static Datatype Hindexed(int[] array_of_blocklengths, int[] array_of_displacements, Datatype oldtype) throws MPIException
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.
MPIException
public static Datatype Struct(int[] array_of_blocklengths, int[] array_of_displacements, Datatype[] array_of_types) throws MPIException
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.
MPIException
public void free()