ug4
|
Performs reduce operations on the specified attachment. More...
#include <compol_attachment_reduce.h>
Public Types | |
typedef attachment_reduce_traits< Value > | art |
typedef Layout::Element | Element |
typedef Layout::Type | GeomObj |
typedef Interface::const_iterator | iiter_t |
typedef Layout::Interface | Interface |
typedef TLayout | Layout |
enum | ReduceOperation { NONE , MAX , MIN , SUM , PROD , LAND , BAND , LOR , BOR } |
typedef TAttachment::ValueType | Value |
Public Types inherited from pcl::ICommunicationPolicy< TLayout > | |
typedef Layout::Interface | Interface |
typedef TLayout | Layout |
Public Member Functions | |
bool | collect (BinaryBuffer &buff, const Interface &interface) |
writes the data for the given interface to the buffer. More... | |
ComPol_AttachmentReduce (Grid &grid, TAttachment &attachment, pcl::ReduceOperation op) | |
ComPol_AttachmentReduce (Grid &grid, TAttachment &attachment, ReduceOperation op) | |
bool | extract (BinaryBuffer &buff, const Interface &interface) |
reads the data from the buffer to the given interface . More... | |
Public Member Functions inherited from pcl::ICommunicationPolicy< TLayout > | |
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 int | get_required_buffer_size (const Interface &interface) |
returns the size of the buffer in bytes, that will be required for interface-communication. More... | |
virtual | ~ICommunicationPolicy () |
Protected Member Functions | |
bool | extract_band (BinaryBuffer &buff, const Interface &interface) |
bool | extract_bor (BinaryBuffer &buff, const Interface &interface) |
bool | extract_land (BinaryBuffer &buff, const Interface &interface) |
bool | extract_lor (BinaryBuffer &buff, const Interface &interface) |
bool | extract_max (BinaryBuffer &buff, const Interface &interface) |
bool | extract_min (BinaryBuffer &buff, const Interface &interface) |
bool | extract_prod (BinaryBuffer &buff, const Interface &interface) |
bool | extract_sum (BinaryBuffer &buff, const Interface &interface) |
Private Attributes | |
Grid::AttachmentAccessor< GeomObj, TAttachment > | m_aa |
Grid & | m_grid |
ReduceOperation | m_op |
Performs reduce operations on the specified attachment.
Currently the following reduce operations are supported:
The reduce operation is performed on the attachment of each grid-object separately during extraction.
Reduce operations are locally performed using the operations defined in attachment_reduce_traits for the given type.
If you want to perform an 'allreduce' on the attached values you have to perform a reduce first, followed by a copy through ComPol_CopyAttachment
typedef attachment_reduce_traits<Value> ug::ComPol_AttachmentReduce< TLayout, TAttachment >::art |
typedef Layout::Element ug::ComPol_AttachmentReduce< TLayout, TAttachment >::Element |
typedef Layout::Type ug::ComPol_AttachmentReduce< TLayout, TAttachment >::GeomObj |
typedef Interface::const_iterator ug::ComPol_AttachmentReduce< TLayout, TAttachment >::iiter_t |
typedef Layout::Interface ug::ComPol_AttachmentReduce< TLayout, TAttachment >::Interface |
typedef TLayout ug::ComPol_AttachmentReduce< TLayout, TAttachment >::Layout |
typedef TAttachment::ValueType ug::ComPol_AttachmentReduce< TLayout, TAttachment >::Value |
enum ug::ComPol_AttachmentReduce::ReduceOperation |
|
inline |
References ug::ComPol_AttachmentReduce< TLayout, TAttachment >::BAND, ug::ComPol_AttachmentReduce< TLayout, TAttachment >::BOR, ug::ComPol_AttachmentReduce< TLayout, TAttachment >::LAND, ug::ComPol_AttachmentReduce< TLayout, TAttachment >::LOR, ug::ComPol_AttachmentReduce< TLayout, TAttachment >::m_op, ug::ComPol_AttachmentReduce< TLayout, TAttachment >::MAX, ug::ComPol_AttachmentReduce< TLayout, TAttachment >::MIN, PCL_RO_BAND, PCL_RO_BOR, PCL_RO_LAND, PCL_RO_LOR, PCL_RO_MAX, PCL_RO_MIN, PCL_RO_PROD, PCL_RO_SUM, ug::ComPol_AttachmentReduce< TLayout, TAttachment >::PROD, and ug::ComPol_AttachmentReduce< TLayout, TAttachment >::SUM.
|
inline |
|
virtual |
writes the data for the given interface to the buffer.
Implements pcl::ICommunicationPolicy< TLayout >.
References ug::Serialize().
|
virtual |
reads the data from the buffer to the given interface .
Implements pcl::ICommunicationPolicy< TLayout >.
References UG_THROW.
|
protected |
References ug::Deserialize().
|
protected |
References ug::Deserialize().
|
protected |
References ug::Deserialize().
|
protected |
References ug::Deserialize().
|
protected |
References ug::Deserialize().
|
protected |
References ug::Deserialize().
|
protected |
References ug::Deserialize().
|
protected |
References ug::Deserialize().
|
private |
|
private |
|
private |