类 Datatype
Datatype
class represents MPI_Datatype
handles.-
字段概要
字段修饰符和类型字段说明protected int
protected int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected long
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明clone()
Java binding ofMPI_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 tocreateIndexed
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 tocreateVector
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
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.dup()
Java binding ofMPI_TYPE_DUP
.void
free()
Frees the datatype.static void
freeKeyval
(int keyval) Frees an attribute key.getAttr
(int keyval) Retrieves attribute value by key.int
Returns the extent of a datatype.int
getLb()
Returns the lower bound of a datatype.getName()
Return the print name from the datatype.protected int
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
Returns the true extent of a datatype.int
Returns the true lower bound of a datatype.boolean
isNull()
Returnstrue
if this datatype is MPI_DATATYPE_NULL.void
Stores attribute value associated with a key.protected void
setBasic
(int type) protected void
void
Sets the print name for the datatype.
-
字段详细资料
-
handle
protected long handle -
baseType
protected int baseType -
baseSize
protected int baseSize -
NULL
protected static final int NULL- 另请参阅:
-
BYTE
protected static final int BYTE- 另请参阅:
-
CHAR
protected static final int CHAR- 另请参阅:
-
SHORT
protected static final int SHORT- 另请参阅:
-
BOOLEAN
protected static final int BOOLEAN- 另请参阅:
-
INT
protected static final int INT- 另请参阅:
-
LONG
protected static final int LONG- 另请参阅:
-
FLOAT
protected static final int FLOAT- 另请参阅:
-
DOUBLE
protected static final int DOUBLE- 另请参阅:
-
PACKED
protected static final int PACKED- 另请参阅:
-
INT2
protected static final int INT2- 另请参阅:
-
SHORT_INT
protected static final int SHORT_INT- 另请参阅:
-
LONG_INT
protected static final int LONG_INT- 另请参阅:
-
FLOAT_INT
protected static final int FLOAT_INT- 另请参阅:
-
DOUBLE_INT
protected static final int DOUBLE_INT- 另请参阅:
-
FLOAT_COMPLEX
protected static final int FLOAT_COMPLEX- 另请参阅:
-
DOUBLE_COMPLEX
protected static final int DOUBLE_COMPLEX- 另请参阅:
-
-
构造器详细资料
-
Datatype
protected Datatype()
-
-
方法详细资料
-
setBasic
protected void setBasic(int type) -
setBasic
-
getLb
Returns the lower bound of a datatype.Java binding of the MPI operation
MPI_TYPE_GET_EXTENT
.- 返回:
- lower bound of datatype
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getExtent
Returns the extent of a datatype.Java binding of the MPI operation
MPI_TYPE_GET_EXTENT
.- 返回:
- datatype extent
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getTrueLb
Returns the true lower bound of a datatype.Java binding of the MPI operation
MPI_TYPE_GET_TRUE_EXTENT
.- 返回:
- lower bound of datatype
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getTrueExtent
Returns the true extent of a datatype.Java binding of the MPI operation
MPI_TYPE_GET_TRUE_EXTENT
.- 返回:
- datatype true extent
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getSize
Returns the total size of a datatype - the number of buffer elements it represents.Java binding of the MPI operation
MPI_TYPE_SIZE
.- 返回:
- datatype size
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
commit
Commits a derived datatype. Java binding of the MPI operationMPI_TYPE_COMMIT
.- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
free
Frees the datatype.Java binding of the MPI operation
MPI_TYPE_FREE
.- 指定者:
free
在接口中Freeable
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
isNull
public boolean isNull()Returnstrue
if this datatype is MPI_DATATYPE_NULL.- 返回:
true
if this datatype is MPI_DATATYPE_NULL
-
clone
Java binding ofMPI_TYPE_DUP
.It is recommended to use
dup()
instead ofclone()
because the last can't throw anMPIException
. -
dup
Java binding ofMPI_TYPE_DUP
.- 返回:
- new datatype
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
createContiguous
Construct new datatype representing replication of old datatype into contiguous locations.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 datatype- 返回:
- new datatype
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
createVector
public static Datatype createVector(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.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 datatype- 返回:
- new datatype
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
createHVector
public static Datatype createHVector(int count, int blockLength, int stride, Datatype oldType) throws MPIException Identical tocreateVector
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 datatype- 返回:
- new datatype
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
createIndexed
public static Datatype createIndexed(int[] blockLengths, int[] displacements, Datatype oldType) throws MPIException 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.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 ofoldType
.- 参数:
blockLengths
- number of elements per blockdisplacements
- displacement of each block in units of old typeoldType
- old datatype- 返回:
- new datatype
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
createHIndexed
public static Datatype createHIndexed(int[] blockLengths, int[] displacements, Datatype oldType) throws MPIException Identical tocreateIndexed
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 datatype- 返回:
- new datatype
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
createStruct
public static Datatype createStruct(int[] blockLengths, int[] displacements, Datatype[] types) throws MPIException The most general type constructor.Java binding of the MPI operation
MPI_TYPE_CREATE_STRUCT
.The number of blocks is taken to be size of the
blockLengths
argument. The second and third arguments,displacements
, andtypes
, should be the same size.- 参数:
blockLengths
- number of elements in each blockdisplacements
- byte displacement of each blocktypes
- type of elements in each block- 返回:
- new datatype
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
createResized
Create a datatype with a new lower bound and extent from an existing datatype.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)- 返回:
- new datatype
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
setName
Sets the print name for the datatype.- 参数:
name
- name for the datatype- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getName
Return the print name from the datatype.- 返回:
- name of the datatype
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
createKeyval
Create a new attribute key.Java binding of the MPI operation
MPI_TYPE_CREATE_KEYVAL
.- 返回:
- attribute key for future access
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
freeKeyval
Frees an attribute key.Java binding of the MPI operation
MPI_TYPE_FREE_KEYVAL
.- 参数:
keyval
- attribute key- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
setAttr
Stores attribute value associated with a key.Java binding of the MPI operation
MPI_TYPE_SET_ATTR
.- 参数:
keyval
- attribute keyvalue
- attribute value- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getAttr
Retrieves attribute value by key.Java binding of the MPI operation
MPI_TYPE_GET_ATTR
.- 参数:
keyval
- attribute key- 返回:
- attribute value or null if no attribute is associated with the key.
- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
deleteAttr
Deletes an attribute value associated with a key.Java binding of the MPI operation
MPI_TYPE_DELETE_ATTR
.- 参数:
keyval
- attribute key- 抛出:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getOffset
Gets the offset of a buffer in bytes.- 参数:
buffer
- buffer- 返回:
- offset in bytes
-