Package edu.rit.pj.reduction

Package edu.rit.pj.reduction contains classes for parallel reduction.

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.

The following classes provide shared reduction variables for each of the primitive types as well as type Object. These classes are intended to be used in an SMP parallel program for data items shared among all the threads in the program.

Type | Class
`boolean` | SharedBoolean
`byte` | SharedByte
`char` | SharedCharacter
`double` | SharedDouble
`float` | SharedFloat
`int` | SharedInteger
`long` | SharedLong
`short` | SharedShort
`Object` | SharedObject

The following classes provide shared reduction variables for arrays of each of the primitive types as well as array of type Object. These classes are intended to be used in an SMP parallel program for data arrays shared among all the threads in the program.

Type | Class
`boolean[]` | SharedBooleanArray
`byte[]` | SharedByteArray
`char[]` | SharedCharacterArray
`double[]` | SharedDoubleArray
`float[]` | SharedFloatArray
`int[]` | SharedIntegerArray
`long[]` | SharedLongArray
`short[]` | SharedShortArray
`Object[]` | SharedObjectArray