xdev.mxdev
Class MXDevice

java.lang.Object
  extended by xdev.Device
      extended by xdev.mxdev.MXDevice

public class MXDevice
extends Device


Field Summary
 
Fields inherited from class xdev.Device
ANY_SOURCE, ANY_SRC, ANY_TAG, deviceName
 
Constructor Summary
MXDevice()
           
 
Method Summary
 void finish()
          This method shutdowns the device.
 int getRecvOverhead()
           
 int getSendOverhead()
           
 ProcessID id()
          This method returns the id of the current process
 ProcessID[] init(java.lang.String[] args)
          Initialize the xdev device.
 Status iprobe(ProcessID srcID, int tag, int context)
          This method is the non-blocking probe.
 Request irecv(Buffer buf, ProcessID srcID, int tag, int context, Status status)
          This method is the non-blocking recv.
 Request isend(Buffer buf, ProcessID dstID, int tag, int context)
          This method is the non-blocking send using standard-mode.
 Request issend(Buffer buf, ProcessID dstID, int tag, int context)
          This method is the non-blocking send using synchronous-mode.
 Request peek()
           
 Status probe(ProcessID srcID, int tag, int context)
          This method is the blocking probe.
 Status recv(Buffer buf, ProcessID srcID, int tag, int context)
          This method is the blocking recv.
 void send(Buffer buf, ProcessID dstID, int tag, int context)
          This method is the blocking send using standard-mode.
 void ssend(Buffer buf, ProcessID dstID, int tag, int context)
          This method is the blocking send using synchronous-mode.
 
Methods inherited from class xdev.Device
newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MXDevice

public MXDevice()
Method Detail

init

public ProcessID[] init(java.lang.String[] args)
                 throws XDevException
Description copied from class: Device
Initialize the xdev device. Specific implementations perform initialization of the device in this method.

Specified by:
init in class Device
Parameters:
args - Argument array.
Returns:
xdev.ProcessID[] An array with length equal to total number of processes, and each ProcessID element representing a process.
Throws:
XDevException - If there is an error initializing the device

getSendOverhead

public int getSendOverhead()
Specified by:
getSendOverhead in class Device

getRecvOverhead

public int getRecvOverhead()
Specified by:
getRecvOverhead in class Device

id

public ProcessID id()
Description copied from class: Device
This method returns the id of the current process

Specified by:
id in class Device
Returns:
xdev.ProcessID ProcessID of the current process.

finish

public void finish()
            throws XDevException
Description copied from class: Device
This method shutdowns the device.

Specified by:
finish in class Device
Throws:
XDevException

isend

public Request isend(Buffer buf,
                     ProcessID dstID,
                     int tag,
                     int context)
              throws XDevException
Description copied from class: Device
This method is the non-blocking send using standard-mode.

Specified by:
isend in class Device
Parameters:
buf - mpjbuf.Buffer object containing the data
dstID - ProcessID of the destination process
tag - An integer representing the tag (id) of the message
context - An integer specifying context.
Returns:
mpjdev.Request Request object that can be used to check the status and/or progress of the communication.
Throws:
XDevException - If there is an exception. The specific exception depends on the device.

send

public void send(Buffer buf,
                 ProcessID dstID,
                 int tag,
                 int context)
          throws XDevException
Description copied from class: Device
This method is the blocking send using standard-mode.

Specified by:
send in class Device
Parameters:
buf - mpjbuf.Buffer object containing the data
dstID - ProcessID of the destination process
tag - An integer representing the tag (id) of the message
context - An integer specifying context.
Throws:
XDevException - If there is an exception. The specific exception depends on the device.

issend

public Request issend(Buffer buf,
                      ProcessID dstID,
                      int tag,
                      int context)
               throws XDevException
Description copied from class: Device
This method is the non-blocking send using synchronous-mode.

Specified by:
issend in class Device
Parameters:
buf - mpjbuf.Buffer object containing the data
dstID - ProcessID of the destination process
tag - An integer representing the tag (id) of the message
context - An integer specifying context.
Returns:
mpjdev.Request Request object that can be used to check the status and/or progress of the communication.
Throws:
XDevException - If there is an exception. The specific exception depends on the device.

ssend

public void ssend(Buffer buf,
                  ProcessID dstID,
                  int tag,
                  int context)
           throws XDevException
Description copied from class: Device
This method is the blocking send using synchronous-mode.

Specified by:
ssend in class Device
Parameters:
buf - mpjbuf.Buffer object containing the data
dstID - ProcessID of the destination process
tag - An integer representing the tag (id) of the message
context - An integer specifying context.
Throws:
XDevException - If there is an exception. The specific exception depends on the device.

recv

public Status recv(Buffer buf,
                   ProcessID srcID,
                   int tag,
                   int context)
            throws XDevException
Description copied from class: Device
This method is the blocking recv.

Specified by:
recv in class Device
Parameters:
buf - mpjbuf.Buffer object containing the data
srcID - ProcessID of the source process
tag - An integer representing the tag (id) of the message
context - An integer specifying context.
Returns:
mpjdev.Status Status object that can be used to check the status of the communication.
Throws:
XDevException - If there is an exception. The specific exception depends on the device.

irecv

public Request irecv(Buffer buf,
                     ProcessID srcID,
                     int tag,
                     int context,
                     Status status)
              throws XDevException
Description copied from class: Device
This method is the non-blocking recv.

Specified by:
irecv in class Device
Parameters:
buf - mpjbuf.Buffer object containing the data
srcID - ProcessID of the source process
tag - An integer representing the tag (id) of the message
context - An integer specifying context.
status - A mpjdev.Status object initialized at mpjdev/MPJ level.
Returns:
mpjdev.Request Request object that can be used to check the status of the communication.
Throws:
XDevException - If there is an exception. The specific exception depends on the device.

probe

public Status probe(ProcessID srcID,
                    int tag,
                    int context)
             throws XDevException
Description copied from class: Device
This method is the blocking probe.

Specified by:
probe in class Device
Parameters:
srcID - ProcessID of the source process
tag - An integer representing the tag (id) of the message
context - An integer specifying context.
Returns:
mpjdev.Status Status object that can be used to check the status of the communication.
Throws:
XDevException - If there is an exception. The specific exception depends on the device.

iprobe

public Status iprobe(ProcessID srcID,
                     int tag,
                     int context)
              throws XDevException
Description copied from class: Device
This method is the non-blocking probe.

Specified by:
iprobe in class Device
Parameters:
srcID - ProcessID of the source process
tag - An integer representing the tag (id) of the message
context - An integer specifying context.
Returns:
mpjdev.Status Status object if the communication has completed or null otherwise.
Throws:
XDevException - If there is an exception. The specific exception depends on the device.

peek

public Request peek()
             throws XDevException
Specified by:
peek in class Device
Throws:
XDevException