ALPSCore reference
|
#include <core.hpp>
Public Member Functions | |
virtual reducer_setup | get_setup () const =0 |
virtual long | get_max (long value) const =0 |
virtual void | reduce (view< double > data) const =0 |
virtual void | reduce (view< long > data) const =0 |
virtual void | commit () const =0 |
virtual reducer * | clone () |
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 |
Interface to performing sum-reduction with data from reducer source.
Applications will typically start by checking get_setup()
to find out whether this core/thread will get a copy of the result, but this is not required
The reduce()
family of methods take the data view and add to it the data from the reducers source (possibly by performing an MPI/OpenMP reduction or gathering data from files, etc.).
Reducers need not perform the reductions immediately (they are allowed to group them for increased performance.) A call to commit()
marks a synchronization point, after which the sum-reduced data must be available on all instances which have reducer_setup.have_result
set.
This facade allows us to abstract away the type of reduction, but most importantly does not pull in a mandatory MPI dependency for the use of the accumulators.
|
inlinevirtual |
|
inlinevirtual |
|
pure virtual |
Finish reduction of all data if deferred
Implemented in alps::alea::mpi_reducer.
|
pure virtual |
Get maximum of scalar value over all instances (immediate)
Implemented in alps::alea::mpi_reducer.
|
pure virtual |
Set-up reduction operation
Implemented in alps::alea::mpi_reducer.
|
pure virtual |
Reduce double data-set into data
Implemented in alps::alea::mpi_reducer.
|
pure virtual |
Reduce long data-set into data
Implemented in alps::alea::mpi_reducer.
|
inline |
|
inline |
|
inline |