ug4
ug::ComPol_AttachmentReduce< TLayout, TAttachment > Class Template Reference

Performs reduce operations on the specified attachment. More...

#include <compol_attachment_reduce.h>

+ Inheritance diagram for ug::ComPol_AttachmentReduce< TLayout, TAttachment >:

Public Types

typedef attachment_reduce_traits< Valueart
 
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
 
Gridm_grid
 
ReduceOperation m_op
 

Detailed Description

template<class TLayout, class TAttachment>
class ug::ComPol_AttachmentReduce< TLayout, TAttachment >

Performs reduce operations on the specified attachment.

Currently the following reduce operations are supported:

  • PCL_RO_MAX
  • PCL_RO_MIN
  • PCL_RO_SUM
  • PCL_RO_PROD
  • PCL_RO_LAND
  • PCL_RO_BAND
  • PCL_RO_LOR
  • PCL_RO_BOR

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

Member Typedef Documentation

◆ art

template<class TLayout , class TAttachment >
typedef attachment_reduce_traits<Value> ug::ComPol_AttachmentReduce< TLayout, TAttachment >::art

◆ Element

template<class TLayout , class TAttachment >
typedef Layout::Element ug::ComPol_AttachmentReduce< TLayout, TAttachment >::Element

◆ GeomObj

template<class TLayout , class TAttachment >
typedef Layout::Type ug::ComPol_AttachmentReduce< TLayout, TAttachment >::GeomObj

◆ iiter_t

template<class TLayout , class TAttachment >
typedef Interface::const_iterator ug::ComPol_AttachmentReduce< TLayout, TAttachment >::iiter_t

◆ Interface

template<class TLayout , class TAttachment >
typedef Layout::Interface ug::ComPol_AttachmentReduce< TLayout, TAttachment >::Interface

◆ Layout

template<class TLayout , class TAttachment >
typedef TLayout ug::ComPol_AttachmentReduce< TLayout, TAttachment >::Layout

◆ Value

template<class TLayout , class TAttachment >
typedef TAttachment::ValueType ug::ComPol_AttachmentReduce< TLayout, TAttachment >::Value

Member Enumeration Documentation

◆ ReduceOperation

template<class TLayout , class TAttachment >
enum ug::ComPol_AttachmentReduce::ReduceOperation
Enumerator
NONE 
MAX 
MIN 
SUM 
PROD 
LAND 
BAND 
LOR 
BOR 

Constructor & Destructor Documentation

◆ ComPol_AttachmentReduce() [1/2]

◆ ComPol_AttachmentReduce() [2/2]

template<class TLayout , class TAttachment >
ug::ComPol_AttachmentReduce< TLayout, TAttachment >::ComPol_AttachmentReduce ( Grid grid,
TAttachment &  attachment,
ReduceOperation  op 
)
inline

Member Function Documentation

◆ collect()

template<class TLayout , class TAttachment >
bool ug::ComPol_AttachmentReduce< TLayout, TAttachment >::collect ( BinaryBuffer buff,
const Interface interface 
)
virtual

writes the data for the given interface to the buffer.

Implements pcl::ICommunicationPolicy< TLayout >.

References ug::Serialize().

◆ extract()

template<class TLayout , class TAttachment >
bool ug::ComPol_AttachmentReduce< TLayout, TAttachment >::extract ( BinaryBuffer buff,
const Interface interface 
)
virtual

reads the data from the buffer to the given interface .

Implements pcl::ICommunicationPolicy< TLayout >.

References UG_THROW.

◆ extract_band()

template<class TLayout , class TAttachment >
bool ug::ComPol_AttachmentReduce< TLayout, TAttachment >::extract_band ( BinaryBuffer buff,
const Interface interface 
)
protected

References ug::Deserialize().

◆ extract_bor()

template<class TLayout , class TAttachment >
bool ug::ComPol_AttachmentReduce< TLayout, TAttachment >::extract_bor ( BinaryBuffer buff,
const Interface interface 
)
protected

References ug::Deserialize().

◆ extract_land()

template<class TLayout , class TAttachment >
bool ug::ComPol_AttachmentReduce< TLayout, TAttachment >::extract_land ( BinaryBuffer buff,
const Interface interface 
)
protected

References ug::Deserialize().

◆ extract_lor()

template<class TLayout , class TAttachment >
bool ug::ComPol_AttachmentReduce< TLayout, TAttachment >::extract_lor ( BinaryBuffer buff,
const Interface interface 
)
protected

References ug::Deserialize().

◆ extract_max()

template<class TLayout , class TAttachment >
bool ug::ComPol_AttachmentReduce< TLayout, TAttachment >::extract_max ( BinaryBuffer buff,
const Interface interface 
)
protected

References ug::Deserialize().

◆ extract_min()

template<class TLayout , class TAttachment >
bool ug::ComPol_AttachmentReduce< TLayout, TAttachment >::extract_min ( BinaryBuffer buff,
const Interface interface 
)
protected

References ug::Deserialize().

◆ extract_prod()

template<class TLayout , class TAttachment >
bool ug::ComPol_AttachmentReduce< TLayout, TAttachment >::extract_prod ( BinaryBuffer buff,
const Interface interface 
)
protected

References ug::Deserialize().

◆ extract_sum()

template<class TLayout , class TAttachment >
bool ug::ComPol_AttachmentReduce< TLayout, TAttachment >::extract_sum ( BinaryBuffer buff,
const Interface interface 
)
protected

References ug::Deserialize().

Member Data Documentation

◆ m_aa

template<class TLayout , class TAttachment >
Grid::AttachmentAccessor<GeomObj, TAttachment> ug::ComPol_AttachmentReduce< TLayout, TAttachment >::m_aa
private

◆ m_grid

template<class TLayout , class TAttachment >
Grid& ug::ComPol_AttachmentReduce< TLayout, TAttachment >::m_grid
private

◆ m_op

template<class TLayout , class TAttachment >
ReduceOperation ug::ComPol_AttachmentReduce< TLayout, TAttachment >::m_op
private

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