|
DIY
3.0
data-parallel out-of-core C++ library
|
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 int | 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 |
|
inline |
The main DIY object.
Helper functions specify how to: create an empty block, destroy a block (a function that's expected to upcast and delete), serialize a block
| comm | communicator |
| threads__ | number of threads DIY can use |
| limit__ | number of blocks to store in memory |
| create_ | block create function; master manages creation if create != 0 |
| destroy_ | block destroy function; master manages destruction if destroy != 0 |
| storage | storage object (path, method, etc.) for storing temporary blocks being shuffled in/out of core |
| save | block save function; master manages saving if save != 0 |
| load_ | block load function; master manages loading if load != 0 |
|
inline |
release ownership of the block
return the i-th block
1.8.6