00001 00005 00006 #ifndef _REFINELB_H_ 00007 #define _REFINELB_H_ 00008 00009 #include "CentralLB.h" 00010 #include "Refiner.h" 00011 #include "RefineLB.decl.h" 00012 00013 class minheap; 00014 class maxheap; 00015 00016 void CreateRefineLB(); 00017 BaseLB *AllocateRefineLB(); 00018 00019 class RefineLB : public CBase_RefineLB { 00020 protected: 00021 computeInfo *computes; 00022 processorInfo *processors; 00023 minHeap *pes; 00024 maxHeap *computesHeap; 00025 int P; 00026 int numComputes; 00027 double averageLoad; 00028 00029 double overLoad; 00030 00031 public: 00032 RefineLB(const CkLBOptions &); 00033 RefineLB(CkMigrateMessage *m):CBase_RefineLB(m) { lbname = (char *)"RefineLB"; } 00034 void work(LDStats* stats); 00035 private: 00036 bool QueryBalanceNow(int step) { return true; } 00037 00038 protected: 00039 /* 00040 void create(LDStats* stats, int count); 00041 void assign(computeInfo *c, int p); 00042 void assign(computeInfo *c, processorInfo *p); 00043 void deAssign(computeInfo *c, processorInfo *pRec); 00044 void computeAverage(); 00045 double computeMax(); 00046 int refine(); 00047 */ 00048 }; 00049 00050 #endif /* _REFINELB_H_ */ 00051