-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTreePiece.h
81 lines (57 loc) · 1.57 KB
/
TreePiece.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef __TREE_PIECE_H__
#define __TREE_PIECE_H__
#include "defines.h"
#include "OrientedBox.h"
#include "barnes.decl.h"
#include "Particle.h"
#include "Messages.h"
#include "Node.h"
#include "Vector3D.h"
#include "State.h"
#include "Worker.h"
#include "MultipoleMoments.h"
#include "Traversal_decls.h"
class TreePiece : public CBase_TreePiece {
int numDecompMsgsRecvd;
CkVec<ParticleMsg *> decompMsgsRecvd;
int myNumParticles;
int iteration;
int myNumBuckets;
Node<ForceData> **myBuckets;
Node<ForceData> *root;
State localTraversalState;
State remoteTraversalState;
LocalTraversalWorker localTraversalWorker;
RemoteTraversalWorker remoteTraversalWorker;
Traversal<ForceData> trav;
Key smallestKey;
Key largestKey;
DataManager *myDM;
void submitParticles();
int localStateID;
int remoteStateID;
int totalNumTraversals;
int numTraversalsDone;
void traversalDone();
void finishIteration();
void checkTraversals();
public:
TreePiece();
TreePiece(CkMigrateMessage *) {}
int getIndex() {return thisIndex;}
void receiveParticles(ParticleMsg *msg);
void receiveParticles();
void prepare(Node<ForceData> *_root, Node<ForceData> **buckets, int bucketStart, int bucketEnd);
void startTraversal();
void doLocalGravity(RescheduleMsg *);
void doRemoteGravity(RescheduleMsg *);
void requestParticles(RequestMsg *msg);
void requestNode(RequestMsg *msg);
void localGravityDone();
void remoteGravityDone();
void requestMoments(Key k, int replyTo);
void quiescence();
int getIteration();
void pup(PUP::er &p);
};
#endif