QNANO
Public Member Functions | List of all members
Communicator Class Reference

#include <Communicator.h>

Inheritance diagram for Communicator:
Inheritance graph
[legend]

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.
 

Detailed Description

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.

Member Function Documentation

virtual void Communicator::Reduce_Sum_Complex ( std::complex< double > &  c) const
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.


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