18 LBObj(const LDObjHandle
&_h
, void *usr_ptr
= NULL
, bool _migratable
=true, bool _asyncArrival
= false) {
20 data
.migratable
= _migratable
;
21 data
.asyncArrival
= _asyncArrival
;
24 // data.wallTime = 0.;
25 // data.minWall = 1e6;
27 localUserData
= usr_ptr
;
28 // migratable = _migratable;
42 void IncrementTime(LBRealType walltime
, LBRealType cputime
);
43 inline void StartTimer(void) {
44 startWTime
= CkWallTimer();
46 startCTime
= CkCpuTimer();
49 inline void StopTimer(LBRealType
* walltime
, LBRealType
* cputime
) {
50 if (startWTime
>= 0.0) { // in case startOn in middle of entry
51 const double endWTime
= CkWallTimer();
52 *walltime
= endWTime
- startWTime
;
54 const double endCTime
= CkCpuTimer();
55 *cputime
= endCTime
- startCTime
;
61 *walltime
= *cputime
= 0.0;
65 inline void getTime(LBRealType
*w
, LBRealType
*c
) {
74 inline void setTiming(LBRealType cputime
)
76 data
.wallTime
= cputime
;
78 data
.cpuTime
= cputime
;
82 inline LDOMHandle
&parentOM() { return data
.handle
.omhandle
; }
83 inline const LDObjHandle
&GetLDObjHandle() const { return data
.handle
; }
84 inline void SetMigratable(bool mig
) { data
.migratable
= mig
; }
85 inline void setPupSize(size_t obj_pup_size
) {
86 data
.pupSize
= pup_encodeSize(obj_pup_size
);
88 inline void UseAsyncMigrate(bool async
) { data
.asyncArrival
= async
; }
89 inline LDObjData
&ObjData() { return data
; };
90 inline void lastKnownLoad(LBRealType
*w
, LBRealType
*c
) {
98 inline void *getLocalUserData() { return localUserData
; }
100 inline void *getDBUserData(int idx
) { return data
.getUserData(idx
); }
104 void *localUserData
; // local user data, not in database
105 // LDOMHandle parentOM;
106 // LDObjHandle myhandle;
109 double startWTime
; // needs double precision
110 LBRealType lastWallTime
;
113 LBRealType lastCpuTime
;
115 // bool migratable; // temp