|
HMLP: High-performance Machine Learning Primitives
|
#include <tree_mpi.hpp>
Public Types | |
| typedef SETUP::T | T |
Public Types inherited from hmlp::tree::Node< SETUP, NODEDATA > | |
| typedef SETUP::T | T |
Public Member Functions | |
| Node (SETUP *setup, size_t n, size_t l, Node *parent, unordered_map< size_t, tree::Node< SETUP, NODEDATA > * > *morton2node, Lock *treelock, mpi::Comm comm) | |
| Node (SETUP *setup, size_t n, size_t l, vector< size_t > &gids, Node *parent, unordered_map< size_t, tree::Node< SETUP, NODEDATA > * > *morton2node, Lock *treelock, mpi::Comm comm) | |
| Node (size_t morton) | |
| void | Split () |
| void | DependOnChildren (Task *task) |
| Support dependency analysis. More... | |
| void | DependOnParent (Task *task) |
| void | Print () |
| mpi::Comm | GetComm () |
| int | GetCommSize () |
| int | GetCommRank () |
Public Member Functions inherited from hmlp::tree::Node< SETUP, NODEDATA > | |
| Node (SETUP *setup, size_t n, size_t l, Node *parent, unordered_map< size_t, Node * > *morton2node, Lock *treelock) | |
| Node (SETUP *setup, int n, int l, vector< size_t > gids, Node *parent, unordered_map< size_t, Node * > *morton2node, Lock *treelock) | |
| Node (size_t morton) | |
| ~Node () | |
| void | Resize (int n) |
| void | Split () |
| bool | ContainAny (vector< size_t > &queries) |
| Check if this node contain any query using morton. Notice that queries[] contains gids; thus, morton[] needs to be accessed using gids. More... | |
| bool | ContainAny (set< Node * > &querys) |
| void | Print () |
| void | DependOnChildren (Task *task) |
| void | DependOnParent (Task *task) |
| void | DependOnNoOne (Task *task) |
Public Member Functions inherited from hmlp::ReadWrite | |
| ReadWrite () | |
| void | DependencyAnalysis (ReadWriteType type, Task *task) |
| This is the key function that encode the dependency. More... | |
| void | DependencyCleanUp () |
Public Attributes | |
| Node * | child = NULL |
Public Attributes inherited from hmlp::tree::Node< SETUP, NODEDATA > | |
| SETUP * | setup = NULL |
| NODEDATA | data |
| size_t | n |
| size_t | l |
| size_t | morton = 0 |
| size_t | offset = 0 |
| size_t | treelist_id |
| vector< size_t > | gids |
| set< size_t > | FarIDs |
| set< Node * > | FarNodes |
| set< size_t > | FarNodeMortonIDs |
| set< size_t > | NearIDs |
| set< Node * > | NearNodes |
| set< size_t > | NearNodeMortonIDs |
| set< size_t > | NNFarIDs |
| set< Node * > | NNFarNodes |
| set< Node * > | ProposedNNFarNodes |
| set< size_t > | NNFarNodeMortonIDs |
| set< size_t > | NNNearIDs |
| set< Node * > | NNNearNodes |
| set< Node * > | ProposedNNNearNodes |
| set< size_t > | NNNearNodeMortonIDs |
| vector< map< size_t, Data< T > > > | DistFar |
| vector< map< size_t, Data< T > > > | DistNear |
| Lock * | treelock = NULL |
| Node * | kids [N_CHILDREN] |
| Node * | lchild = NULL |
| Node * | rchild = NULL |
| Node * | sibling = NULL |
| Node * | parent = NULL |
| unordered_map< size_t, Node * > * | morton2node = NULL |
| bool | isleaf |
Public Attributes inherited from hmlp::ReadWrite | |
| deque< Task * > | read |
| deque< Task * > | write |
Static Public Attributes | |
| static const int | N_CHILDREN = 2 |
Static Public Attributes inherited from hmlp::tree::Node< SETUP, NODEDATA > | |
| static const int | N_CHILDREN = 2 |
end class IndexPermuteTask
| typedef SETUP::T hmlp::mpitree::Node< SETUP, NODEDATA >::T |
Deduce data type from SETUP.
|
inline |
Inherit all parameters from tree::Node (Default) constructor for inner nodes (gids and n unassigned)
Local communicator
Get MPI size and rank.
|
inline |
(Default) constructor for root.
Notice that "gids.size() < n".
|
inline |
(Default) constructor for LET nodes.
|
inline |
|
inline |
Try to enqueue if there is no dependency.
|
inline |
Return local MPI communicator.
|
inline |
Return local MPI rank.
|
inline |
Return local MPI size.
|
inline |
end DependOnParent() Preserve for debugging.
|
inline |
Reduce to get the total size of gids.
n = sum( num_points_owned ) over all MPI processes in comm.
The local communicator of this node contains at least 2 processes.
Invoke distributed splitter.
Get partner MPI rank.
left child
MPI ranks 0:size/2-1 keep split[ 0 ]
MPI ranks 0:size/2-1 send split[ 1 ]
right child
MPI ranks size/2:size-1 keep split[ 1 ]
MPI ranks size/2:size-1 send split[ 0 ]
Exchange recv_gids.size().
resize recv_gids
Exchange recv_gids.size()
Exchange gids with my partner.
kept_gids += recv_gids.
Synchronize within local communicator
| Node* hmlp::mpitree::Node< SETUP, NODEDATA >::child = NULL |
Distributed tree nodes only have one child.