The following classes provide shared reduction variables for each of the primitive types:
Type | Class |
boolean | SharedBoolean |
byte | SharedByte |
char | SharedCharacter |
double | SharedDouble |
float | SharedFloat |
int | SharedInteger |
long | SharedLong |
short | SharedShort |
The following classes provide shared reduction variables for arrays of each of the primitive types:
Type | Class |
boolean[] | SharedBooleanArray |
byte[] | SharedByteArray |
char[] | SharedCharacterArray |
double[] | SharedDoubleArray |
float[] | SharedFloatArray |
int[] | SharedIntegerArray |
long[] | SharedLongArray |
short[] | SharedShortArray |
Class Op is the abstract base class for a binary operation used to combine two values together during a reduction. The subclasses of class Op provide binary operations on different data types:
Type | Class |
boolean | BooleanOp |
byte | ByteOp |
char | CharacterOp |
double | DoubleOp |
float | FloatOp |
int | IntegerOp |
long | LongOp |
short | ShortOp |
Object | ObjectOp |
Each of these subclasses provides an op() method that can be overridden to compute the desired binary operation. Each of these subclasses also provides static instances for commonly-used binary operations like sum, product, maximum, and minimum.