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

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

- Namespace List
- Namespace Members

All Classes Namespaces Functions Typedefs Groups Pages
Namespaces | Classes | Typedefs | Functions
diy Namespace Reference

## Namespaces
| mpi

## Classes
class | Assigner
class | ContiguousAssigner
class | RoundRobinAssigner
class | Collection
class | resource_accessor
class | critical_resource
struct | RegularDecomposer
| Decomposes a regular (discrete or continuous) domain into even blocks; creates Links with Bounds along the way. More...
struct | Grid
struct | GridRef
struct | Serialization< io::detail::GidOffsetCount >
class | Link
class | RegularLink
struct | RegularLinkSelector
struct | RegularLinkSelector< DiscreteBounds >
struct | RegularLinkSelector< ContinuousBounds >
struct | LinkFactory
class | Master
struct | thread
struct | mutex
struct | fast_mutex
struct | recursive_mutex
struct | lock_guard
struct | RegularAllReducePartners
| 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...
struct | RegularBroadcastPartners
| Partners for broadcast. More...
struct | RegularPartners
struct | RegularMergePartners
| Partners for merge-reduce. More...
struct | RegularSwapPartners
| Partners for swap-reduce. More...
class | Point
struct | ReduceProxy
| 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...
struct | BinaryBuffer
| A serialization buffer. More...
struct | MemoryBuffer
struct | Serialization
| Main interface to serialization, meant to be specialized for the types that require special handling. `diy::save()` and `diy::load()` call the static member functions of this class. More...
struct | Serialization< MemoryBuffer >
struct | Serialization< std::vector< U > >
struct | Serialization< std::valarray< U > >
struct | Serialization< std::string >
struct | Serialization< std::pair< X, Y > >
struct | Serialization< std::map< K, V > >
struct | Serialization< std::set< T > >
struct | Serialization< std::unordered_map< K, V, H, E, A > >
struct | Serialization< std::unordered_set< T, H, E, A > >
struct | Serialization< std::tuple< Args...> >
class | ExternalStorage
class | FileStorage
struct | BlockID
struct | Bounds
struct | Direction
struct | BoundsValue

## Typedefs
typedef mpi::communicator | Communicator
typedef RegularLink < DiscreteBounds > | RegularGridLink
typedef RegularLink < ContinuousBounds > | RegularContinuousLink
using | fast_mutex = tthread::fast_mutex
template<class Mutex >
using | lock_guard = std::unique_lock< Mutex >
typedef unsigned long | time_type
using | DiscreteBounds = Bounds< int >
using | ContinuousBounds = Bounds< float >

## Functions
template<class Block , class T , class Cmp >
void | sort (Master &master, const Assigner &assigner, std::vector< T > Block::*values, std::vector< T > Block::*samples, size_t num_samples, const Cmp &cmp, int k=2, bool samples_only=false)
| sample sort `values` of each block, store the boundaries between blocks in `samples` More...
template<class Block , class T >
void | sort (Master &master, const Assigner &assigner, std::vector< T > Block::*values, std::vector< T > Block::*samples, size_t num_samples, int k=2)
| sample sort `values` of each block, store the boundaries between blocks in `samples` shorter version of above sort algorithm with the default less-than comparator used for T and all_to_all exchange included More...
template<class Block , class Point >
void | kdtree (Master &master, const Assigner &assigner, int dim, const ContinuousBounds &domain, std::vector< Point > Block::*points, size_t bins, bool wrap=false)
| build a kd-tree and sort a set of points into it (use histograms to determine split values) More...
template<class Block , class Point >
void | kdtree_sampling (Master &master, const Assigner &assigner, int dim, const ContinuousBounds &domain, std::vector< Point > Block::*points, size_t samples, bool wrap=false)
| build a kd-tree and sort a set of points into it (use sampling to determine split values) More...
template<class Bounds >
void | decompose (int dim, int rank, const Bounds &domain, const Assigner &assigner, const typename RegularDecomposer< Bounds >::Creator &create, typename RegularDecomposer< Bounds >::BoolVector share_face=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::BoolVector wrap=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::CoordinateVector ghosts=typename RegularDecomposer< Bounds >::CoordinateVector(), typename RegularDecomposer< Bounds >::DivisionsVector divs=typename RegularDecomposer< Bounds >::DivisionsVector())
| Decomposes the domain into a prescribed pattern of blocks. More...
template<class Bounds >
void | decompose (int dim, int rank, const Bounds &domain, const Assigner &assigner, Master &master, typename RegularDecomposer< Bounds >::BoolVector share_face=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::BoolVector wrap=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::CoordinateVector ghosts=typename RegularDecomposer< Bounds >::CoordinateVector(), typename RegularDecomposer< Bounds >::DivisionsVector divs=typename RegularDecomposer< Bounds >::DivisionsVector())
| Decomposes the domain into a prescribed pattern of blocks. More...
void | decompose (int rank, const Assigner &assigner, Master &master)
| A "null" decompositon that simply creates the blocks and adds them to the master. More...
template<class Bounds >
void | decompose (int dim, int rank, const Bounds &domain, const Assigner &assigner, Master &master, const typename RegularDecomposer< Bounds >::Updater &update, typename RegularDecomposer< Bounds >::BoolVector share_face=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::BoolVector wrap=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::CoordinateVector ghosts=typename RegularDecomposer< Bounds >::CoordinateVector(), typename RegularDecomposer< Bounds >::DivisionsVector divs=typename RegularDecomposer< Bounds >::DivisionsVector())
| Add a decomposition (modify links) of an existing set of blocks that were added to the master previously. More...
std::shared_ptr< spd::logger > | get_logger ()
std::shared_ptr< spd::logger > | create_logger (std::string)
template<class... Args>
std::shared_ptr< spd::logger > | set_logger (Args...args)
template<class Bounds , class Point , class OutIter >
void | near (const RegularLink< Bounds > &link, const Point &p, float r, OutIter out, const Bounds &domain)
| Finds the neighbors within radius r of a target point. More...
template<class Bounds , class Point , class OutIter >
void | in (const RegularLink< Bounds > &link, const Point &p, OutIter out, const Bounds &domain)
| Finds the neighbor(s) containing the target point. More...
template<class Point , class Bounds >
float | distance (int dim, const Bounds &bounds, const Point &p)
| Find the distance between point `p` and box `bounds`.
template<class Bounds >
float | distance (int dim, const Bounds &bounds1, const Bounds &bounds2)
template<class Bounds >
void | wrap_bounds (Bounds &bounds, Direction wrap_dir, const Bounds &domain, int dim)
template<class Coordinate , unsigned D>
Coordinate | norm2 (const Point< Coordinate, D > &p)
template<class C , unsigned D>
std::ostream & | operator<< (std::ostream &out, const Point< C, D > &p)
template<class C , unsigned D>
std::istream & | operator>> (std::istream &in, Point< C, D > &p)
template<class Op >
void | all_to_all (Master &master, const Assigner &assigner, const Op &op, int k=2)
| all to all reduction More...
template<class Reduce , class Partners , class Skip >
void | reduce (Master &master, const Assigner &assigner, const Partners &partners, const Reduce &reduce, const Skip &skip)
| Implementation of the reduce communication pattern (includes swap-reduce, merge-reduce, and any other global communication). More...
template<class Reduce , class Partners >
void | reduce (Master &master, const Assigner &assigner, const Partners &partners, const Reduce &reducer)
| Implementation of the reduce communication pattern (includes swap-reduce, merge-reduce, and any other global communication). More...
template<class T >
void | save (BinaryBuffer &bb, const T &x)
| Saves `x` to `bb` by calling `diy::Serialization<T>::save(bb,x)`.
template<class T >
void | load (BinaryBuffer &bb, T &x)
| Loads `x` from `bb` by calling `diy::Serialization<T>::load(bb,x)`.
template<class T >
void | save (BinaryBuffer &bb, const T *x, size_t n)
| Optimization for arrays. If `diy::Serialization` is not specialized for `T`, the array will be copied all at once. Otherwise, it's copied element by element.
template<class T >
void | load (BinaryBuffer &bb, T *x, size_t n)
| Optimization for arrays. If `diy::Serialization` is not specialized for `T`, the array will be filled all at once. Otherwise, it's filled element by element.
template<class T >
void | load_back (BinaryBuffer &bb, T &x)
| Supports only binary data copying (meant for simple footers).
time_type | get_time ()
diy::DiscreteBounds | interval (int from, int to)
| Helper to create a 1-dimensional discrete domain with the specified extents.
bool | operator< (const diy::BlockID &x, const diy::BlockID &y)
bool | operator== (const diy::BlockID &x, const diy::BlockID &y)
template<class Vertex , class Callback >
void | for_each (const Vertex &from, const Vertex &to, const Callback &callback)
template<class Vertex , class Callback >
void | for_each (const Vertex &shape, const Callback &callback)

## Detailed Description

All classes and functions are declared inside this namespace.

# `<utils/traits.hpp>` — Additional type traits

This module provides additional type traits and related functions, missing from the standard library.

## Function Documentation

template<class Bounds , class Point , class OutIter >

void diy::in | ( | const RegularLink< Bounds > & | link,
|  | const Point & | p,
|  | OutIter | out,
|  | const Bounds & | domain
| ) |  |

Finds the neighbor(s) containing the target point.

Parameters

  link | neighbors
  p | target point
  out | insert iterator for output set of neighbors
  domain | global domain bounds

template<class Bounds , class Point , class OutIter >

void diy::near | ( | const RegularLink< Bounds > & | link,
|  | const Point & | p,
|  | float | r,
|  | OutIter | out,
|  | const Bounds & | domain
| ) |  |

Finds the neighbors within radius r of a target point.

Parameters

  link | neighbors
  p | target point (must be in current block)
  r | target radius (>= 0.0)
  out | insert iterator for output set of neighbors
  domain | global domain bounds