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::ReduceProxy Struct Reference

Enables communication within a group during a reduction. DIY creates the ReduceProxy for you in diy::reduce() and provides a reference to ReduceProxy each time the user's reduction function is called. More...

`#include <diy/reduce.hpp>`

Inheritance diagram for diy::ReduceProxy:

## Public Types
typedef std::vector< int > | GIDVector

## Public Member Functions
| ReduceProxy (const Master::Proxy &proxy, void *block, unsigned round, const Assigner &assigner, const GIDVector &incoming_gids, const GIDVector &outgoing_gids)
| ReduceProxy (const Master::Proxy &proxy, void *block, unsigned round, const Assigner &assigner, const Link &in_link, const Link &out_link)
void * | block () const
| returns pointer to block
unsigned | round () const
| returns current round number
const Link & | in_link () const
| returns incoming link
const Link & | out_link () const
| returns outgoing link
int | nblocks () const
| returns total number of blocks
const Assigner & | assigner () const
| returns the assigner
void | set_round (unsigned r)
| advanced: change current round number
Public Member Functions inherited from diy::Master::Proxy
| Proxy (Master *master__, int gid__)
int | gid () const
template<class T >
void | enqueue (const BlockID &to, const T &x, void(*save)(BinaryBuffer &, const T &)=&::diy::save< T >) const
| Enqueue data whose size can be determined automatically, e.g., an STL vector. More...
template<class T >
void | enqueue (const BlockID &to, const T *x, size_t n, void(*save)(BinaryBuffer &, const T &)=&::diy::save< T >) const
| Enqueue data whose size is given explicitly by the user, e.g., an array. More...
template<class T >
void | dequeue (int from, T &x, void(*load)(BinaryBuffer &, T &)=&::diy::load< T >) const
| Dequeue data whose size can be determined automatically (e.g., STL vector) and that was previously enqueued so that diy knows its size when it is received. In this case, diy will allocate the receive buffer; the user does not need to do so. More...
template<class T >
void | dequeue (int from, T *x, size_t n, void(*load)(BinaryBuffer &, T &)=&::diy::load< T >) const
| Dequeue an array of data whose size is given explicitly by the user. In this case, the user needs to allocate the receive buffer prior to calling dequeue. More...
template<class T >
EnqueueIterator< T > | enqueuer (const T &x, void(*save)(BinaryBuffer &, const T &)=&::diy::save< T >) const
IncomingQueues * | incoming () const
MemoryBuffer & | incoming (int from) const
void | incoming (std::vector< int > &v) const
OutgoingQueues * | outgoing () const
MemoryBuffer & | outgoing (const BlockID &to) const
template<class T , class Op >
void | all_reduce (const T &in, Op op) const
| Post an all-reduce collective using an existing communication proxy. Available operators are: maximum<T>, minimum<T>, std::plus<T>, std::multiplies<T>, std::logical_and<T>, and std::logical_or<T>. More...
template<class T >
T | read () const
| Return the result of a proxy collective without popping it off the collectives list (same result would be returned multiple times). The list can be cleared with collectives()->clear().
template<class T >
T | get () const
| Return the result of a proxy collective; result is popped off the collectives list.
template<class T >
void | scratch (const T &in) const
CollectivesList * | collectives () const
| Return the list of proxy collectives (values and operations)
Master * | master () const

## Detailed Description

Enables communication within a group during a reduction. DIY creates the ReduceProxy for you in diy::reduce() and provides a reference to ReduceProxy each time the user's reduction function is called.

Examples:
  reduce/all-done.cpp, reduce/all-to-all.cpp, reduce/kd-tree.cpp, reduce/merge-reduce.cpp, reduce/sort.cpp, and reduce/swap-reduce.cpp.

## Constructor & Destructor Documentation

diy::ReduceProxy::ReduceProxy | ( | const Master::Proxy & | proxy,
|  | void * | block,
|  | unsigned | round,
|  | const Assigner & | assigner,
|  | const GIDVector & | incoming_gids,
|  | const GIDVector & | outgoing_gids
| ) |  |
| inline

Parameters

  proxy | parent proxy
  block | diy block
  round | current round
  assigner | assigner
  incoming_gids | incoming gids in this group

diy::ReduceProxy::ReduceProxy | ( | const Master::Proxy & | proxy,
|  | void * | block,
|  | unsigned | round,
|  | const Assigner & | assigner,
|  | const Link & | in_link,
|  | const Link & | out_link
| ) |  |
| inline

Parameters

  proxy | parent proxy
  block | diy block
  round | current round

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

- include/diy/reduce.hpp