Class ReductionOperations

java.lang.Object
jromp.var.reduction.ReductionOperations

public class ReductionOperations extends Object
Operations for reduction variables.
  • Method Details

    • sum

      public static <T extends Number> ReductionOperation<T> sum()
      Returns a sum operation.
      Type Parameters:
      T - the type of the values to sum.
      Returns:
      the sum operation.
    • mul

      public static <T extends Number> ReductionOperation<T> mul()
      Returns a multiplication operation.
      Type Parameters:
      T - the type of the values to multiply.
      Returns:
      the multiplication operation.
    • band

      public static <T extends Number> ReductionOperation<T> band()
      Returns a bitwise AND operation.
      Type Parameters:
      T - the type of the values to AND.
      Returns:
      the bitwise AND operation.
    • bor

      public static <T extends Number> ReductionOperation<T> bor()
      Returns a bitwise OR operation.
      Type Parameters:
      T - the type of the values to OR.
      Returns:
      the bitwise OR operation.
    • bxor

      public static <T extends Number> ReductionOperation<T> bxor()
      Returns a bitwise XOR operation.
      Type Parameters:
      T - the type of the values to XOR.
      Returns:
      the bitwise XOR operation.
    • land

      public static ReductionOperation<Boolean> land()
      Returns a logical AND operation.
      Returns:
      the logical AND operation.
    • lor

      public static ReductionOperation<Boolean> lor()
      Returns a logical OR operation.
      Returns:
      the logical OR operation.
    • max

      public static <T extends Number> ReductionOperation<T> max()
      Returns a maximum operation.
      Type Parameters:
      T - the type of the values to compare.
      Returns:
      the maximum operation.
    • min

      public static <T extends Number> ReductionOperation<T> min()
      Returns a minimum operation.
      Type Parameters:
      T - the type of the values to compare.
      Returns:
      the minimum operation.
    • fromIdentifier

      public static <T extends Serializable> ReductionOperation<T> fromIdentifier(String identifier)
      Returns a reduction operation from an identifier.
      Type Parameters:
      T - the type of the values to reduce.
      Parameters:
      identifier - the identifier of the operation.
      Returns:
      the reduction operation.
      Throws:
      IllegalArgumentException - if the identifier is unknown.