LAMA
lama::Halo Class Reference

The halo is an internal data structure that describes the exchange of non-local values completely. More...

#include <Halo.hpp>

Inheritance diagram for lama::Halo:

Public Member Functions

 Halo ()
 Constructor of a new 'empty' halo.
 Halo (const Halo &halo)
 Copy constructor.
virtual ~Halo ()
void clear ()
 Clear the halo for zero matrix.
Halooperator= (const Halo &other)
const CommunicationPlangetRequiredPlan () const
const CommunicationPlangetProvidesPlan () const
IndexType global2halo (const IndexType globalIndex) const
const LAMAArray< IndexType > & getProvidesIndexes () const
const LAMAArray< IndexType > & getRequiredIndexes () const
IndexType getHaloSize () const
 Query the size for a halo to be allocated.
bool isEmpty () const
 If a halo is empty, no communication is needed for this partition.
const std::map< IndexType,
IndexType > & 
getMap () const
virtual void writeAt (std::ostream &stream) const
 This method writes info about the halo into an output stream.

Protected Member Functions

void setGlobal2Halo (IndexType globalIndex, IndexType haloIndex)

Private Member Functions

 LAMA_LOG_DECL_STATIC_LOGGER (logger)

Private Attributes

CommunicationPlan mRequiredPlan
CommunicationPlan mProvidesPlan
LAMAArray< IndexTypemRequiredIndexes
LAMAArray< IndexTypemProvidesIndexes
std::map< IndexType, IndexTypemGlobal2Halo

Friends

class HaloBuilder

Detailed Description

The halo is an internal data structure that describes the exchange of non-local values completely.

It is build by the required (global) indexes to set up communication plans to receive required data and to send data provided for other partitions.


Constructor & Destructor Documentation

Constructor of a new 'empty' halo.

lama::Halo::Halo ( const Halo halo)

Copy constructor.

References operator=().

lama::Halo::~Halo ( ) [virtual]

Member Function Documentation

const std::map<IndexType, IndexType>& lama::Halo::getMap ( ) const [inline]
IndexType lama::Halo::global2halo ( const IndexType  globalIndex) const [inline]
bool lama::Halo::isEmpty ( ) const [inline]

If a halo is empty, no communication is needed for this partition.

Be careful: getHaloSize() == 0 implies that no indexes are required but it might be possible that this partition has to provide values

References mProvidesPlan, mRequiredPlan, and lama::CommunicationPlan::totalQuantity().

Referenced by lama::SpecializedJacobi::iterateTyped().

Halo & lama::Halo::operator= ( const Halo other)
void lama::Halo::setGlobal2Halo ( IndexType  globalIndex,
IndexType  haloIndex 
) [inline, protected]
void lama::Halo::writeAt ( std::ostream &  stream) const [virtual]

This method writes info about the halo into an output stream.

Reimplemented from Printable.

References getHaloSize(), mProvidesPlan, and mRequiredPlan.


Friends And Related Function Documentation

friend class HaloBuilder [friend]

Field Documentation


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