Package mpi

Class Op

All Implemented Interfaces:
Freeable

public final class Op extends Object implements Freeable
This class represents MPI_Op.
  • Field Details

    • uf

      protected final UserFunction uf
    • handle

      protected long handle
  • Constructor Details

    • 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 Details

    • setDatatype

      protected void setDatatype(Datatype t)
    • call

      protected void call(Object invec, 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