00001
00002
00003
00004
00005
00006 #ifndef LBOBJ1_H
00007 #define LBOBJ1_H
00008
00009 class lbObjectNode {
00010 public:
00011 POSE_TimeType ovt;
00012 int index;
00013 sim *localObjPtr;
00014 short int present, sync;
00015
00016
00017 POSE_TimeType eet;
00018 int ne, execPrio;
00019 double rbOh;
00020 int *comm;
00021 int totalComm, localComm, remoteComm, maxComm, maxCommPE;
00022 lbObjectNode() {
00023 present = 0; eet = 0; rbOh = -1.0;
00024 ne=0;
00025 comm = (int *)malloc(CkNumPes() * sizeof(int));
00026 for (int i=0; i<CkNumPes(); i++) comm[i] = 0;
00027 totalComm = localComm = remoteComm = maxComm = 0;
00028 maxCommPE = -1;
00029 }
00030 inline void Set(POSE_TimeType ts, int idx, short int on, short int s) {
00031 ovt = ts; index = idx; present = on; sync = s;
00032 }
00033 void dump() {
00034 #if USE_LONG_TIMESTAMPS
00035 CkPrintf("ovt=%lld index=%d present=%d sync=%s",
00036 ovt, index, present, (sync==0)?"OPT":"CON");
00037 #else
00038 CkPrintf("ovt=%d index=%d present=%d sync=%s",
00039 ovt, index, present, (sync==0)?"OPT":"CON");
00040 #endif
00041 }
00042 };
00043
00044 class lbObjects {
00045 public:
00046 int numObjs, numSpaces, size, firstEmpty;
00047 lbObjectNode *objs;
00048 lbObjects();
00049 int Insert(int sync, int index, sim *myPtr);
00050 void Delete(int idx);
00051 void UpdateEntry(int idx, POSE_TimeType ovt, POSE_TimeType eet, int ne, double rbOh, int *srVec);
00052 void AddComm(int idx, int pe, int sr);
00053 void ResetComm();
00054 void RequestReport();
00055 void dump();
00056 };
00057
00058 #endif