Package mpi

Class Op

  • All Implemented Interfaces:
    Freeable

    public final class Op
    extends java.lang.Object
    implements Freeable
    This class represents MPI_Op.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected long handle  
      protected UserFunction uf  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Op​(int type)  
        Op​(UserFunction function, boolean commute)
      Bind a user-defined global reduction operation to an Op object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void call​(java.lang.Object invec, java.lang.Object inoutvec, int count)  
      void free()
      Java binding of the MPI operation MPI_OP_FREE.
      boolean isCommutative()
      Test if the operation is commutative.
      boolean isNull()
      Test if operation object is null.
      protected void setDatatype​(Datatype t)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • handle

        protected long handle
    • Constructor Detail

      • Op

        protected Op​(int type)
      • Op

        public Op​(UserFunction function,
                  boolean commute)
        Bind a user-defined global reduction operation to an Op object.

        Java binding of the MPI operation MPI_OP_CREATE.

        Parameters:
        function - user defined function
        commute - true if commutative, false otherwise
    • Method Detail

      • setDatatype

        protected void setDatatype​(Datatype t)
      • call

        protected void call​(java.lang.Object invec,
                            java.lang.Object inoutvec,
                            int count)
                     throws MPIException
        Throws:
        MPIException
      • isCommutative

        public boolean isCommutative()
        Test if the operation is commutative.

        Java binding of the MPI operation MPI_OP_COMMUTATIVE.

        Returns:
        true if commutative, false otherwise
      • free

        public void free()
                  throws MPIException
        Java binding of the MPI operation MPI_OP_FREE.
        Specified by:
        free in interface Freeable
        Throws:
        MPIException - Signals that an MPI exception of some sort has occurred.
      • isNull

        public boolean isNull()
        Test if operation object is null.
        Returns:
        true if the operation object is null, false otherwise