Modifier and Type | Field and Description |
---|---|
protected int |
baseSize |
protected int |
baseType |
protected static int |
BOOLEAN |
protected static int |
BYTE |
protected static int |
CHAR |
protected static int |
DOUBLE |
protected static int |
DOUBLE_COMPLEX |
protected static int |
DOUBLE_INT |
protected static int |
FLOAT |
protected static int |
FLOAT_COMPLEX |
protected static int |
FLOAT_INT |
protected long |
handle |
protected static int |
INT |
protected static int |
INT2 |
protected static int |
LONG |
protected static int |
LONG_INT |
protected static int |
NULL |
protected static int |
PACKED |
protected static int |
SHORT |
protected static int |
SHORT_INT |
Modifier | Constructor and Description |
---|---|
protected |
Datatype() |
Modifier and Type | Method and Description |
---|---|
Datatype |
clone()
Java binding of
MPI_TYPE_DUP . |
void |
commit()
Commits a derived datatype.
|
static Datatype |
createContiguous(int count,
Datatype oldType)
Construct new datatype representing replication of old datatype into
contiguous locations.
|
static Datatype |
createHIndexed(int[] blockLengths,
int[] displacements,
Datatype oldType)
Identical to
createIndexed except that the displacements are
expressed directly in terms of the buffer index, rather than the
units of the old type. |
static Datatype |
createHVector(int count,
int blockLength,
int stride,
Datatype oldType)
Identical to
createVector except that the stride is expressed
directly in terms of the buffer index, rather than the units of
the old type. |
static Datatype |
createIndexed(int[] blockLengths,
int[] 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.
|
static int |
createKeyval()
Create a new attribute key.
|
static Datatype |
createResized(Datatype oldType,
int lb,
int extent)
Create a datatype with a new lower bound and extent from an existing
datatype.
|
static Datatype |
createStruct(int[] blockLengths,
int[] displacements,
Datatype[] types)
The most general type constructor.
|
static Datatype |
createVector(int count,
int blockLength,
int stride,
Datatype oldType)
Construct new datatype representing replication of old datatype into
locations that consist of equally spaced blocks.
|
void |
deleteAttr(int keyval)
Deletes an attribute value associated with a key.
|
Datatype |
dup()
Java binding of
MPI_TYPE_DUP . |
void |
free()
Frees the datatype.
|
static void |
freeKeyval(int keyval)
Frees an attribute key.
|
java.lang.Object |
getAttr(int keyval)
Retrieves attribute value by key.
|
int |
getExtent()
Returns the extent of a datatype.
|
int |
getLb()
Returns the lower bound of a datatype.
|
java.lang.String |
getName()
Return the print name from the datatype.
|
protected int |
getOffset(java.lang.Object buffer)
Gets the offset of a buffer in bytes.
|
int |
getSize()
Returns the total size of a datatype - the number of buffer
elements it represents.
|
int |
getTrueExtent()
Returns the true extent of a datatype.
|
int |
getTrueLb()
Returns the true lower bound of a datatype.
|
boolean |
isNull()
Returns
true if this datatype is MPI_DATATYPE_NULL. |
void |
setAttr(int keyval,
java.lang.Object value)
Stores attribute value associated with a key.
|
protected void |
setBasic(int type) |
protected void |
setBasic(int type,
Datatype oldType) |
void |
setName(java.lang.String name)
Sets the print name for the datatype.
|
protected long handle
protected int baseType
protected int baseSize
protected static final int NULL
protected static final int BYTE
protected static final int CHAR
protected static final int SHORT
protected static final int BOOLEAN
protected static final int INT
protected static final int LONG
protected static final int FLOAT
protected static final int DOUBLE
protected static final int PACKED
protected static final int INT2
protected static final int SHORT_INT
protected static final int LONG_INT
protected static final int FLOAT_INT
protected static final int DOUBLE_INT
protected static final int FLOAT_COMPLEX
protected static final int DOUBLE_COMPLEX
protected void setBasic(int type)
protected void setBasic(int type, Datatype oldType)
public int getLb() throws MPIException
Java binding of the MPI operation MPI_TYPE_GET_EXTENT
.
MPIException
- Signals that an MPI exception of some sort has occurred.public int getExtent() throws MPIException
Java binding of the MPI operation MPI_TYPE_GET_EXTENT
.
MPIException
- Signals that an MPI exception of some sort has occurred.public int getTrueLb() throws MPIException
Java binding of the MPI operation MPI_TYPE_GET_TRUE_EXTENT
.
MPIException
- Signals that an MPI exception of some sort has occurred.public int getTrueExtent() throws MPIException
Java binding of the MPI operation MPI_TYPE_GET_TRUE_EXTENT
.
MPIException
- Signals that an MPI exception of some sort has occurred.public int getSize() throws MPIException
Java binding of the MPI operation MPI_TYPE_SIZE
.
MPIException
- Signals that an MPI exception of some sort has occurred.public void commit() throws MPIException
MPI_TYPE_COMMIT
.MPIException
- Signals that an MPI exception of some sort has occurred.public void free() throws MPIException
Java binding of the MPI operation MPI_TYPE_FREE
.
free
in interface Freeable
MPIException
- Signals that an MPI exception of some sort has occurred.public boolean isNull()
true
if this datatype is MPI_DATATYPE_NULL.true
if this datatype is MPI_DATATYPE_NULLpublic Datatype clone()
MPI_TYPE_DUP
.
It is recommended to use dup()
instead of clone()
because the last can't throw an MPIException
.
clone
in class java.lang.Object
public Datatype dup() throws MPIException
MPI_TYPE_DUP
.MPIException
- Signals that an MPI exception of some sort has occurred.public static Datatype createContiguous(int count, Datatype oldType) throws MPIException
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
.
count
- replication countoldType
- old datatypeMPIException
- Signals that an MPI exception of some sort has occurred.public static Datatype createVector(int count, int blockLength, int stride, Datatype oldType) throws MPIException
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
.
count
- number of blocksblockLength
- number of elements in each blockstride
- number of elements between start of each blockoldType
- old datatypeMPIException
- Signals that an MPI exception of some sort has occurred.public static Datatype createHVector(int count, int blockLength, int stride, Datatype oldType) throws MPIException
createVector
except that the stride is expressed
directly in terms of the buffer index, rather than the units of
the old type.
Java binding of the MPI operation MPI_TYPE_CREATE_HVECTOR
.
count
- number of blocksblockLength
- number of elements in eachstride
- number of bytes between start of each blockoldType
- old datatypeMPIException
- Signals that an MPI exception of some sort has occurred.public static Datatype createIndexed(int[] blockLengths, int[] displacements, Datatype oldType) throws MPIException
Java binding of the MPI operation MPI_TYPE_INDEXED
.
The number of blocks is taken to be size of the blockLengths
argument. The second argument, displacements
, should be the
same size. The base type of the new datatype is the same as the base
type of oldType
.
blockLengths
- number of elements per blockdisplacements
- displacement of each block in units of old typeoldType
- old datatypeMPIException
- Signals that an MPI exception of some sort has occurred.public static Datatype createHIndexed(int[] blockLengths, int[] displacements, Datatype oldType) throws MPIException
createIndexed
except that the displacements are
expressed directly in terms of the buffer index, rather than the
units of the old type.
Java binding of the MPI operation MPI_TYPE_CREATE_HINDEXED
.
blockLengths
- number of elements per blockdisplacements
- byte displacement in buffer for each blockoldType
- old datatypeMPIException
- Signals that an MPI exception of some sort has occurred.public static Datatype createStruct(int[] blockLengths, int[] displacements, Datatype[] types) throws MPIException
Java binding of the MPI operation MPI_TYPE_STRUCT
.
The number of blocks is taken to be size of the blockLengths
argument. The second and third arguments, displacements
,
and types
, should be the same size.
blockLengths
- number of elements in each blockdisplacements
- byte displacement of each blocktypes
- type of elements in each blockMPIException
- Signals that an MPI exception of some sort has occurred.public static Datatype createResized(Datatype oldType, int lb, int extent) throws MPIException
Java binding of the MPI operation MPI_TYPE_CREATE_RESIZED
.
oldType
- input datatypelb
- new lower bound of datatype (address integer)extent
- new extent of datatype (address integer)MPIException
- Signals that an MPI exception of some sort has occurred.public void setName(java.lang.String name) throws MPIException
name
- name for the datatypeMPIException
- Signals that an MPI exception of some sort has occurred.public java.lang.String getName() throws MPIException
MPIException
- Signals that an MPI exception of some sort has occurred.public static int createKeyval() throws MPIException
Java binding of the MPI operation MPI_TYPE_CREATE_KEYVAL
.
MPIException
- Signals that an MPI exception of some sort has occurred.public static void freeKeyval(int keyval) throws MPIException
Java binding of the MPI operation MPI_TYPE_FREE_KEYVAL
.
keyval
- attribute keyMPIException
- Signals that an MPI exception of some sort has occurred.public void setAttr(int keyval, java.lang.Object value) throws MPIException
Java binding of the MPI operation MPI_TYPE_SET_ATTR
.
keyval
- attribute keyvalue
- attribute valueMPIException
- Signals that an MPI exception of some sort has occurred.public java.lang.Object getAttr(int keyval) throws MPIException
Java binding of the MPI operation MPI_TYPE_GET_ATTR
.
keyval
- attribute keyMPIException
- Signals that an MPI exception of some sort has occurred.public void deleteAttr(int keyval) throws MPIException
Java binding of the MPI operation MPI_TYPE_DELETE_ATTR
.
keyval
- attribute keyMPIException
- Signals that an MPI exception of some sort has occurred.protected int getOffset(java.lang.Object buffer)
buffer
- buffer