LAMA
|
The halo is an internal data structure that describes the exchange of non-local values completely. More...
#include <Halo.hpp>
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. | |
Halo & | operator= (const Halo &other) |
const CommunicationPlan & | getRequiredPlan () const |
const CommunicationPlan & | getProvidesPlan () 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< IndexType > | mRequiredIndexes |
LAMAArray< IndexType > | mProvidesIndexes |
std::map< IndexType, IndexType > | mGlobal2Halo |
Friends | |
class | HaloBuilder |
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.
lama::Halo::Halo | ( | ) |
Constructor of a new 'empty' halo.
lama::Halo::Halo | ( | const Halo & | halo | ) |
Copy constructor.
References operator=().
lama::Halo::~Halo | ( | ) | [virtual] |
void lama::Halo::clear | ( | ) |
Clear the halo for zero matrix.
References lama::CommunicationPlan::clear(), lama::LAMAArray< T >::clear(), mGlobal2Halo, mProvidesIndexes, mProvidesPlan, mRequiredIndexes, and mRequiredPlan.
IndexType lama::Halo::getHaloSize | ( | ) | const [inline] |
Query the size for a halo to be allocated.
References mRequiredPlan, and lama::CommunicationPlan::totalQuantity().
Referenced by lama::SpecializedJacobi::iterateTyped(), lama::Redistributor::Redistributor(), setGlobal2Halo(), lama::DenseVector< T >::updateHalo(), lama::DenseVector< T >::updateHaloAsync(), and writeAt().
const std::map<IndexType, IndexType>& lama::Halo::getMap | ( | ) | const [inline] |
Referenced by lama::_StorageMethods::buildHalo().
const LAMAArray< IndexType > & lama::Halo::getProvidesIndexes | ( | ) | const [inline] |
const CommunicationPlan & lama::Halo::getProvidesPlan | ( | ) | const [inline] |
References mProvidesPlan.
Referenced by lama::SparseMatrix< T >::assignTransposeImpl(), lama::Redistributor::buildRowPlans(), lama::Redistributor::buildVPlans(), lama::Redistributor::exchangeHalo(), lama::StorageMethods< T >::exchangeHaloCSR(), lama::Redistributor::exchangeHaloN(), lama::SpecializedJacobi::iterateTyped(), lama::Redistributor::Redistributor(), lama::Communicator::updateHalo(), and lama::Communicator::updateHaloAsync().
const LAMAArray< IndexType > & lama::Halo::getRequiredIndexes | ( | ) | const [inline] |
References mRequiredIndexes.
Referenced by lama::MatrixStorage< T >::joinHalo().
const CommunicationPlan & lama::Halo::getRequiredPlan | ( | ) | const [inline] |
References mRequiredPlan.
Referenced by lama::SparseMatrix< T >::assignTransposeImpl(), lama::Redistributor::buildRowPlans(), lama::Redistributor::buildVPlans(), lama::Redistributor::exchangeHalo(), lama::StorageMethods< T >::exchangeHaloCSR(), lama::Redistributor::exchangeHaloN(), lama::SpecializedJacobi::iterateTyped(), lama::Redistributor::Redistributor(), lama::Communicator::updateHalo(), and lama::Communicator::updateHaloAsync().
IndexType lama::Halo::global2halo | ( | const IndexType | globalIndex | ) | const [inline] |
References mGlobal2Halo, and lama::nIndex.
Referenced by lama::Redistributor::Redistributor().
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().
lama::Halo::LAMA_LOG_DECL_STATIC_LOGGER | ( | logger | ) | [private] |
References mGlobal2Halo, mProvidesIndexes, mProvidesPlan, mRequiredIndexes, and mRequiredPlan.
Referenced by Halo().
void lama::Halo::setGlobal2Halo | ( | IndexType | globalIndex, |
IndexType | haloIndex | ||
) | [inline, protected] |
References getHaloSize(), LAMA_ASSERT_DEBUG, and mGlobal2Halo.
Referenced by lama::HaloBuilder::build().
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.
friend class HaloBuilder [friend] |
std::map<IndexType, IndexType> lama::Halo::mGlobal2Halo [private] |
Referenced by clear(), global2halo(), operator=(), and setGlobal2Halo().
LAMAArray<IndexType> lama::Halo::mProvidesIndexes [private] |
Referenced by lama::HaloBuilder::build(), clear(), getProvidesIndexes(), and operator=().
CommunicationPlan lama::Halo::mProvidesPlan [private] |
Referenced by lama::HaloBuilder::build(), clear(), getProvidesPlan(), isEmpty(), operator=(), and writeAt().
LAMAArray<IndexType> lama::Halo::mRequiredIndexes [private] |
Referenced by lama::HaloBuilder::build(), clear(), getRequiredIndexes(), and operator=().
CommunicationPlan lama::Halo::mRequiredPlan [private] |
Referenced by lama::HaloBuilder::build(), clear(), getHaloSize(), getRequiredPlan(), isEmpty(), operator=(), and writeAt().