Interface ReductionOperation<T extends Serializable>

Type Parameters:
T - the type of the reduction operation.
All Known Implementing Classes:
BitwiseAnd, BitwiseOr, BitwiseXor, LogicalAnd, LogicalOr, Max, Min, Mul, Sum

public interface ReductionOperation<T extends Serializable>
Interface for reduction operations.

All reduction identifiers are defined in the point 5.5.3 Implicitly Declared OpenMP Reduction Identifiers .

  • Method Summary

    Modifier and Type
    Method
    Description
    combine(T a, T b)
    Combines two values of the reduction operation.
    Returns the identifier of the reduction operation.
    void
    initialize(Variable<T> variable)
    Initializes the variable with the identity value of the reduction operation.
  • Method Details

    • identifier

      String identifier()
      Returns the identifier of the reduction operation.
      Returns:
      String representation of the operation.
    • initialize

      void initialize(Variable<T> variable)
      Initializes the variable with the identity value of the reduction operation.
      Parameters:
      variable - the variable to initialize.
    • combine

      T combine(T a, T b)
      Combines two values of the reduction operation.
      Parameters:
      a - the first value.
      b - the second value.
      Returns:
      the result of the combination.