Modifier and Type | Field and Description |
---|---|
protected long |
handle |
protected java.nio.Buffer |
recvBuf |
protected java.nio.Buffer |
sendBuf |
Modifier | Constructor and Description |
---|---|
protected |
Request(long handle) |
Modifier and Type | Method and Description |
---|---|
protected void |
addRecvBufRef(java.nio.Buffer buf)
Adds a receive buffer to this Request object.
|
protected void |
addSendBufRef(java.nio.Buffer buf)
Adds a send buffer to this Request object.
|
void |
cancel()
Mark a pending nonblocking communication for cancellation.
|
void |
free()
Set the request object to be void.
|
protected static long[] |
getHandles(Request[] r) |
protected static long |
getNull() |
Status |
getStatus()
Returns a status object if the operation identified by the request
is complete, or a null reference otherwise.
|
boolean |
isNull()
Test if request object is null.
|
protected static void |
setHandles(Request[] r,
long[] h) |
boolean |
test()
Returns true if the operation identified by the request
is complete, or false otherwise.
|
static boolean |
testAll(Request[] requests)
Tests for completion of all of the operations associated
with active requests.
|
static Status[] |
testAllStatus(Request[] requests)
Tests for completion of all of the operations associated
with active requests.
|
static int |
testAny(Request[] requests)
Tests for completion of either one or none of the operations
associated with active requests.
|
static Status |
testAnyStatus(Request[] requests)
Tests for completion of either one or none of the operations
associated with active requests.
|
static int[] |
testSome(Request[] requests)
Behaves like
waitSome , except that it returns immediately. |
static Status[] |
testSomeStatus(Request[] requests)
Behaves like
waitSome , except that it returns immediately. |
Status |
testStatus()
Returns a status object if the operation identified by the request
is complete, or a null reference otherwise.
|
static void |
waitAll(Request[] requests)
Blocks until all of the operations associated with the active
requests in the array have completed.
|
static Status[] |
waitAllStatus(Request[] requests)
Blocks until all of the operations associated with the active
requests in the array have completed.
|
static int |
waitAny(Request[] requests)
Blocks until one of the operations associated with the active
requests in the array has completed.
|
static Status |
waitAnyStatus(Request[] requests)
Blocks until one of the operations associated with the active
requests in the array has completed.
|
void |
waitFor()
Blocks until the operation identified by the request is complete.
|
static int[] |
waitSome(Request[] requests)
Blocks until at least one of the operations associated with the active
active requests in the array has completed.
|
static Status[] |
waitSomeStatus(Request[] requests)
Blocks until at least one of the operations associated with the active
requests in the array has completed.
|
Status |
waitStatus()
Blocks until the operation identified by the request is complete.
|
protected long handle
protected java.nio.Buffer sendBuf
protected java.nio.Buffer recvBuf
protected static long getNull()
public void free() throws MPIException
MPI_REQUEST_FREE
.free
in interface Freeable
MPIException
- Signals that an MPI error of some sort has occurred.public final void cancel() throws MPIException
MPI_CANCEL
.MPIException
- Signals that an MPI error of some sort has occurred.protected final void addRecvBufRef(java.nio.Buffer buf)
buf
- buffer to add to the array listprotected final void addSendBufRef(java.nio.Buffer buf)
buf
- buffer to add to the array listpublic final boolean isNull()
public final Status waitStatus() throws MPIException
Java binding of the MPI operation MPI_WAIT
.
After the call returns, the request object becomes inactive.
MPIException
- Signals that an MPI error of some sort has occurred.public final void waitFor() throws MPIException
Java binding of the MPI operation MPI_WAIT
.
After the call returns, the request object becomes inactive.
MPIException
- Signals that an MPI error of some sort has occurred.public final Status testStatus() throws MPIException
Java binding of the MPI operation MPI_TEST
.
After the call, if the operation is complete (ie, if the return value is non-null), the request object becomes inactive.
MPIException
- Signals that an MPI error of some sort has occurred.public final Status getStatus() throws MPIException
Java binding of the MPI operation MPI_REQUEST_GET_STATUS
.
After the call, if the operation is complete (ie, if the return value is non-null), the request object remains active.
MPIException
- Signals that an MPI error of some sort has occurred.public final boolean test() throws MPIException
Java binding of the MPI operation MPI_TEST
.
After the call, if the operation is complete (ie, if the return value is true), the request object becomes inactive.
MPIException
- Signals that an MPI error of some sort has occurred.public static Status waitAnyStatus(Request[] requests) throws MPIException
Java binding of the MPI operation MPI_WAITANY
.
The index in array of requests
for the request that
completed can be obtained from the returned status object through
the Status.getIndex()
method. The corresponding element
of array of requests
becomes inactive.
requests
- array of requestsMPIException
- Signals that an MPI error of some sort has occurred.public static int waitAny(Request[] requests) throws MPIException
Java binding of the MPI operation MPI_WAITANY
.
The request that completed becomes inactive.
requests
- array of requestsrequests
for the request that
completed. If all of the requests are MPI_REQUEST_NULL, then index
is returned as MPI.UNDEFINED
.MPIException
- Signals that an MPI error of some sort has occurred.public static Status testAnyStatus(Request[] requests) throws MPIException
Java binding of the MPI operation MPI_TESTANY
.
If some request completed, the index in array of requests
for that request can be obtained from the returned status object.
The corresponding element in array of requests
becomes inactive.
If no request completed, testAnyStatus
returns null
.
requests
- array of requestsnull
otherwise.MPIException
- Signals that an MPI error of some sort has occurred.public static int testAny(Request[] requests) throws MPIException
Java binding of the MPI operation MPI_TESTANY
.
If some request completed, it becomes inactive.
requests
- array of requestsMPI.UNDEFINED
if none completed.MPIException
- Signals that an MPI error of some sort has occurred.public static Status[] waitAllStatus(Request[] requests) throws MPIException
Java binding of the MPI operation MPI_WAITALL
.
On exit, requests become inactive. If the input value of
array of requests
contains inactive requests, corresponding
elements of the status array will contain null status references.
requests
- array of requestsMPIException
- Signals that an MPI error of some sort has occurred.public static void waitAll(Request[] requests) throws MPIException
Java binding of the MPI operation MPI_WAITALL
.
requests
- array of requestsMPIException
- Signals that an MPI error of some sort has occurred.public static Status[] testAllStatus(Request[] requests) throws MPIException
Java binding of the MPI operation MPI_TESTALL
.
If all operations have completed, the exit value of the argument array
is as for waitAllStatus
.
requests
- array of requestsnull
otherwise.MPIException
- Signals that an MPI error of some sort has occurred.public static boolean testAll(Request[] requests) throws MPIException
Java binding of the MPI operation MPI_TESTALL
.
requests
- array of requeststrue
if all operations have completed,
false
otherwise.MPIException
- Signals that an MPI error of some sort has occurred.public static Status[] waitSomeStatus(Request[] requests) throws MPIException
Java binding of the MPI operation MPI_WAITSOME
.
The size of the result array will be the number of operations that
completed. The index in array of requests
for each request that
completed can be obtained from the returned status objects through the
Status.getIndex()
method. The corresponding element in
array of requests
becomes inactive.
requests
- array of requestsnull
if the number of operations
completed is MPI_UNDEFINED
.MPIException
- Signals that an MPI error of some sort has occurred.public static int[] waitSome(Request[] requests) throws MPIException
Java binding of the MPI operation MPI_WAITSOME
.
The size of the result array will be the number of operations that
completed. The corresponding element in array of requests
becomes
inactive.
requests
- array of requestsrequests
that completed or null
if the number of operations completed is MPI_UNDEFINED
.MPIException
- Signals that an MPI error of some sort has occurred.public static Status[] testSomeStatus(Request[] requests) throws MPIException
waitSome
, except that it returns immediately.
Java binding of the MPI operation MPI_TESTSOME
.
If no operation has completed, testSome
returns an array of
length zero, otherwise the return value are as for waitSome
.
requests
- array of requestsMPIException
- Signals that an MPI error of some sort has occurred.public static int[] testSome(Request[] requests) throws MPIException
waitSome
, except that it returns immediately.
Java binding of the MPI operation MPI_TESTSOME
.
If no operation has completed, testSome
returns an array of
length zero, otherwise the return value are as for waitSome
.
requests
- array of requestsrequests
that completed.MPIException
- Signals that an MPI error of some sort has occurred.protected static long[] getHandles(Request[] r)
protected static void setHandles(Request[] r, long[] h)