Package jromp.parallel.var.reduction
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 TypeMethodDescriptionCombines 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
Initializes the variable with the identity value of the reduction operation.- Parameters:
variable
- the variable to initialize.
-
combine
Combines two values of the reduction operation.- Parameters:
a
- the first value.b
- the second value.- Returns:
- the result of the combination.
-