27 #ifndef bits_gpulog_ilogstream_h__
28 #define bits_gpulog_ilogstream_h__
35 struct unexpected_end_of_buffer_exception : std::exception {
37 return "Unexpected end of buffer, the record retrieved is only half correct";
48 const char *
const ptr;
53 __device__ __host__
ilogstream(
const char *ptr_,
size_t len_) : ptr(ptr_), at(0), len(len_), hend(-1, 0) {}
55 __device__ __host__
ilogstream(
const host_log &l) : ptr(l.internal_buffer()), at(0), len(l.size()), hend(-1, 0) {}
61 if(at == len) {
return logrecord((
char *)&hend); }
71 const size_t& cursor(){