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 Types | Public Member Functions | Public Attributes | List of all members
diy::Master Class Reference

## Classes
struct | BaseCommand
struct | Binder
struct | Collective
struct | Command
struct | IncomingQueuesRecords
struct | IncomingRound
struct | InFlightRecv
struct | InFlightSend
struct | MessageInfo
struct | NeverSkip
struct | OutgoingQueuesRecord
struct | ProcessBlock
struct | Proxy
| Communication proxy, used for enqueueing and dequeueing items for future exchange. More...
struct | ProxyWithLink
struct | QueuePolicy
struct | QueueRecord
struct | QueueSizePolicy
| Move queues out of core if their size exceeds a parameter given in the constructor. More...
struct | SkipNoIncoming
struct | tags

## Public Types
typedef std::vector < BaseCommand * > | Commands
using | Skip = std::function< bool(int, const Master &)>
typedef Collection::Create | CreateBlock
typedef Collection::Destroy | DestroyBlock
typedef Collection::Save | SaveBlock
typedef Collection::Load | LoadBlock
template<class Block >
using | Callback = std::function< void(Block *, const ProxyWithLink &)>
typedef std::list< InFlightSend > | InFlightSendsList
typedef std::map< int, InFlightRecv > | InFlightRecvsMap
typedef std::list< int > | ToSendList
typedef std::list< Collective > | CollectivesList
typedef std::map< int, CollectivesList > | CollectivesMap
typedef std::map< int, QueueRecord > | InQueueRecords
typedef std::map< int, MemoryBuffer > | IncomingQueues
typedef std::map< BlockID, MemoryBuffer > | OutgoingQueues
typedef std::map< BlockID, QueueRecord > | OutQueueRecords
typedef std::map< int, IncomingQueuesRecords > | IncomingQueuesMap
typedef std::map< int, OutgoingQueuesRecord > | OutgoingQueuesMap
typedef std::map< int, IncomingRound > | IncomingRoundMap

## Public Member Functions
| Master (mpi::communicator comm, int threads=1, int limit=-1, CreateBlock create=0, DestroyBlock destroy=0, ExternalStorage *storage=0, SaveBlock save=0, LoadBlock load=0, QueuePolicy *q_policy=new QueueSizePolicy(4096))
| The main DIY object. More...
void | clear ()
void | destroy (int i)
int | add (int gid, void *b, Link *l)
| add a block
void * | release (int i)
| release ownership of the block More...
void * | block (int i) const
template<class Block >
Block * | block (int i) const
Link * | link (int i) const
int | loaded_block () const
void | unload (int i)
void | load (int i)
void | unload (std::vector< int > &loaded)
void | unload_all ()
bool | has_incoming (int i) const
void | unload_queues (int i)
void | unload_incoming (int gid)
void | unload_outgoing (int gid)
void | load_queues (int i)
void | load_incoming (int gid)
void | load_outgoing (int gid)
const mpi::communicator & | communicator () const
| return the MPI communicator
mpi::communicator & | communicator ()
| return the MPI communicator
void * | get (int i)
| return the `i`-th block, loading it if necessary
int | gid (int i) const
| return gid of the `i`-th block
int | lid (int gid) const
| return the local id of the local block with global id gid, or -1 if not local
bool | local (int gid) const
| whether the block with global id gid is local
void | exchange ()
| exchange the queues between all the blocks (collective operation)
void | process_collectives ()
ProxyWithLink | proxy (int i) const
unsigned | size () const
| return the number of local blocks
void * | create () const
int | limit () const
int | threads () const
int | in_memory () const
void | set_threads (int threads)
CreateBlock | creator () const
DestroyBlock | destroyer () const
LoadBlock | loader () const
SaveBlock | saver () const
template<class Block >
void | foreach_ (const Callback< Block > &f, const Skip &s=NeverSkip())
| call `f` with every block
template<class F >
void | foreach (const F &f, const Skip &s=NeverSkip())
void | execute ()
bool | immediate () const
void | set_immediate (bool i)
IncomingQueues & | incoming (int gid)
OutgoingQueues & | outgoing (int gid)
CollectivesList & | collectives (int gid)
size_t | incoming_count (int gid) const
size_t | outgoing_count (int gid) const
void | set_expected (int expected)
void | add_expected (int i)
int | expected () const
void | replace_link (int i, Link *link)
void | flush ()

## Public Attributes
std::shared_ptr< spd::logger > | log = get_logger()
stats::Profiler | prof

## Detailed Description

Examples:
  decomposition/regular-decomposer-long.cpp, decomposition/regular-decomposer-short.cpp, decomposition/test-direct-master.cpp, reduce/all-done.cpp, reduce/all-to-all.cpp, reduce/kd-tree.cpp, reduce/merge-reduce.cpp, reduce/sample-sort.cpp, reduce/sort.cpp, reduce/swap-reduce.cpp, simple/read-blocks.cpp, simple/simple.cpp, and simple/until-done.cpp.

## Member Function Documentation

void * diy::Master::release | ( | int | i | ) |
| inline

release ownership of the block

return the `i`-th block

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

- include/diy/master.hpp