QNANO
|
#include <Communicator.h>
Public Member Functions | |
virtual void | Barrier () const |
Emulates MPI_Barrier. | |
virtual void | Reduce_Sum_Complex (std::complex< double > &c) const |
virtual void | Reduce_Max_Double (double &d) const |
Maximal value from all thread is communicated to the root. | |
Goal:
Sometimes we want to be flexible whether we use MPI parallelization or not. If not, we don't want the dependency on MPI as compilation might be not straightforward on some systems.
This class is an abstraction that either performs communication between threads or does nothing if the program does not use MPI. This class treats the no-MPI case, but a derived class in the MPI directory will be derived to overload the functions for the parallel case.
|
inlinevirtual |
Takes complex numbers from each thread, sends them to the root (thread 0) and sums them. For the root, input and output pointers are the same
Reimplemented in MPI_Communicator.