Class MPI
- java.lang.Object
-
- mpi.MPI
-
public final class MPI extends java.lang.ObjectMPI environment.
-
-
Field Summary
Fields Modifier and Type Field Description static intANY_SOURCEstatic intANY_TAGstatic intAPPNUMstatic OpBANDstatic DatatypeBOOLEANstatic OpBORstatic intBSEND_OVERHEADstatic OpBXORstatic DatatypeBYTEstatic intCARTstatic DatatypeCHARstatic IntracommCOMM_SELFstatic IntracommCOMM_WORLDstatic intCONGRUENTstatic DatatypeDATATYPE_NULLstatic intDISPLACEMENT_CURRENTstatic intDIST_GRAPHstatic intDISTRIBUTE_BLOCKstatic intDISTRIBUTE_CYCLICstatic intDISTRIBUTE_DFLT_DARGstatic intDISTRIBUTE_NONEstatic DatatypeDOUBLEstatic DatatypeDOUBLE_COMPLEXstatic DatatypeDOUBLE_INTStruct which must be used withdoubleInt.static DoubleIntdoubleIntStruct object forDOUBLE_INTdatatype.static intERR_ACCESSstatic intERR_AMODEstatic intERR_ARGstatic intERR_ASSERTstatic intERR_BAD_FILEstatic intERR_BASEstatic intERR_BUFFERstatic intERR_COMMstatic intERR_CONVERSIONstatic intERR_COUNTstatic intERR_DIMSstatic intERR_DISPstatic intERR_DUP_DATAREPstatic intERR_FILEstatic intERR_FILE_EXISTSstatic intERR_FILE_IN_USEstatic intERR_GROUPstatic intERR_IN_STATUSstatic intERR_INFOstatic intERR_INFO_KEYstatic intERR_INFO_NOKEYstatic intERR_INFO_VALUEstatic intERR_INTERNstatic intERR_IOstatic intERR_KEYVALstatic intERR_LASTCODEstatic intERR_LOCKTYPEstatic intERR_NAMEstatic intERR_NO_MEMstatic intERR_NO_SPACEstatic intERR_NO_SUCH_FILEstatic intERR_NOT_SAMEstatic intERR_OPstatic intERR_OTHERstatic intERR_PENDINGstatic intERR_PORTstatic intERR_QUOTAstatic intERR_RANKstatic intERR_READ_ONLYstatic intERR_REQUESTstatic intERR_RMA_CONFLICTstatic intERR_RMA_SYNCstatic intERR_ROOTstatic intERR_SERVICEstatic intERR_SIZEstatic intERR_SPAWNstatic intERR_SYSRESOURCEstatic intERR_TAGstatic intERR_TOPOLOGYstatic intERR_TRUNCATEstatic intERR_TYPEstatic intERR_UNKNOWNstatic intERR_UNSUPPORTED_DATAREPstatic intERR_UNSUPPORTED_OPERATIONstatic intERR_WINstatic ErrhandlerERRORS_ARE_FATALstatic ErrhandlerERRORS_RETURNstatic DatatypeFLOATstatic DatatypeFLOAT_COMPLEXstatic DatatypeFLOAT_INTStruct which must be used withfloatInt.static FloatIntfloatIntStruct object forFLOAT_INTdatatype.static intGRAPHstatic GroupGROUP_EMPTYstatic intHOSTstatic intIDENTstatic InfoINFO_ENVstatic InfoINFO_NULLstatic DatatypeINTstatic Int2int2Struct object forINT2datatype.static DatatypeINT2Struct which must be used withint2.static intIOstatic intKEYVAL_INVALIDstatic OpLANDstatic intLASTUSEDCODEstatic intLOCK_EXCLUSIVEstatic intLOCK_SHAREDstatic DatatypeLONGstatic DatatypeLONG_INTStruct which must be used withlongInt.static LongIntlongIntStruct object forLONG_INTdatatype.static OpLORstatic OpLXORstatic OpMAXstatic intMAX_DATAREP_STRINGstatic intMAX_INFO_KEYstatic intMAX_INFO_VALstatic intMAX_OBJECT_NAMEstatic intMAX_PORT_NAMEstatic OpMAXLOCGlobal maximum operator.static OpMINstatic OpMINLOCGlobal minimum operator.static intMODE_APPENDstatic intMODE_CREATEstatic intMODE_DELETE_ON_CLOSEstatic intMODE_EXCLstatic intMODE_NOCHECKstatic intMODE_NOPRECEDEstatic intMODE_NOPUTstatic intMODE_NOSTOREstatic intMODE_NOSUCCEEDstatic intMODE_RDONLYstatic intMODE_RDWRstatic intMODE_SEQUENTIALstatic intMODE_UNIQUE_OPENstatic intMODE_WRONLYstatic OpNO_OPstatic intORDER_Cstatic intORDER_FORTRANstatic DatatypePACKEDstatic intPROC_NULLstatic OpPRODstatic OpREPLACEstatic RequestREQUEST_NULLstatic intROOTstatic intSEEK_CURstatic intSEEK_ENDstatic intSEEK_SETstatic DatatypeSHORTstatic DatatypeSHORT_INTStruct which must be used withshortInt.static ShortIntshortIntStruct object forSHORT_INTdatatype.static intSIMILARstatic intSUBVERSIONstatic intSUCCESSstatic OpSUMstatic intTAG_UBstatic intTHREAD_FUNNELEDstatic intTHREAD_MULTIPLEstatic intTHREAD_SERIALIZEDstatic intTHREAD_SINGLEstatic intUNDEFINEDstatic intUNEQUALstatic intUNIVERSE_SIZEstatic intVERSIONstatic intWIN_BASEstatic intWIN_DISP_UNITstatic intWIN_SIZEstatic intWTIME_IS_GLOBAL
-
Constructor Summary
Constructors Constructor Description MPI()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static voidassertDirectBuffer(java.nio.Buffer buf)Asserts that a buffer is direct.protected static voidassertDirectBuffer(java.nio.Buffer sendbuf, java.nio.Buffer recvbuf)Asserts that buffers are direct.static voidattachBuffer(byte[] buffer)Attaches a user-provided buffer for sending.protected static java.lang.ObjectattrGet(byte[] value)protected static byte[]attrSet(java.lang.Object value)protected static voidcheck()Check if MPI has been initialized and hasn't been finalized.static byte[]detachBuffer()Removes an existing buffer (for use in sending).static voidFinalize()Finalize MPI.static java.lang.StringgetLibVersion()Returns the version of the MPI Librarystatic java.lang.StringgetProcessorName()Returns the name of the processor on which it is called.static VersiongetVersion()Returns a version object representing the version of MPI being used.static java.lang.String[]Init(java.lang.String[] args)Initialize MPI.static intInitThread(java.lang.String[] args, int required)Initialize MPI with threads.protected static booleanisDirectBuffer(java.lang.Object obj)Checks if an object is a direct buffer.static booleanisFinalized()Test if MPI has been finalized.protected static booleanisHeapBuffer(java.lang.Object obj)Checks if an object is a heap buffer.static booleanisInitialized()Test if MPI has been initialized.static booleanisThreadMain()Java binding of the MPI operationMPI_IS_THREAD_MAIN.static java.nio.ByteBuffernewByteBuffer(int capacity)Allocates a new direct byte buffer.static java.nio.CharBuffernewCharBuffer(int capacity)Allocates a new direct char buffer.static java.nio.DoubleBuffernewDoubleBuffer(int capacity)Allocates a new direct double buffer.static java.nio.FloatBuffernewFloatBuffer(int capacity)Allocates a new direct float buffer.static java.nio.IntBuffernewIntBuffer(int capacity)Allocates a new direct int buffer.static java.nio.LongBuffernewLongBuffer(int capacity)Allocates a new direct long buffer.static java.nio.ShortBuffernewShortBuffer(int capacity)Allocates a new direct short buffer.static intqueryThread()Java binding of the MPI operationMPI_QUERY_THREAD.static java.nio.ByteBufferslice(byte[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.CharBufferslice(char[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.DoubleBufferslice(double[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.FloatBufferslice(float[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.IntBufferslice(int[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.LongBufferslice(long[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.ShortBufferslice(short[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.ByteBufferslice(java.nio.ByteBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.CharBufferslice(java.nio.CharBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.DoubleBufferslice(java.nio.DoubleBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.FloatBufferslice(java.nio.FloatBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.IntBufferslice(java.nio.IntBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.LongBufferslice(java.nio.LongBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static java.nio.ShortBufferslice(java.nio.ShortBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.static doublewtick()Returns resolution of timer.static doublewtime()Returns an elapsed time on the calling processor.
-
-
-
Field Detail
-
COMM_WORLD
public static final Intracomm COMM_WORLD
-
COMM_SELF
public static final Intracomm COMM_SELF
-
THREAD_SINGLE
public static final int THREAD_SINGLE
-
THREAD_FUNNELED
public static final int THREAD_FUNNELED
-
THREAD_SERIALIZED
public static final int THREAD_SERIALIZED
-
THREAD_MULTIPLE
public static final int THREAD_MULTIPLE
-
GRAPH
public static final int GRAPH
-
DIST_GRAPH
public static final int DIST_GRAPH
-
CART
public static final int CART
-
ANY_SOURCE
public static final int ANY_SOURCE
-
ANY_TAG
public static final int ANY_TAG
-
MAX
public static final Op MAX
-
MIN
public static final Op MIN
-
SUM
public static final Op SUM
-
PROD
public static final Op PROD
-
LAND
public static final Op LAND
-
BAND
public static final Op BAND
-
LOR
public static final Op LOR
-
BOR
public static final Op BOR
-
LXOR
public static final Op LXOR
-
BXOR
public static final Op BXOR
-
REPLACE
public static final Op REPLACE
-
NO_OP
public static final Op NO_OP
-
MINLOC
public static final Op MINLOC
-
DATATYPE_NULL
public static final Datatype DATATYPE_NULL
-
BYTE
public static final Datatype BYTE
-
CHAR
public static final Datatype CHAR
-
SHORT
public static final Datatype SHORT
-
BOOLEAN
public static final Datatype BOOLEAN
-
INT
public static final Datatype INT
-
LONG
public static final Datatype LONG
-
FLOAT
public static final Datatype FLOAT
-
DOUBLE
public static final Datatype DOUBLE
-
PACKED
public static final Datatype PACKED
-
FLOAT_COMPLEX
public static final Datatype FLOAT_COMPLEX
-
DOUBLE_COMPLEX
public static final Datatype DOUBLE_COMPLEX
-
doubleInt
public static final DoubleInt doubleInt
Struct object forDOUBLE_INTdatatype.
-
REQUEST_NULL
public static final Request REQUEST_NULL
-
GROUP_EMPTY
public static final Group GROUP_EMPTY
-
INFO_ENV
public static final Info INFO_ENV
-
INFO_NULL
public static final Info INFO_NULL
-
PROC_NULL
public static final int PROC_NULL
-
UNDEFINED
public static final int UNDEFINED
-
IDENT
public static final int IDENT
-
CONGRUENT
public static final int CONGRUENT
-
SIMILAR
public static final int SIMILAR
-
UNEQUAL
public static final int UNEQUAL
-
TAG_UB
public static final int TAG_UB
-
HOST
public static final int HOST
-
IO
public static final int IO
-
WTIME_IS_GLOBAL
public static final int WTIME_IS_GLOBAL
-
APPNUM
public static final int APPNUM
-
LASTUSEDCODE
public static final int LASTUSEDCODE
-
UNIVERSE_SIZE
public static final int UNIVERSE_SIZE
-
WIN_BASE
public static final int WIN_BASE
-
WIN_SIZE
public static final int WIN_SIZE
-
WIN_DISP_UNIT
public static final int WIN_DISP_UNIT
-
VERSION
public static final int VERSION
-
SUBVERSION
public static final int SUBVERSION
-
ROOT
public static final int ROOT
-
KEYVAL_INVALID
public static final int KEYVAL_INVALID
-
BSEND_OVERHEAD
public static final int BSEND_OVERHEAD
-
MAX_OBJECT_NAME
public static final int MAX_OBJECT_NAME
-
MAX_PORT_NAME
public static final int MAX_PORT_NAME
-
MAX_DATAREP_STRING
public static final int MAX_DATAREP_STRING
-
MAX_INFO_KEY
public static final int MAX_INFO_KEY
-
MAX_INFO_VAL
public static final int MAX_INFO_VAL
-
ORDER_C
public static final int ORDER_C
-
ORDER_FORTRAN
public static final int ORDER_FORTRAN
-
DISTRIBUTE_BLOCK
public static final int DISTRIBUTE_BLOCK
-
DISTRIBUTE_CYCLIC
public static final int DISTRIBUTE_CYCLIC
-
DISTRIBUTE_NONE
public static final int DISTRIBUTE_NONE
-
DISTRIBUTE_DFLT_DARG
public static final int DISTRIBUTE_DFLT_DARG
-
MODE_CREATE
public static final int MODE_CREATE
-
MODE_RDONLY
public static final int MODE_RDONLY
-
MODE_WRONLY
public static final int MODE_WRONLY
-
MODE_RDWR
public static final int MODE_RDWR
-
MODE_DELETE_ON_CLOSE
public static final int MODE_DELETE_ON_CLOSE
-
MODE_UNIQUE_OPEN
public static final int MODE_UNIQUE_OPEN
-
MODE_EXCL
public static final int MODE_EXCL
-
MODE_APPEND
public static final int MODE_APPEND
-
MODE_SEQUENTIAL
public static final int MODE_SEQUENTIAL
-
DISPLACEMENT_CURRENT
public static final int DISPLACEMENT_CURRENT
-
SEEK_SET
public static final int SEEK_SET
-
SEEK_CUR
public static final int SEEK_CUR
-
SEEK_END
public static final int SEEK_END
-
MODE_NOCHECK
public static final int MODE_NOCHECK
-
MODE_NOPRECEDE
public static final int MODE_NOPRECEDE
-
MODE_NOPUT
public static final int MODE_NOPUT
-
MODE_NOSTORE
public static final int MODE_NOSTORE
-
MODE_NOSUCCEED
public static final int MODE_NOSUCCEED
-
LOCK_EXCLUSIVE
public static final int LOCK_EXCLUSIVE
-
LOCK_SHARED
public static final int LOCK_SHARED
-
ERRORS_ARE_FATAL
public static final Errhandler ERRORS_ARE_FATAL
-
ERRORS_RETURN
public static final Errhandler ERRORS_RETURN
-
SUCCESS
public static final int SUCCESS
-
ERR_BUFFER
public static final int ERR_BUFFER
-
ERR_COUNT
public static final int ERR_COUNT
-
ERR_TYPE
public static final int ERR_TYPE
-
ERR_TAG
public static final int ERR_TAG
-
ERR_COMM
public static final int ERR_COMM
-
ERR_RANK
public static final int ERR_RANK
-
ERR_REQUEST
public static final int ERR_REQUEST
-
ERR_ROOT
public static final int ERR_ROOT
-
ERR_GROUP
public static final int ERR_GROUP
-
ERR_OP
public static final int ERR_OP
-
ERR_TOPOLOGY
public static final int ERR_TOPOLOGY
-
ERR_DIMS
public static final int ERR_DIMS
-
ERR_ARG
public static final int ERR_ARG
-
ERR_UNKNOWN
public static final int ERR_UNKNOWN
-
ERR_TRUNCATE
public static final int ERR_TRUNCATE
-
ERR_OTHER
public static final int ERR_OTHER
-
ERR_INTERN
public static final int ERR_INTERN
-
ERR_IN_STATUS
public static final int ERR_IN_STATUS
-
ERR_PENDING
public static final int ERR_PENDING
-
ERR_ACCESS
public static final int ERR_ACCESS
-
ERR_AMODE
public static final int ERR_AMODE
-
ERR_ASSERT
public static final int ERR_ASSERT
-
ERR_BAD_FILE
public static final int ERR_BAD_FILE
-
ERR_BASE
public static final int ERR_BASE
-
ERR_CONVERSION
public static final int ERR_CONVERSION
-
ERR_DISP
public static final int ERR_DISP
-
ERR_DUP_DATAREP
public static final int ERR_DUP_DATAREP
-
ERR_FILE_EXISTS
public static final int ERR_FILE_EXISTS
-
ERR_FILE_IN_USE
public static final int ERR_FILE_IN_USE
-
ERR_FILE
public static final int ERR_FILE
-
ERR_INFO_KEY
public static final int ERR_INFO_KEY
-
ERR_INFO_NOKEY
public static final int ERR_INFO_NOKEY
-
ERR_INFO_VALUE
public static final int ERR_INFO_VALUE
-
ERR_INFO
public static final int ERR_INFO
-
ERR_IO
public static final int ERR_IO
-
ERR_KEYVAL
public static final int ERR_KEYVAL
-
ERR_LOCKTYPE
public static final int ERR_LOCKTYPE
-
ERR_NAME
public static final int ERR_NAME
-
ERR_NO_MEM
public static final int ERR_NO_MEM
-
ERR_NOT_SAME
public static final int ERR_NOT_SAME
-
ERR_NO_SPACE
public static final int ERR_NO_SPACE
-
ERR_NO_SUCH_FILE
public static final int ERR_NO_SUCH_FILE
-
ERR_PORT
public static final int ERR_PORT
-
ERR_QUOTA
public static final int ERR_QUOTA
-
ERR_READ_ONLY
public static final int ERR_READ_ONLY
-
ERR_RMA_CONFLICT
public static final int ERR_RMA_CONFLICT
-
ERR_RMA_SYNC
public static final int ERR_RMA_SYNC
-
ERR_SERVICE
public static final int ERR_SERVICE
-
ERR_SIZE
public static final int ERR_SIZE
-
ERR_SPAWN
public static final int ERR_SPAWN
-
ERR_UNSUPPORTED_DATAREP
public static final int ERR_UNSUPPORTED_DATAREP
-
ERR_UNSUPPORTED_OPERATION
public static final int ERR_UNSUPPORTED_OPERATION
-
ERR_WIN
public static final int ERR_WIN
-
ERR_LASTCODE
public static final int ERR_LASTCODE
-
ERR_SYSRESOURCE
public static final int ERR_SYSRESOURCE
-
-
Method Detail
-
Init
public static java.lang.String[] Init(java.lang.String[] args) throws MPIExceptionInitialize MPI.Java binding of the MPI operation
MPI_INIT.- Parameters:
args- arguments to themainmethod.- Returns:
- arguments
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
InitThread
public static int InitThread(java.lang.String[] args, int required) throws MPIExceptionInitialize MPI with threads.Java binding of the MPI operation
MPI_INIT_THREAD.- Parameters:
args- arguments to themainmethod.required- desired level of thread support- Returns:
- provided level of thread support
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
queryThread
public static int queryThread() throws MPIExceptionJava binding of the MPI operationMPI_QUERY_THREAD.- Returns:
- provided level of thread support
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
isThreadMain
public static boolean isThreadMain() throws MPIExceptionJava binding of the MPI operationMPI_IS_THREAD_MAIN.- Returns:
- true if it is the main thread
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
Finalize
public static void Finalize() throws MPIExceptionFinalize MPI.Java binding of the MPI operation
MPI_FINALIZE.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
wtime
public static double wtime() throws MPIExceptionReturns an elapsed time on the calling processor.Java binding of the MPI operation
MPI_WTIME.- Returns:
- time in seconds since an arbitrary time in the past.
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
wtick
public static double wtick() throws MPIExceptionReturns resolution of timer.Java binding of the MPI operation
MPI_WTICK.- Returns:
- resolution of
wtimein seconds. - Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
getVersion
public static Version getVersion()
Returns a version object representing the version of MPI being used.Java binding of the MPI operation
MPI_GET_VERSION.- Returns:
- A version object representing the version and subversion of MPI being used.
-
getLibVersion
public static java.lang.String getLibVersion()
Returns the version of the MPI LibraryJava binding of the MPI operation
MPI_GET_LIBRARY_VERSION.- Returns:
- A string representation of the MPI Library
-
getProcessorName
public static java.lang.String getProcessorName() throws MPIExceptionReturns the name of the processor on which it is called.Java binding of the MPI operation
MPI_GET_PROCESSOR_NAME.- Returns:
- A unique specifier for the actual node.
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
isInitialized
public static boolean isInitialized() throws MPIExceptionTest if MPI has been initialized.Java binding of the MPI operation
MPI_INITIALIZED.- Returns:
trueifInithas been called,falseotherwise.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
isFinalized
public static boolean isFinalized() throws MPIExceptionTest if MPI has been finalized.Java binding of the MPI operation
MPI_FINALIZED.- Returns:
trueifFinalizehas been called,falseotherwise.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
attachBuffer
public static void attachBuffer(byte[] buffer) throws MPIExceptionAttaches a user-provided buffer for sending.Java binding of the MPI operation
MPI_BUFFER_ATTACH.- Parameters:
buffer- initial buffer- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
detachBuffer
public static byte[] detachBuffer() throws MPIExceptionRemoves an existing buffer (for use in sending).Java binding of the MPI operation
MPI_BUFFER_DETACH.- Returns:
- initial buffer
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
check
protected static void check() throws MPIExceptionCheck if MPI has been initialized and hasn't been finalized.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
attrSet
protected static byte[] attrSet(java.lang.Object value) throws MPIException- Throws:
MPIException
-
attrGet
protected static java.lang.Object attrGet(byte[] value) throws MPIException- Throws:
MPIException
-
newByteBuffer
public static java.nio.ByteBuffer newByteBuffer(int capacity)
Allocates a new direct byte buffer.- Parameters:
capacity- The new buffer's capacity, in bytes- Returns:
- The new byte buffer
-
newCharBuffer
public static java.nio.CharBuffer newCharBuffer(int capacity)
Allocates a new direct char buffer.- Parameters:
capacity- The new buffer's capacity, in chars- Returns:
- The new char buffer
-
newShortBuffer
public static java.nio.ShortBuffer newShortBuffer(int capacity)
Allocates a new direct short buffer.- Parameters:
capacity- The new buffer's capacity, in shorts- Returns:
- The new short buffer
-
newIntBuffer
public static java.nio.IntBuffer newIntBuffer(int capacity)
Allocates a new direct int buffer.- Parameters:
capacity- The new buffer's capacity, in ints- Returns:
- The new int buffer
-
newLongBuffer
public static java.nio.LongBuffer newLongBuffer(int capacity)
Allocates a new direct long buffer.- Parameters:
capacity- The new buffer's capacity, in longs- Returns:
- The new long buffer
-
newFloatBuffer
public static java.nio.FloatBuffer newFloatBuffer(int capacity)
Allocates a new direct float buffer.- Parameters:
capacity- The new buffer's capacity, in floats- Returns:
- The new float buffer
-
newDoubleBuffer
public static java.nio.DoubleBuffer newDoubleBuffer(int capacity)
Allocates a new direct double buffer.- Parameters:
capacity- The new buffer's capacity, in doubles- Returns:
- The new double buffer
-
assertDirectBuffer
protected static void assertDirectBuffer(java.nio.Buffer buf)
Asserts that a buffer is direct.- Parameters:
buf- buffer
-
assertDirectBuffer
protected static void assertDirectBuffer(java.nio.Buffer sendbuf, java.nio.Buffer recvbuf)Asserts that buffers are direct.- Parameters:
sendbuf- The send bufferrecvbuf- The receive buffer
-
isDirectBuffer
protected static boolean isDirectBuffer(java.lang.Object obj)
Checks if an object is a direct buffer.- Parameters:
obj- object- Returns:
- true if the object is a direct buffer
-
isHeapBuffer
protected static boolean isHeapBuffer(java.lang.Object obj)
Checks if an object is a heap buffer.- Parameters:
obj- object- Returns:
- true if the object is a heap buffer
-
slice
public static java.nio.ByteBuffer slice(java.nio.ByteBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.CharBuffer slice(java.nio.CharBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.ShortBuffer slice(java.nio.ShortBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.IntBuffer slice(java.nio.IntBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.LongBuffer slice(java.nio.LongBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.FloatBuffer slice(java.nio.FloatBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.DoubleBuffer slice(java.nio.DoubleBuffer buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.ByteBuffer slice(byte[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.CharBuffer slice(char[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.ShortBuffer slice(short[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.IntBuffer slice(int[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.LongBuffer slice(long[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.FloatBuffer slice(float[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
slice
public static java.nio.DoubleBuffer slice(double[] buf, int offset)Creates a new buffer whose content is a shared subsequence of a buffer.The content of the new buffer will start at the specified offset.
- Parameters:
buf- bufferoffset- offset- Returns:
- the new buffer.
-
-