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
Classes | Public Member Functions | List of all members
diy::Master::Proxy Struct Reference

Communication proxy, used for enqueueing and dequeueing items for future exchange. More...

`#include <diy/proxy.hpp>`

Inheritance diagram for diy::Master::Proxy:

## Classes
struct | EnqueueIterator

## Public Member Functions
| 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

Communication proxy, used for enqueueing and dequeueing items for future exchange.

Examples:
  reduce/sample-sort.cpp.

## Member Function Documentation

template<class T >

void diy::Master::Proxy::dequeue | ( | int | from,
|  | T & | x,
|  | void(*)(BinaryBuffer &, T &) | load = `&::diy::load<T>`
| ) |  | const
| inline

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.

Parameters

  from | target block gid
  x | data (eg. STL vector)
  load | optional serialization function

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

template<class T >

void diy::Master::Proxy::dequeue | ( | int | from,
|  | T * | x,
|  | size_t | n,
|  | void(*)(BinaryBuffer &, T &) | load = `&::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.

Parameters

  from | target block gid
  x | pointer to the data (eg. address of start of vector)
  n | size in data elements (eg. ints)
  load | optional serialization function

template<class T >

void diy::Master::Proxy::enqueue | ( | const BlockID & | to,
|  | const T & | x,
|  | void(*)(BinaryBuffer &, const T &) | save = `&::diy::save<T>`
| ) |  | const
| inline

Enqueue data whose size can be determined automatically, e.g., an STL vector.

Parameters

  to | target block (gid,proc)
  x | data (eg. STL vector)
  save | optional serialization function

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

template<class T >

void diy::Master::Proxy::enqueue | ( | const BlockID & | to,
|  | const T * | x,
|  | size_t | n,
|  | void(*)(BinaryBuffer &, const T &) | save = `&::diy::save<T>`
| ) |  | const

Enqueue data whose size is given explicitly by the user, e.g., an array.

Parameters

  to | target block (gid,proc)
  x | pointer to the data (eg. address of start of vector)
  n | size in data elements (eg. ints)
  save | optional serialization function

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

- include/diy/proxy.hpp