Plugins
|
#include <memreduce.h>
Public Types | |
typedef TArray | array_type |
typedef base_type::Interface | Interface |
typedef base_type::Layout | Layout |
typedef array_type::value_type | value_type |
Public Types inherited from pcl::ICommunicationPolicy< TLayout > | |
typedef Layout::Interface | Interface |
typedef TLayout | Layout |
Public Member Functions | |
virtual bool | collect (ug::BinaryBuffer &buff, const Interface &interface) |
writes the interface values into a buffer that will be sent More... | |
ComPol_MemOp () | |
Default constructor. More... | |
ComPol_MemOp (TArray *pMemDst, const TArray *pMemSrc) | |
Constructor setting the arrays. More... | |
ComPol_MemOp (TArray *pVec) | |
Constructor setting the same arrays for the source and the destination. More... | |
virtual bool | extract (ug::BinaryBuffer &buff, const Interface &interface) |
writes values from a buffer into the interface More... | |
virtual int | get_required_buffer_size (const Interface &interface) |
returns the buffer size More... | |
void | set_dst (TArray *pMemDst) |
set the destination More... | |
void | set_src (const TArray *pMem) |
set the source array More... | |
Public Member Functions inherited from pcl::ICommunicationPolicy< TLayout > | |
virtual bool | begin_layout_collection (const Layout *pLayout) |
virtual bool | begin_layout_extraction (const Layout *pLayout) |
virtual void | begin_level_extraction (int level) |
virtual bool | end_layout_collection (const Layout *pLayout) |
virtual bool | end_layout_extraction (const Layout *pLayout) |
virtual | ~ICommunicationPolicy () |
Private Types | |
typedef pcl::ICommunicationPolicy< TLayout > | base_type |
typedef ComPol_MemOp< TArray, TLayout, TOp > | this_type |
Private Attributes | |
TArray * | m_pMemDst |
const TArray * | m_pMemSrc |
Communication policy for the reduction of arrays represented by classes like std::vector or VariableArray1 using a generic operation. To perform the the operation, the template parameter class TOp must implement a STATIC function 'op' with the arguments of type TArray::value_type. During the reduction, the arguments are initialized with the data on the master and the current slave.
TArray | type of the array class (e.g. std::vector) |
TLayout | type of the parallel layout of the memory |
TOp | class of the operation |
typedef TArray ug::Electromagnetism::ComPol_MemOp< TArray, TLayout, TOp >::array_type |
|
private |
typedef base_type::Interface ug::Electromagnetism::ComPol_MemOp< TArray, TLayout, TOp >::Interface |
typedef base_type::Layout ug::Electromagnetism::ComPol_MemOp< TArray, TLayout, TOp >::Layout |
|
private |
typedef array_type::value_type ug::Electromagnetism::ComPol_MemOp< TArray, TLayout, TOp >::value_type |
|
inline |
Default constructor.
|
inline |
Constructor setting the same arrays for the source and the destination.
|
inline |
Constructor setting the arrays.
|
inlinevirtual |
writes the interface values into a buffer that will be sent
This function collects all entries of the vector into a buffer that are part of the interface.
[out] | buff | Buffer |
[in] | interface | Interface that will communicate |
Implements pcl::ICommunicationPolicy< TLayout >.
References ug::Electromagnetism::ComPol_MemOp< TArray, TLayout, TOp >::m_pMemSrc, and ug::Serialize().
|
inlinevirtual |
writes values from a buffer into the interface
This function writes the buffer values into the vector.
[out] | buff | Buffer |
[in] | interface | Interface that communicates |
Implements pcl::ICommunicationPolicy< TLayout >.
References ug::Deserialize(), entry(), and ug::Electromagnetism::ComPol_MemOp< TArray, TLayout, TOp >::m_pMemDst.
|
inlinevirtual |
returns the buffer size
This function returns the size of the buffer needed for the communication of passed interface. If the vector has fixed size entries this is just the number of interface entries times the size of the entry. In case of a variable size entry type a negative value is returned to indicate that no buffer size can be determined in advanced.
[in] | interface | Interface that will communicate |
Reimplemented from pcl::ICommunicationPolicy< TLayout >.
|
inline |
set the destination
References ug::Electromagnetism::ComPol_MemOp< TArray, TLayout, TOp >::m_pMemDst.
|
inline |
set the source array
References ug::Electromagnetism::ComPol_MemOp< TArray, TLayout, TOp >::m_pMemSrc.
|
private |
|
private |