44 #include "ck128bitHash.h"
51 CkVec<CkVec<T> > lists;
52 int totalNumInteractions;
54 GenericList() : totalNumInteractions(0) {}
58 for(
int i = 0; i < lists.length(); i++){
59 lists[i].length() = 0;
61 totalNumInteractions = 0;
65 for(
int i = 0; i < lists.length(); i++){
69 totalNumInteractions = 0;
72 void init(
int numBuckets,
int numper){
73 lists.resize(numBuckets);
74 for(
int i = 0; i < numBuckets; i++){
75 lists[i].reserve(numper);
88 bucketStart = bucketNode->bucketArrayIndex;
89 CkAssert(bucketStart >= 0);
92 void getActiveBucketParameters(
TreePiece *tp,
98 BucketActiveInfo *binfo = &(tp->bucketActiveInfo[bucket]);
102 bucketSize = tp->bucketActiveInfo[bucket].size;
103 bucketStart = tp->bucketActiveInfo[bucket].start;
104 CkAssert(bucketStart >= 0);
145 GenericList<ILCell> nodeLists;
146 GenericList<ILPart> particleLists;
148 #ifdef HAPI_INSTRUMENT_WRS
153 CkVec<CudaMultipoleMoments> *nodes;
154 CkVec<CompactPartData> *particles;
169 CkVec<GenericTreeNode *> markedBuckets;
173 std::unordered_map<NodeKey,int> nodeMap;
174 std::unordered_map<NodeKey,int> partMap;
176 bool nodeOffloadReady(){
177 return nodeLists.totalNumInteractions >= nodeThreshold;
180 bool partOffloadReady(){
181 return particleLists.totalNumInteractions >= partThreshold;
184 #ifdef HAPI_INSTRUMENT_WRS
185 void updateNodeThreshold(
int t){
188 void updatePartThreshold(
int t){
205 partMap.reserve(100);
209 #ifdef HAPI_INSTRUMENT_WRS
210 void nodeListConstructionTimeStart(){
211 nodeListTime = CmiWallTimer();
214 double nodeListConstructionTimeStop(){
215 return CmiWallTimer()-nodeListTime;
218 void partListConstructionTimeStart(){
219 partListTime = CmiWallTimer();
222 double partListConstructionTimeStop(){
223 return CmiWallTimer()-partListTime;
228 #endif // INTERLIST_VER
CkQ< OffsetNode > CheckList
Queue of nodes to check for interactions.
Definition: ParallelGravity.h:629
CkVec< CkVec< OffsetNode > > clists
Lists of cells to be computed. One list for each level.
Definition: State.h:126
int currentBucket
The bucket we have started to walk.
Definition: State.h:12
bool * placedRoots
Definition: State.h:137
CkVec< CkVec< RemotePartInfo > > rplists
Lists of remote particles to be computed. One list for each level.
Definition: State.h:130
int * counterArrays[2]
counters to keep track of outstanding remote processor
Definition: State.h:36
Base class for tree nodes.
Definition: GenericTreeNode.h:59
Base class for maintaining the state of a tree walk.
Definition: State.h:6
int lastParticle
An index to the last particle contained by this node, myNumParticles+1 means outside the node...
Definition: GenericTreeNode.h:108
GenericTreeNode * lowestNode
Definition: State.h:200
Fundamental structure that holds particle and tree data.
Definition: ParallelGravity.h:730
CkVec< CkVec< LocalPartInfo > > lplists
Lists of local particles to be computed. One list for each level.
Definition: State.h:128
int firstParticle
An index for the first particle contained by this node, 0 means outside the node. ...
Definition: GenericTreeNode.h:106
Data and parameters for requesting gravity calculations on the GPU.
Definition: HostCUDA.h:107
Hold state where both the targets and sources are tree walked.
Definition: State.h:117
unsigned int bucketSize
Definition: ParallelGravity.cpp:125
CkVec< UndecidedList > UndecidedLists
Vector of undecided lists, one for each level.
Definition: ParallelGravity.h:633
int myNumParticlesPending
Keep track of how many buckets are unfinished. XXX note the misnomer.
Definition: State.h:21
CheckList * chklists
Definition: State.h:121
UndecidedLists undlists
Definition: State.h:124
int bWalkDonePending
Definition: State.h:10
int numPendingChunks
Number of pending chunks.
Definition: State.h:32