00001 #include "cldb.h" 00002 /* for sqrt() */ 00003 #include <math.h> 00004 00005 00006 typedef struct CldNeighborData_s 00007 { 00008 int pe, load; 00009 } *CldNeighborData; 00010 00011 typedef struct loadmsg_s { 00012 char header[CmiMsgHeaderSizeBytes]; 00013 int pe, load; 00014 } loadmsg; 00015 00016 00017 /* work request message when idle */ 00018 typedef struct requestmsg_s { 00019 char header[CmiMsgHeaderSizeBytes]; 00020 int from_pe; 00021 unsigned int priority; 00022 int notidle; 00023 } requestmsg; 00024 00025 typedef struct readytoexectoken_s{ 00026 unsigned int priority; 00027 void *msg; 00028 } readytoexectoken; 00029 /******************* Yanhua seed load balancer */ 00030 00031 typedef struct CldProcInfo_s { 00032 double lastCheck; 00033 int sent; /* flag to disable idle work request */ 00034 int balanceEvt; /* user event for balancing */ 00035 int idleEvt; /* user event for idle balancing */ 00036 int idleprocEvt; /* user event for processing idle req */ 00037 int load; 00038 } *CldProcInfo; 00039 00040 /* this is used by master to store the highest priority for each processor */ 00041 typedef struct CldProcPriorInfo_s { 00042 int pe; 00043 int priority; 00044 } *CldProcPriorInfo; 00045 00046 typedef struct CldSlavePriorInfo_s { 00047 int pe; 00048 double average_priority; 00049 //int priority_1; 00050 //int priority_2; 00051 int load; 00052 } CldSlavePriorInfo; 00053