ug4
pcl::SingleLevelLayout< TInterface > Class Template Reference

the standard single-level-layout implementation More...

#include <pcl_communication_structs.h>

Public Types

typedef layout_tags::single_level_layout_tag category_tag
 Layout category. More...
 
typedef InterfaceMap::const_iterator const_iterator
 
typedef Interface::Element Element
 Element type. More...
 
typedef TInterface Interface
 Interface type. More...
 
typedef std::map< int, TInterface > InterfaceMap
 an interface-map is a list of interfaces, each associated with a process id. More...
 
typedef InterfaceMap::iterator iterator
 An iterator that allows to iterate over the interfaces stored in the layout. More...
 
typedef Interface::Type Type
 Type. More...
 

Public Member Functions

iterator begin (size_t level=0)
 returns the iterator to the first interface of the layout. More...
 
const_iterator begin (size_t level=0) const
 
void clear ()
 clears the layout More...
 
bool empty (size_t level=0) const
 returns true if the layout has no interfaces. More...
 
iterator end (size_t level=0)
 returns the iterator to the last interface of the layout. More...
 
const_iterator end (size_t level=0) const
 
iterator erase (iterator iter, size_t level=0)
 erases the interface at the given iterator. More...
 
bool has_interface_elements () const
 returns true if the layout contains interface elements More...
 
const Interfaceinterface (const_iterator iter) const
 
Interfaceinterface (int procID, size_t level=0)
 returns the interface to the given process. More...
 
const Interfaceinterface (int procID, size_t level=0) const
 
Interfaceinterface (iterator iter)
 returns the interface to the given iterator. More...
 
bool interface_exists (int procID, size_t level=0) const
 returns true if an interface to the given procID already exists. More...
 
size_t num_interface_elements () const
 returns the sum of the interface sizes More...
 
size_t num_interfaces (size_t level=0) const
 returns the number of interfaces in the layout More...
 
size_t num_levels () const
 returns 1 More...
 
int proc_id (const_iterator iter) const
 
int proc_id (iterator iter) const
 returns the target process of the interface given in iterator More...
 
 SingleLevelLayout ()
 
template<class TCompare >
void sort_interface_entries (TCompare cmp)
 sort the entries in all interfaces of this layout More...
 

Protected Attributes

InterfaceMap m_interfaceMap
 holds the interfaces in a map. More...
 

Detailed Description

template<class TInterface>
class pcl::SingleLevelLayout< TInterface >

the standard single-level-layout implementation

A Layout is a collection of interfaces. Each interface is associated with a process-id.

This layout type supports the requirements of the pcl::layout_tags::single_level_layout_tag category.

The layout passes its local srcID on to created interfaces.

Additionally it features methods that allow to add new interfaces

In order to allow one method to operate both on a SingleLevelLayout and a MultiLevelLayout, the (size_t level = 0) convenience parameter has been added to some methods. Those parameters are ignored throughout the whole implementation.

Member Typedef Documentation

◆ category_tag

template<class TInterface >
typedef layout_tags::single_level_layout_tag pcl::SingleLevelLayout< TInterface >::category_tag

Layout category.

◆ const_iterator

template<class TInterface >
typedef InterfaceMap::const_iterator pcl::SingleLevelLayout< TInterface >::const_iterator

◆ Element

template<class TInterface >
typedef Interface::Element pcl::SingleLevelLayout< TInterface >::Element

Element type.

◆ Interface

template<class TInterface >
typedef TInterface pcl::SingleLevelLayout< TInterface >::Interface

Interface type.

◆ InterfaceMap

template<class TInterface >
typedef std::map<int, TInterface> pcl::SingleLevelLayout< TInterface >::InterfaceMap

an interface-map is a list of interfaces, each associated with a process id.

◆ iterator

template<class TInterface >
typedef InterfaceMap::iterator pcl::SingleLevelLayout< TInterface >::iterator

An iterator that allows to iterate over the interfaces stored in the layout.

◆ Type

template<class TInterface >
typedef Interface::Type pcl::SingleLevelLayout< TInterface >::Type

Type.

Constructor & Destructor Documentation

◆ SingleLevelLayout()

template<class TInterface >
pcl::SingleLevelLayout< TInterface >::SingleLevelLayout ( )
inline

Member Function Documentation

◆ begin() [1/2]

template<class TInterface >
iterator pcl::SingleLevelLayout< TInterface >::begin ( size_t  level = 0)
inline

returns the iterator to the first interface of the layout.

You should access the values of this iterator using the methods Layout::interface and Layout::proc_id.

References pcl::SingleLevelLayout< TInterface >::m_interfaceMap.

Referenced by ug::AddAllFromLayout(), ug::AddConnectionsBetweenSlaves(), ug::AddExtraProcessEntriesToSubdomainLayout(), ug::BuildDomainDecompositionLayouts(), ug::GenerateOverlapClass< matrix_type >::calculate(), ug::ParallelVector< TVector >::check_storage_type(), ug::CommunicateConnections(), ug::CommunicateOnInterfaces(), ug::CopyInterfaceEntrysToDomainDecompositionLayouts(), ug::ParallelNodes::create_mark_map(), ug::NewLayoutCreator::create_mark_map(), ug::CreateGlobalLayout(), pcl::SingleLevelLayout< TInterface >::empty(), ug::FindPositionInInterfaces(), ug::GetHighestReferencedIndex(), pcl::SingleLevelLayout< TInterface >::has_interface_elements(), ug::RowSendingScheme< matrix_type >::issue_send(), ug::LogIndexLayout(), ug::MarkAllFromLayout(), ug::MatExtractDiagOnLayout(), ug::MatWriteDiagOnLayout(), ug::NewLayoutCreator::NewLayoutCreator(), pcl::SingleLevelLayout< TInterface >::num_interface_elements(), ug::NumIndices(), ug::operator<<(), ug::PermuteIndicesInIndexLayout(), ug::RowSendingScheme< matrix_type >::process(), ug::BGLParallelMatrix< T >::refresh(), ug::SlicingData< TVec, N >::replace_indices_in_layout(), ug::ReplaceIndicesInLayout(), ug::ScaleLayoutValues(), ug::Serialize(), ug::SerializeLayout(), ug::SetLayoutValues(), pcl::SingleLevelLayout< TInterface >::sort_interface_entries(), and ug::ParallelNodes::sort_layout().

◆ begin() [2/2]

template<class TInterface >
const_iterator pcl::SingleLevelLayout< TInterface >::begin ( size_t  level = 0) const
inline

◆ clear()

◆ empty()

template<class TInterface >
bool pcl::SingleLevelLayout< TInterface >::empty ( size_t  level = 0) const
inline

returns true if the layout has no interfaces.

Note that this method only tells whether there are interfaces or not. To check whether there are any elements use has_interface_elements.

References pcl::SingleLevelLayout< TInterface >::begin(), and pcl::SingleLevelLayout< TInterface >::end().

Referenced by ug::BuildOneToManyLayout().

◆ end() [1/2]

template<class TInterface >
iterator pcl::SingleLevelLayout< TInterface >::end ( size_t  level = 0)
inline

returns the iterator to the last interface of the layout.

You should access the values of this iterator using the methods Layout::interface and Layout::proc_id.

References pcl::SingleLevelLayout< TInterface >::m_interfaceMap.

Referenced by ug::AddAllFromLayout(), ug::AddConnectionsBetweenSlaves(), ug::AddExtraProcessEntriesToSubdomainLayout(), ug::BuildDomainDecompositionLayouts(), ug::GenerateOverlapClass< matrix_type >::calculate(), ug::ParallelVector< TVector >::check_storage_type(), ug::CommunicateConnections(), ug::CommunicateOnInterfaces(), ug::CopyInterfaceEntrysToDomainDecompositionLayouts(), ug::ParallelNodes::create_mark_map(), ug::NewLayoutCreator::create_mark_map(), ug::CreateGlobalLayout(), pcl::SingleLevelLayout< TInterface >::empty(), ug::FindPositionInInterfaces(), ug::GetHighestReferencedIndex(), pcl::SingleLevelLayout< TInterface >::has_interface_elements(), ug::RowSendingScheme< matrix_type >::issue_send(), ug::LogIndexLayout(), ug::MarkAllFromLayout(), ug::MatExtractDiagOnLayout(), ug::MatWriteDiagOnLayout(), ug::NewLayoutCreator::NewLayoutCreator(), pcl::SingleLevelLayout< TInterface >::num_interface_elements(), ug::NumIndices(), ug::operator<<(), ug::PermuteIndicesInIndexLayout(), ug::RowSendingScheme< matrix_type >::process(), ug::BGLParallelMatrix< T >::refresh(), ug::SlicingData< TVec, N >::replace_indices_in_layout(), ug::ReplaceIndicesInLayout(), ug::ScaleLayoutValues(), ug::Serialize(), ug::SerializeLayout(), ug::SetLayoutValues(), pcl::SingleLevelLayout< TInterface >::sort_interface_entries(), and ug::ParallelNodes::sort_layout().

◆ end() [2/2]

template<class TInterface >
const_iterator pcl::SingleLevelLayout< TInterface >::end ( size_t  level = 0) const
inline

◆ erase()

template<class TInterface >
iterator pcl::SingleLevelLayout< TInterface >::erase ( iterator  iter,
size_t  level = 0 
)
inline

erases the interface at the given iterator.

returns an iterator to the next interface.

References pcl::SingleLevelLayout< TInterface >::m_interfaceMap.

◆ has_interface_elements()

template<class TInterface >
bool pcl::SingleLevelLayout< TInterface >::has_interface_elements ( ) const
inline

◆ interface() [1/4]

template<class TInterface >
const Interface& pcl::SingleLevelLayout< TInterface >::interface ( const_iterator  iter) const
inline

◆ interface() [2/4]

template<class TInterface >
Interface& pcl::SingleLevelLayout< TInterface >::interface ( int  procID,
size_t  level = 0 
)
inline

returns the interface to the given process.

if the queried interface exist, it will be returned. If not it will be created. The new interfaces localSrcID will be set to the localSrcID of this layout.

References pcl::SingleLevelLayout< TInterface >::m_interfaceMap.

◆ interface() [3/4]

template<class TInterface >
const Interface& pcl::SingleLevelLayout< TInterface >::interface ( int  procID,
size_t  level = 0 
) const
inline

◆ interface() [4/4]

◆ interface_exists()

template<class TInterface >
bool pcl::SingleLevelLayout< TInterface >::interface_exists ( int  procID,
size_t  level = 0 
) const
inline

returns true if an interface to the given procID already exists.

References pcl::SingleLevelLayout< TInterface >::m_interfaceMap.

◆ num_interface_elements()

template<class TInterface >
size_t pcl::SingleLevelLayout< TInterface >::num_interface_elements ( ) const
inline

◆ num_interfaces()

template<class TInterface >
size_t pcl::SingleLevelLayout< TInterface >::num_interfaces ( size_t  level = 0) const
inline

returns the number of interfaces in the layout

References pcl::SingleLevelLayout< TInterface >::m_interfaceMap.

Referenced by ug::Serialize().

◆ num_levels()

template<class TInterface >
size_t pcl::SingleLevelLayout< TInterface >::num_levels ( ) const
inline

returns 1

◆ proc_id() [1/2]

template<class TInterface >
int pcl::SingleLevelLayout< TInterface >::proc_id ( const_iterator  iter) const
inline

◆ proc_id() [2/2]

◆ sort_interface_entries()

template<class TInterface >
template<class TCompare >
void pcl::SingleLevelLayout< TInterface >::sort_interface_entries ( TCompare  cmp)
inline

Member Data Documentation

◆ m_interfaceMap


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