#include <Reducer.h>
|
typedef T(* | ReductionOp )(const T &, const T &) |
| The function that performs the reduction. More...
|
|
typedef T(* ReductionOp)(const T &, const T &) |
The function that performs the reduction.
Create a Reducer. At each operation, a barrier wait is performed, and the operation will be performed to compute the global balue. name should be a static string which describes the primitive for debugging purposes. op is a function which will compute a reduced value from a pair of values. op should be associative and commutative, even up to floating point errors.
Destroy the Reducer and free associated memory.
T reduce |
( |
int |
myrank, |
|
|
int |
numThreads, |
|
|
const T & |
value |
|
) |
| |
Performs a global reduction over all of the threads. As soon as each thread has called reduce with their local value, each thread will return the same global reduced value.
The documentation for this class was generated from the following file: