Tulip_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 Tulip_Reduct{
public:
Tulip_Reduct(HPCxx_Group &, Oper op);
T operator()(int key, T &x);
T operator()(int key, T *buffer, int size);
...
};
Examples
Suvas Vajracharya