changa  3.5
 All Classes Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
Orb3dLB.h
1 
5 
6 #ifndef _ORB3DLB_H_
7 #define _ORB3DLB_H_
8 
9 #include "CentralLB.h"
10 #include "MapStructures.h"
11 #include "Orb3dLB.decl.h"
12 #include "TaggedVector3D.h"
13 #include <queue>
14 
15 class Orb3dLB : public CBase_Orb3dLB {
16  friend class MultistepLB;
17 private:
18  bool firstRound;
19  bool centroidsAllocated;
20  ComparatorFn compares[NDIMS];
21  ComparatorFn pc[NDIMS];
22  // pointer to stats->to_proc
23  decltype(LDStats::to_proc) *mapping;
24 
25  int procsPerNode;
26 
27  CkVec<TPObject> tps;
28  CkVec<Node> nodes;
29 
30  void init();
31  bool QueryBalanceNow(int step);
32 
33  void printData(BaseLB::LDStats &stats, int phase, int *revObjMap);
34 
35 public:
36  Orb3dLB(const CkLBOptions &);
37  Orb3dLB(CkMigrateMessage *m) : CBase_Orb3dLB(m) {init();}
38  void work(BaseLB::LDStats* stats);
39  void directMap(int tpstart, int tpend, int nodestart, int nodeend);
40  void map(int tpstart, int tpend, int nodestart, int nodeend, int xs, int ys, int zs, int dim);
41  int nextDim(int dim, int xs, int ys, int zs);
42  void partitionEvenLoad(int tpstart, int tpend, int &tpmid);
43  void halveNodes(int nodestart, int nodeend, int &nodemid);
44 
45 
46 };
47 
48 #endif /* _ORB3DLB_H_ */
49 
Definition: Orb3dLB.h:15
Definition: MultistepLB.h:28