Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class mpij.Op

java.lang.Object
  |
  +--mpij.Op

public abstract class Op
extends java.lang.Object
Base class for system and user defined operations. User defined operations should extend this class and override methods for the supported types. The following predefined operations are available: MPI.MIN, MPI.MAX, MPI.BAND, MPI.BOR, MPI.BXOR, MPI.LAND, MPI.LOR, MPI.LXOR, MPI.SUM, MPI.PROD


Field Summary
static boolean commutative
          commutative defaults to true.
 
Method Summary
void apply2Boolean(boolean[] inBuf, int inStart, boolean[] outBuf, int outStart, int count)
          Called to evaluate this Op on inBuf and outBuf.
void apply2Byte(byte[] inBuf, int inStart, byte[] outBuf, int outStart, int count)
          Called to evaluate this Op on inBuf and outBuf.
void apply2Char(char[] inBuf, int inStart, char[] outBuf, int outStart, int count)
          Called to evaluate this Op on inBuf and outBuf.
void apply2Double(double[] inBuf, int inStart, double[] outBuf, int outStart, int count)
          Called to evaluate this Op on inBuf and outBuf.
void apply2Float(float[] inBuf, int inStart, float[] outBuf, int outStart, int count)
          Called to evaluate this Op on inBuf and outBuf.
void apply2Int(int[] inBuf, int inStart, int[] outBuf, int outStart, int count)
          Called to evaluate this Op on inBuf and outBuf.
void apply2Long(long[] inBuf, int inStart, long[] outBuf, int outStart, int count)
          Called to evaluate this Op on inBuf and outBuf.
void apply2Short(short[] inBuf, int inStart, short[] outBuf, int outStart, int count)
          Called to evaluate this Op on inBuf and outBuf.
void apply(java.lang.Object inBuf, int inStart, java.lang.Object outBuf, int outStart, int count, Datatype type)
          Called to evaluate this Op on inBuf and outBuf.
void apply(java.lang.Object inBuf, java.lang.Object outBuf, Datatype type)
          Called to evaluate this Op on inBuf and outBuf.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

commutative

public static boolean commutative
commutative defaults to true. User defined operations should be set commutative to false in a static initializer for operations which are not commutative.
Method Detail

apply

public void apply(java.lang.Object inBuf,
                  int inStart,
                  java.lang.Object outBuf,
                  int outStart,
                  int count,
                  Datatype type)
          throws MPIException
Called to evaluate this Op on inBuf and outBuf. The default implementation of this method will call the apply2 method. Ops should only override this method if they intend to operate on a non-primitive type (such as an arbitrary Java object)
Parameters:
inBuf - input buffer
inStart - start offset in inBuf
outBuf - input/output buffer
outStart - start offset in outBuf
count - number of elements in each buffer
type - Datatype of buffers

apply

public void apply(java.lang.Object inBuf,
                  java.lang.Object outBuf,
                  Datatype type)
          throws MPIException
Called to evaluate this Op on inBuf and outBuf. This method operates on the entire arrays of inBuf and outBuf (they should be the same size). The default implementation of this method will call the apply2 method. Ops should only override this method if they intend to operate on a non-primitive type (such as an arbitrary Java object)
Parameters:
inBuf - input buffer
outBuf - input/output buffer
type - Datatype of buffers

apply2Double

public void apply2Double(double[] inBuf,
                         int inStart,
                         double[] outBuf,
                         int outStart,
                         int count)
                 throws MPIException
Called to evaluate this Op on inBuf and outBuf. User-defined operations should override this method if they wish to support double. Default implementation throws an exception stating that this operation does not support double.
Parameters:
inBuf - input buffer
inStart - start offset in inBuf
outBuf - input/output buffer
outStart - start offset in outBuf
count - number of elements in each buffer

apply2Float

public void apply2Float(float[] inBuf,
                        int inStart,
                        float[] outBuf,
                        int outStart,
                        int count)
                throws MPIException
Called to evaluate this Op on inBuf and outBuf. User-defined operations should override this method if they wish to support float. Default implementation throws an exception stating that this operation does not support float.
Parameters:
inBuf - input buffer
inStart - start offset in inBuf
outBuf - input/output buffer
outStart - start offset in outBuf
count - number of elements in each buffer

apply2Long

public void apply2Long(long[] inBuf,
                       int inStart,
                       long[] outBuf,
                       int outStart,
                       int count)
               throws MPIException
Called to evaluate this Op on inBuf and outBuf. User-defined operations should override this method if they wish to support long. Default implementation throws an exception stating that this operation does not support long.
Parameters:
inBuf - input buffer
inStart - start offset in inBuf
outBuf - input/output buffer
outStart - start offset in outBuf
count - number of elements in each buffer

apply2Int

public void apply2Int(int[] inBuf,
                      int inStart,
                      int[] outBuf,
                      int outStart,
                      int count)
              throws MPIException
Called to evaluate this Op on inBuf and outBuf. User-defined operations should override this method if they wish to support int. Default implementation throws an exception stating that this operation does not support int.
Parameters:
inBuf - input buffer
inStart - start offset in inBuf
outBuf - input/output buffer
outStart - start offset in outBuf
count - number of elements in each buffer

apply2Short

public void apply2Short(short[] inBuf,
                        int inStart,
                        short[] outBuf,
                        int outStart,
                        int count)
                throws MPIException
Called to evaluate this Op on inBuf and outBuf. User-defined operations should override this method if they wish to support short. Default implementation throws an exception stating that this operation does not support short.
Parameters:
inBuf - input buffer
inStart - start offset in inBuf
outBuf - input/output buffer
outStart - start offset in outBuf
count - number of elements in each buffer

apply2Char

public void apply2Char(char[] inBuf,
                       int inStart,
                       char[] outBuf,
                       int outStart,
                       int count)
               throws MPIException
Called to evaluate this Op on inBuf and outBuf. User-defined operations should override this method if they wish to support char. Default implementation throws an exception stating that this operation does not support char.
Parameters:
inBuf - input buffer
inStart - start offset in inBuf
outBuf - input/output buffer
outStart - start offset in outBuf
count - number of elements in each buffer

apply2Byte

public void apply2Byte(byte[] inBuf,
                       int inStart,
                       byte[] outBuf,
                       int outStart,
                       int count)
               throws MPIException
Called to evaluate this Op on inBuf and outBuf. User-defined operations should override this method if they wish to support byte. Default implementation throws an exception stating that this operation does not support byte.
Parameters:
inBuf - input buffer
inStart - start offset in inBuf
outBuf - input/output buffer
outStart - start offset in outBuf
count - number of elements in each buffer

apply2Boolean

public void apply2Boolean(boolean[] inBuf,
                          int inStart,
                          boolean[] outBuf,
                          int outStart,
                          int count)
                  throws MPIException
Called to evaluate this Op on inBuf and outBuf. User-defined operations should override this method if they wish to support boolean. Default implementation throws an exception stating that this operation does not support boolean.
Parameters:
inBuf - input buffer
inStart - start offset in inBuf
outBuf - input/output buffer
outStart - start offset in outBuf
count - number of elements in each buffer

Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD