|
RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
|
Max multi reducer class template. More...
Max multi reducer class template.
Usage example:
Real_ptr data = ...;
Index_ptr bins = ...;
Real_ptr max_vals = ...;
MultiReduceMax<multi_reduce_policy, Real_type> my_maxs(num_bins, init_val);
forall<exec_policy>( ..., [=] (Index_type i) {
my_maxs[bins[i]].max(data[i]);
}
for (size_t bin = 0; bin < num_bins; ++bin) {
max_vals[bin] = my_maxs[bin].get();
}
*