ug4
pcl::MultiGroupCommunicator Class Reference

communicator for simultaneous data exchange between many small groups More...

#include <pcl_multi_group_communicator.h>

Public Member Functions

template<typename T >
void allreduce (const T *sendBuf, T *recvBuf, size_t countPerGroup, ReduceOperation op) const
 performs an allreduce between all groups More...
 
size_t membership_group_index (size_t imem) const
 
 MultiGroupCommunicator (const std::vector< bool > &participates, ProcessCommunicator com=ProcessCommunicator())
 
 MultiGroupCommunicator (ProcessCommunicator com=ProcessCommunicator())
 
size_t num_groups () const
 
size_t num_memberships () const
 
bool participates (size_t igrp) const
 
void reinit (const std::vector< bool > &participates)
 

Private Attributes

std::map< int, ug::BinaryBufferm_binBufs
 used for sending/receiving data from/to processes More...
 
ProcessCommunicator m_com
 
std::vector< int > m_groupMembers
 size: m_groupOffsets.back(). Consecutively holds proc-indices of each group in which the process participates. More...
 
std::vector< size_t > m_groupOffsets
 size: #memberships+1. Offset of each group in m_groupMembers. The last entry always holds m_groupMembers.size(). More...
 
std::vector< size_t > m_memberships
 size: #memberships. Holds indices to groups in which the process participates More...
 
std::vector< bool > m_participates
 size: #groups More...
 

Detailed Description

communicator for simultaneous data exchange between many small groups

The MultiGroupCommunicator allows for a process to be member in various small groups and to perform collective operations on those groups.

Warning
The communicator is currently in development and not ready to use! Segfaults may arise during or after application. Debugging required!

Constructor & Destructor Documentation

◆ MultiGroupCommunicator() [1/2]

pcl::MultiGroupCommunicator::MultiGroupCommunicator ( ProcessCommunicator  com = ProcessCommunicator())

◆ MultiGroupCommunicator() [2/2]

pcl::MultiGroupCommunicator::MultiGroupCommunicator ( const std::vector< bool > &  participates,
ProcessCommunicator  com = ProcessCommunicator() 
)

References participates(), and reinit().

Member Function Documentation

◆ allreduce()

template<typename T >
void pcl::MultiGroupCommunicator::allreduce ( const T *  sendBuf,
T *  recvBuf,
size_t  countPerGroup,
ReduceOperation  op 
) const

◆ membership_group_index()

size_t pcl::MultiGroupCommunicator::membership_group_index ( size_t  imem) const

References m_memberships.

◆ num_groups()

size_t pcl::MultiGroupCommunicator::num_groups ( ) const

References m_participates.

◆ num_memberships()

size_t pcl::MultiGroupCommunicator::num_memberships ( ) const

References m_memberships.

◆ participates()

bool pcl::MultiGroupCommunicator::participates ( size_t  igrp) const

References m_participates.

Referenced by MultiGroupCommunicator(), and reinit().

◆ reinit()

void pcl::MultiGroupCommunicator::reinit ( const std::vector< bool > &  participates)

Member Data Documentation

◆ m_binBufs

std::map<int, ug::BinaryBuffer> pcl::MultiGroupCommunicator::m_binBufs
private

used for sending/receiving data from/to processes

◆ m_com

ProcessCommunicator pcl::MultiGroupCommunicator::m_com
private

Referenced by allreduce(), and reinit().

◆ m_groupMembers

std::vector<int> pcl::MultiGroupCommunicator::m_groupMembers
private

size: m_groupOffsets.back(). Consecutively holds proc-indices of each group in which the process participates.

Referenced by allreduce(), and reinit().

◆ m_groupOffsets

std::vector<size_t> pcl::MultiGroupCommunicator::m_groupOffsets
private

size: #memberships+1. Offset of each group in m_groupMembers. The last entry always holds m_groupMembers.size().

Referenced by allreduce(), and reinit().

◆ m_memberships

std::vector<size_t> pcl::MultiGroupCommunicator::m_memberships
private

size: #memberships. Holds indices to groups in which the process participates

Referenced by allreduce(), membership_group_index(), num_memberships(), and reinit().

◆ m_participates

std::vector<bool> pcl::MultiGroupCommunicator::m_participates
private

size: #groups

Referenced by num_groups(), participates(), and reinit().


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