24 #ifndef REFINEONLY_DEFS_H
25 #define REFINEONLY_DEFS_H
30 #include "TopoManager.h"
32 #include "ProxyMgr.decl.h"
35 #define LDB_DEBUG 0 // for verbose LDB output
36 #define PROXY_CORRECTION 0
37 #define COMPUTE_CORRECTION 0
39 #include "ckhashtable.h"
52 CkHashCode
hash (
void)
const {
74 CkHashtableT <ProxyUsageKey, int>
htable;
84 int val =
htable.get (pkey);
85 htable.put (pkey) = val + 1;
91 int val =
htable.get (pkey);
120 int nComps,
int nPatches,
int nPes);
150 int *nPatches,
int *nProxies,
int *isBadForCommunication);
179 inline void brickDim(
int a,
int b,
int dim,
int &min,
int &max) {
180 int x1, x2, x3, x4, temp, i;
191 min = x2; max = x1 + dim;
200 int ym,
int yM,
int dimY,
int zm,
int zM,
int dimZ) {
202 if( ((x >= xm) && (x <= xM)) || ((x < xm) && (x+dimX <= xM)) ) wbX = 1;
else return 0;
203 if( ((y >= ym) && (y <= yM)) || ((y < ym) && (y+dimY <= yM)) ) wbY = 1;
else return 0;
204 if( ((z >= zm) && (z <= zM)) || ((z < zm) && (z+dimZ <= zM)) ) wbZ = 1;
else return 0;
static CkHashCode staticHash(const void *x, size_t size)
CkHashtableT< ProxyUsageKey, int > htable
CollectLoadsMsg * collMsg
void createSpanningTree()
void assign(computeInfo *c, processorInfo *pRec)
ProxyUsageKey(int pe, int patch)
void refine_togrid(pcgrid &grid, double thresholdLoad, processorInfo *p, computeInfo *c)
processorInfo * processors
void printLoads(int phase=0)
void numAvailable(computeInfo *c, processorInfo *p, int *nPatches, int *nProxies, int *isBadForCommunication)
void deAssign(computeInfo *c, processorInfo *pRec)
void multirefine(double overload_start=1.02)
maxHeap * computeBgSelfHeap
maxHeap * computeSelfHeap
maxHeap * computePairHeap
int withinBrick(int x, int y, int z, int xm, int xM, int dimX, int ym, int yM, int dimY, int zm, int zM, int dimZ)
void increment(int pe, int patch)
static int staticCompare(const void *a, const void *b, size_t size)
void brickDim(int a, int b, int dim, int &min, int &max)
void adjustBackgroundLoadAndComputeAverage()
void decrement(int pe, int patch)
int compare(const ProxyUsageKey &in) const
maxHeap * computeBgPairHeap
int isAvailableOn(patchInfo *patch, processorInfo *p)
int getVal(int pe, int patch)
Rebalancer(computeInfo *computeArray, patchInfo *patchArray, processorInfo *processorArray, int nComps, int nPatches, int nPes)
const char * strategyName
CkHashCode hash(void) const