STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::runtime::reduce< T, BinaryOperation > Class Template Reference

Distributed memory collective reduce. More...

Public Member Functions

template<typename Function >
 reduce (const gang_id gid, const collective_id cid, topology const &t, Function &&f, BinaryOperation op=BinaryOperation{})
 Constructs an reduce object. More...
 
void operator() (T const &t)
 
void operator() (T &&t)
 

Public Types

using value_type = T
 

Detailed Description

template<typename T, typename BinaryOperation>
class stapl::runtime::reduce< T, BinaryOperation >

Distributed memory collective reduce.

Template Parameters
TObject type.
BinaryOperationBinary operation function object type to be applied.
Warning
This class supports only commutative reductions.
See also
collective

Constructor & Destructor Documentation

◆ reduce()

template<typename T, typename BinaryOperation>
template<typename Function >
stapl::runtime::reduce< T, BinaryOperation >::reduce ( const gang_id  gid,
const collective_id  cid,
topology const &  t,
Function &&  f,
BinaryOperation  op = BinaryOperation{} 
)

Constructs an reduce object.

Parameters
gidId of the gang the collective executes in.
cidCollective operation id.
ttopology object associated with the gang.
fFunction to call when the collective has finished.
opReduction operator.

The documentation for this class was generated from the following file: