Package jromp.var.reduction
Class ReductionOperations
java.lang.Object
jromp.var.reduction.ReductionOperations
Operations for reduction variables.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Number>
ReductionOperation<T> band()
Returns a bitwise AND operation.static <T extends Number>
ReductionOperation<T> bor()
Returns a bitwise OR operation.static <T extends Number>
ReductionOperation<T> bxor()
Returns a bitwise XOR operation.static <T extends Serializable>
ReductionOperation<T> fromIdentifier
(String identifier) Returns a reduction operation from an identifier.static ReductionOperation
<Boolean> land()
Returns a logical AND operation.static ReductionOperation
<Boolean> lor()
Returns a logical OR operation.static <T extends Number>
ReductionOperation<T> max()
Returns a maximum operation.static <T extends Number>
ReductionOperation<T> min()
Returns a minimum operation.static <T extends Number>
ReductionOperation<T> mul()
Returns a multiplication operation.static <T extends Number>
ReductionOperation<T> sum()
Returns a sum operation.
-
Method Details
-
sum
Returns a sum operation.- Type Parameters:
T
- the type of the values to sum.- Returns:
- the sum operation.
-
mul
Returns a multiplication operation.- Type Parameters:
T
- the type of the values to multiply.- Returns:
- the multiplication operation.
-
band
Returns a bitwise AND operation.- Type Parameters:
T
- the type of the values to AND.- Returns:
- the bitwise AND operation.
-
bor
Returns a bitwise OR operation.- Type Parameters:
T
- the type of the values to OR.- Returns:
- the bitwise OR operation.
-
bxor
Returns a bitwise XOR operation.- Type Parameters:
T
- the type of the values to XOR.- Returns:
- the bitwise XOR operation.
-
land
Returns a logical AND operation.- Returns:
- the logical AND operation.
-
lor
Returns a logical OR operation.- Returns:
- the logical OR operation.
-
max
Returns a maximum operation.- Type Parameters:
T
- the type of the values to compare.- Returns:
- the maximum operation.
-
min
Returns a minimum operation.- Type Parameters:
T
- the type of the values to compare.- Returns:
- the minimum operation.
-
fromIdentifier
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.
-