ug4
ug::StdArrayCommunicationScheme< TArray > Class Template Reference

Communication Scheme for synchronization of arrays or similar datastructures. More...

#include <communication_scheme.h>

+ Inheritance diagram for ug::StdArrayCommunicationScheme< TArray >:

Public Member Functions

int get_element_size () const
 
void receive (int pid, size_t index, value_type &v)
 
const value_typesend (int pid, size_t index) const
 
 StdArrayCommunicationScheme (TArray &t)
 
- Public Member Functions inherited from ug::CommunicationScheme< StdArrayCommunicationScheme< TArray >, TArray::value_type >
virtual bool collect (ug::BinaryBuffer &buff, const Interface &interface)
 send data on the interface based on TDerived::send More...
 
StdArrayCommunicationScheme< TArray > & derived ()
 get the derived class More...
 
virtual bool extract (ug::BinaryBuffer &buff, const Interface &interface)
 receive data on the interface and hand it over to TDerived::receive More...
 
virtual int get_required_buffer_size (const Interface &interface)
 get the size of the required buffer for an interface More...
 
- Public Member Functions inherited from pcl::ICommunicationPolicy< IndexLayout >
virtual bool begin_layout_collection (const Layout *pLayout)
 signals the beginning of a layout collection. More...
 
virtual bool begin_layout_extraction (const Layout *pLayout)
 signals the beginning of a layout extraction. More...
 
virtual void begin_level_extraction (int level)
 signals that a new layout-level will now be processed. More...
 
virtual bool end_layout_collection (const Layout *pLayout)
 signals the end of a layout collection More...
 
virtual bool end_layout_extraction (const Layout *pLayout)
 signals the end of a layout extraction More...
 
virtual ~ICommunicationPolicy ()
 

Private Types

typedef TArray::value_type value_type
 

Private Attributes

TArray & m_arr
 

Additional Inherited Members

- Public Types inherited from pcl::ICommunicationPolicy< IndexLayout >
typedef Layout::Interface Interface
 
typedef IndexLayout Layout
 

Detailed Description

template<typename TArray>
class ug::StdArrayCommunicationScheme< TArray >

Communication Scheme for synchronization of arrays or similar datastructures.

Template Parameters
TArrayarray to sync. has to support TArray::value_type operator [] (size_t i) const.

example: std::vector<int> vec; ... do sth with the vector on both processors transfer data from master to slave StdArrayCommunicationScheme<std::vector<int> > arrScheme(vec) CommunicateOnIntefaces(parallelCommunicator, slaveLayout, masterLayout, arrScheme); ... done. Now all master nodes have overwritten the data on the slave nodes.

Member Typedef Documentation

◆ value_type

template<typename TArray >
typedef TArray::value_type ug::StdArrayCommunicationScheme< TArray >::value_type
private

Constructor & Destructor Documentation

◆ StdArrayCommunicationScheme()

template<typename TArray >
ug::StdArrayCommunicationScheme< TArray >::StdArrayCommunicationScheme ( TArray &  t)
inline

Member Function Documentation

◆ get_element_size()

template<typename TArray >
int ug::StdArrayCommunicationScheme< TArray >::get_element_size ( ) const
inline

◆ receive()

template<typename TArray >
void ug::StdArrayCommunicationScheme< TArray >::receive ( int  pid,
size_t  index,
value_type v 
)
inline

◆ send()

template<typename TArray >
const value_type& ug::StdArrayCommunicationScheme< TArray >::send ( int  pid,
size_t  index 
) const
inline

Member Data Documentation

◆ m_arr


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