00001 00005 00006 #ifndef CENTRAL_ADAPTIVE_LB_H 00007 #define CENTRAL_ADAPTIVE_LB_H 00008 00009 #include "CentralLB.h" 00010 #include "AdaptiveLB.decl.h" 00011 00012 void CreateAdaptiveLB(); 00013 00015 typedef LBMigrateMsg CLBMigrateMsg; 00016 00017 class AdaptiveLB : public CBase_AdaptiveLB 00018 { 00019 public: 00020 AdaptiveLB(const CkLBOptions &); 00021 AdaptiveLB(CkMigrateMessage *m):CBase_AdaptiveLB(m) {} 00022 00023 protected: 00024 virtual bool QueryBalanceNow(int) { return true; }; 00025 virtual void work(LDStats* stats); 00026 // void computeNonlocalComm(long long &nmsgs, long long &nbytes); 00027 00028 private: 00029 CentralLB *greedyLB; 00030 CentralLB *refineLB; 00031 CentralLB *metisLB; 00032 CentralLB *commRefineLB; 00033 MetaBalancer* metabalancer; 00034 }; 00035 00036 #endif /* CENTRAL_ADAPTIVE_LB_H */ 00037