# HPCxx_Reduct

The *HPCxx_Reduct* class is used to perform a reduction operation
on a group of threads. For example, you may want to compute the sum of a
number of indpendantly contrived integers. You can assign one thread to
handle the computation for each integer, then use the reduct class to
perform the gathering of the independant calculations and handle the
addition.
See the example for a thorough explanation.

## Class Definition

template <class T, class Oper>
class **HPCxx_Reduct**{
public:
HPCxx_Reduct(HPCxx_Group &, Oper op);
T operator()(int key, T &x);
T operator()(int key, T *buffer, int size);
...
};

Examples

hpc++@extreme.indiana.edu
*
Last modified: Thu Apr 22 02:07:33 EST 1999
*