Merging
[charm.git] / src / ck-ldb / AdaptiveLB.h
1 /**
2  * \addtogroup CkLdb
3 */
4 /*@{*/
5
6 #ifndef CENTRAL_ADAPTIVE_LB_H
7 #define CENTRAL_ADAPTIVE_LB_H
8
9 #include "CentralLB.h"
10 #include "AdaptiveLB.decl.h"
11
12 void CreateAdaptiveLB();
13
14 /// for backward compatibility
15 typedef LBMigrateMsg  CLBMigrateMsg;
16
17 class AdaptiveLB : public CentralLB
18 {
19 public:
20   AdaptiveLB(const CkLBOptions &);
21   AdaptiveLB(CkMigrateMessage *m):CentralLB(m) {}
22
23 protected:
24   virtual CmiBool QueryBalanceNow(int) { return CmiTrue; };  
25   virtual void work(LDStats* stats);
26   void computeNonlocalComm(long long &nmsgs, long long &nbytes);
27
28 private:  
29 //  CProxy_CentralLB thisProxy;
30   CentralLB *greedyLB;
31   CentralLB *refineLB;
32   CentralLB *metisLB;
33 };
34
35 #endif /* CENTRAL_ADAPTIVE_LB_H */
36
37 /*@}*/
38
39