Link conv-cpm as C++
[charm.git] / src / conv-ldb / cldb.prioritycentralized.h
blobd3af38b0a5a9cbc2b80f826be6aa4f6d82a62a88
1 #include "cldb.h"
2 /* for sqrt() */
3 #include <math.h>
6 typedef struct CldNeighborData_s
8 int pe, load;
9 } *CldNeighborData;
11 typedef struct loadmsg_s {
12 char header[CmiMsgHeaderSizeBytes];
13 int pe, load;
14 } loadmsg;
17 /* work request message when idle */
18 typedef struct requestmsg_s {
19 char header[CmiMsgHeaderSizeBytes];
20 int from_pe;
21 unsigned int priority;
22 int notidle;
23 } requestmsg;
25 typedef struct readytoexectoken_s{
26 unsigned int priority;
27 void *msg;
28 } readytoexectoken;
29 /******************* Yanhua seed load balancer */
31 typedef struct CldProcInfo_s {
32 double lastCheck;
33 int sent; /* flag to disable idle work request */
34 int balanceEvt; /* user event for balancing */
35 int idleEvt; /* user event for idle balancing */
36 int idleprocEvt; /* user event for processing idle req */
37 int load;
38 } *CldProcInfo;
40 /* this is used by master to store the highest priority for each processor */
41 typedef struct CldProcPriorInfo_s {
42 int pe;
43 int priority;
44 } *CldProcPriorInfo;
46 typedef struct CldSlavePriorInfo_s {
47 int pe;
48 double average_priority;
49 //int priority_1;
50 //int priority_2;
51 int load;
52 } CldSlavePriorInfo;