forked from N-BodyShop/changa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PETreeMerger.h
35 lines (25 loc) · 904 Bytes
/
PETreeMerger.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef PE_TREE_MERGER_H
#define PE_TREE_MERGER_H
#include "ParallelGravity.h"
/// @addtogroup TreeBuild
/// @{
/// @brief Group to coordinate requests for remote moments during the
/// tree build
///
/// This group is used if MERGE_REMOTE_REQUESTS is defined.
class PETreeMerger : public CBase_PETreeMerger {
CkVec<GenericTreeNode*> submittedRoots;
CkVec<TreePiece*> submittedTreePieces;
NonEmptyTreePieceCounter submittingTreePieceCounter;
public:
PETreeMerger() {}
PETreeMerger(CkMigrateMessage *m) : CBase_PETreeMerger(m) {}
void pup(PUP::er &p) { CBase_PETreeMerger::pup(p); }
void mergeNonLocalRequests(GenericTreeNode *root, TreePiece *treePiece);
void freeTree();
private:
void mergeWalk(CkVec<GenericTreeNode*> &mergeList, CkVec<TreePiece*> &treePieceList);
void requestNonLocalMoments(GenericTreeNode *pickedNode, TreePiece *pickedTreePiece);
};
/// @}
#endif