Graybat  1.1
Graph Approach for Highly Generic Communication Schemes Based on Adaptive Topologies
graybat::CommunicationVertex< T_Cage > Struct Template Reference

Public Types

typedef unsigned VertexID
 
typedef T_Cage Cage
 
typedef Cage::GraphPolicy GraphPolicy
 
typedef Cage::Edge Edge
 
typedef Cage::Event Event
 
typedef GraphPolicy::VertexProperty VertexProperty
 

Public Member Functions

 CommunicationVertex (const VertexID id, VertexProperty &vertexProperty, Cage &cage)
 
VertexProperty & operator() ()
 
CommunicationVertexoperator= (const CommunicationVertex &other)
 
size_t nInEdges () const
 
size_t nOutEdges () const
 
bool operator== (CommunicationVertex v)
 
bool operator!= (CommunicationVertex v)
 
template<class T_Data >
void spread (const T_Data &data, std::vector< Event > &events)
 
template<class T_Data >
void spread (const T_Data &data)
 
template<class T_Data >
void collect (T_Data &data)
 
template<class T_Data , class T_Functor >
void forward (T_Data &data, T_Functor f)
 
template<class T_Data >
void forward (T_Data &data)
 
template<typename T_Op >
T_Op::result_type accumulate (const T_Op op, const typename T_Op::result_type init)
 Collects from each incoming edge one elements and reduces them by the binary operator op. More...
 

Public Attributes

VertexID id
 
VertexProperty & vertexProperty
 
Cage & cage
 

Member Function Documentation

template<class T_Cage >
template<typename T_Op >
T_Op::result_type graybat::CommunicationVertex< T_Cage >::accumulate ( const T_Op  op,
const typename T_Op::result_type  init 
)
inline

Collects from each incoming edge one elements and reduces them by the binary operator op.

Parameters
opbinary operator used for reduction (e.g. std::plus).
initinitial value of the reduction.

Each adjacent vertex can send a most one element.

Returns
reduced value

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