10 #include "OrbLB.decl.h"
13 BaseLB
*AllocateOrbLB(void);
15 class OrbLB
: public CBase_OrbLB
{
16 public:/* <- Sun CC demands Partition be public for ComputeLoad to access it. */
21 double load
; // total load in this set
22 int origin
[3]; // box coordinates
24 int count
; // number of objects in this partition
26 CkVec
<int> bkpes
; // background processors
28 Partition(): refno(0), load(0.0), node(-1), mapped(0) {};
38 Partition
* partition
;
47 enum {XDIR
=0, YDIR
, ZDIR
};
51 ComputeLoad
*computeLoad
;
53 VecArray
*(vArray
[3]);
54 Partition
*partitions
;
55 Partition top_partition
;
62 void rec_divide(int, Partition
&);
63 void setVal(int x
, int y
, int z
);
64 int sort_partition(int x
, int p
, int r
);
65 void qsort(int x
, int p
, int r
);
66 void quicksort(int x
);
67 void mapPartitionsToNodes();
73 OrbLB(const CkLBOptions
&);
74 OrbLB(const CkLBOptions
&, bool userdata
);
75 OrbLB(CkMigrateMessage
*m
):CBase_OrbLB(m
) { init(); }
77 void work(LDStats
* stats
);
78 bool QueryBalanceNow(int step
);
82 #endif /* _ORBLB_H_ */