ALPSCore reference
Public Member Functions | Protected Member Functions | List of all members
alps::alea::mpi_reducer Struct Reference

#include <mpi.hpp>

Inheritance diagram for alps::alea::mpi_reducer:
Inheritance graph
Collaboration diagram for alps::alea::mpi_reducer:
Collaboration graph

Public Member Functions

 mpi_reducer (const mpi::communicator &comm=mpi::communicator(), int root=0)
 
reducer_setup get_setup () const override
 
long get_max (long data) const override
 
void reduce (view< double > data) const override
 
void reduce (view< long > data) const override
 
void commit () const override
 
const mpi::communicatorcomm () const
 
int root () const
 
bool am_root () const
 
- Public Member Functions inherited from alps::alea::reducer
virtual reducerclone ()
 
virtual ~reducer ()
 
void reduce (view< std::complex< double > > data) const
 
void reduce (view< complex_op< double > > data) const
 
void reduce (view< unsigned long > data) const
 

Protected Member Functions

template<typename T >
void inplace_reduce (view< T > data) const
 

Detailed Description

In-place sum-reduction via an MPI communicator.

Definition at line 38 of file mpi.hpp.

Constructor & Destructor Documentation

alps::alea::mpi_reducer::mpi_reducer ( const mpi::communicator comm = mpi::communicator(),
int  root = 0 
)
inline

Definition at line 42 of file mpi.hpp.

Member Function Documentation

bool alps::alea::mpi_reducer::am_root ( ) const
inline

Definition at line 75 of file mpi.hpp.

const mpi::communicator& alps::alea::mpi_reducer::comm ( ) const
inline

Definition at line 71 of file mpi.hpp.

void alps::alea::mpi_reducer::commit ( ) const
inlineoverridevirtual

Finish reduction of all data if deferred

Implements alps::alea::reducer.

Definition at line 69 of file mpi.hpp.

long alps::alea::mpi_reducer::get_max ( long  value) const
inlineoverridevirtual

Get maximum of scalar value over all instances (immediate)

Implements alps::alea::reducer.

Definition at line 58 of file mpi.hpp.

reducer_setup alps::alea::mpi_reducer::get_setup ( ) const
inlineoverridevirtual

Set-up reduction operation

Implements alps::alea::reducer.

Definition at line 50 of file mpi.hpp.

template<typename T >
void alps::alea::mpi_reducer::inplace_reduce ( view< T >  data) const
inlineprotected

Definition at line 79 of file mpi.hpp.

void alps::alea::mpi_reducer::reduce ( view< double >  data) const
inlineoverridevirtual

Reduce double data-set into data

Implements alps::alea::reducer.

Definition at line 65 of file mpi.hpp.

void alps::alea::mpi_reducer::reduce ( view< long >  data) const
inlineoverridevirtual

Reduce long data-set into data

Implements alps::alea::reducer.

Definition at line 67 of file mpi.hpp.

int alps::alea::mpi_reducer::root ( ) const
inline

Definition at line 73 of file mpi.hpp.


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