DIY 3.0 data-parallel out-of-core C++ library

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Typedefs Groups Pages
Public Types | Public Member Functions | List of all members
diy::RegularAllReducePartners Struct Reference
Communication

Allreduce (reduction with results broadcasted to all blocks) is implemented as two merge reductions, with incoming and outgoing items swapped in second one. Ie, follows merge reduction up and down the merge tree. More...

`#include <diy/partners/all-reduce.hpp>`

Inheritance diagram for diy::RegularAllReducePartners:

## Public Types
typedef RegularMergePartners | Parent
| base class merge reduction
Public Types inherited from diy::RegularMergePartners
typedef RegularPartners | Parent
Public Types inherited from diy::RegularPartners
typedef std::vector< int > | CoordVector
typedef std::vector< int > | DivisionVector
typedef std::vector< DimK > | KVSVector
typedef DiscreteBounds | Bounds
typedef RegularDecomposer< Bounds > | Decomposer

## Public Member Functions
template<class Decomposer >
| RegularAllReducePartners (const Decomposer &decomposer, int k, bool contiguous=true)
| contiguous parameter indicates whether to match partners contiguously or in a round-robin fashion; contiguous is useful when data needs to be united; round-robin is useful for vector-"halving" More...
| RegularAllReducePartners (const DivisionVector &divs, const KVSVector &kvs, bool contiguous=true)
size_t | rounds () const
| returns total number of rounds
int | size (int round) const
| returns size of a group of partners in a given round
int | dim (int round) const
| returns dimension (direction of partners in a regular grid) in a given round
bool | active (int round, int gid, const Master &m) const
| returns whether a given block in a given round has dropped out of the merge yet or not
int | parent_round (int round) const
| returns what the current round would be in the first or second parent merge reduction
void | incoming (int round, int gid, std::vector< int > &partners, const Master &m) const
void | outgoing (int round, int gid, std::vector< int > &partners, const Master &m) const
Public Member Functions inherited from diy::RegularMergePartners
template<class Decomposer >
| RegularMergePartners (const Decomposer &decomposer, int k, bool contiguous=true)
| RegularMergePartners (const DivisionVector &divs, const KVSVector &kvs, bool contiguous=true)
bool | active (int round, int gid, const Master &) const
void | incoming (int round, int gid, std::vector< int > &partners, const Master &) const
void | outgoing (int round, int gid, std::vector< int > &partners, const Master &) const
Public Member Functions inherited from diy::RegularPartners
template<class Decomposer_ >
| RegularPartners (const Decomposer_ &decomposer, int k, bool contiguous=true)
| RegularPartners (const DivisionVector &divs, const KVSVector &kvs, bool contiguous=true)
size_t | rounds () const
int | size (int round) const
int | dim (int round) const
int | step (int round) const
const DivisionVector & | divisions () const
const KVSVector & | kvs () const
bool | contiguous () const
void | fill (int round, int gid, std::vector< int > &partners) const
int | group_position (int round, int c, int step) const

## Additional Inherited Members
Static Public Member Functions inherited from diy::RegularPartners
static void | factor (int k, const DivisionVector &divisions, KVSVector &kvs)

## Detailed Description

Allreduce (reduction with results broadcasted to all blocks) is implemented as two merge reductions, with incoming and outgoing items swapped in second one. Ie, follows merge reduction up and down the merge tree.

Partners for all-reduce

## Constructor & Destructor Documentation

template<class Decomposer >

diy::RegularAllReducePartners::RegularAllReducePartners | ( | const Decomposer & | decomposer,
|  | int | k,
|  | bool | contiguous = `true`
| ) |  |
| inline

contiguous parameter indicates whether to match partners contiguously or in a round-robin fashion; contiguous is useful when data needs to be united; round-robin is useful for vector-"halving"

Parameters

  decomposer | domain decomposition
  k | target k value
  contiguous | distance doubling (true) or halving (false)

diy::RegularAllReducePartners::RegularAllReducePartners | ( | const DivisionVector & | divs,
|  | const KVSVector & | kvs,
|  | bool | contiguous = `true`
| ) |  |
| inline

Parameters

  divs | explicit division vector
  kvs | explicit k vector
  contiguous | distance doubling (true) or halving (false)

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

- include/diy/partners/all-reduce.hpp