17 #ifndef SCIP2_WALLTIME_H 18 #define SCIP2_WALLTIME_H 24 template <
int DEVICE_TIMESTAMP_BITS>
33 uint64_t
update(
const uint32_t &time_device)
37 time_device_prev_ = time_device;
41 if (time_device < (1 << DEVICE_TIMESTAMP_BITS) / 2 &&
42 (1 << DEVICE_TIMESTAMP_BITS) / 2 < time_device_prev_)
43 walltime_device_base_ += 1 << DEVICE_TIMESTAMP_BITS;
44 time_device_prev_ = time_device;
46 return walltime_device_base_ + time_device;
50 , time_device_prev_(0)
51 , walltime_device_base_(0)
57 #endif // SCIP2_WALLTIME_H
uint64_t update(const uint32_t &time_device)
uint64_t walltime_device_base_
uint32_t time_device_prev_