14 if (fi->Read(&c,
sizeof(c)) == 0)
return nstep;
16 if (c ==
'\n' || c ==
'\r')
break;
20 if (fi->Read(&c,
sizeof(c)) == 0)
return nstep;
21 if (c !=
'\n' && c !=
'\r')
break;
30 for (
const char *p = end - 1; p != begin; --p) {
31 if (*p ==
'\n' || *p ==
'\r')
return p + 1;
37 if (chunk->begin == chunk->end)
return false;
39 for (p = chunk->begin; p != chunk->end; ++p) {
40 if (*p ==
'\n' || *p ==
'\r')
break;
42 for (; p != chunk->end; ++p) {
43 if (*p !=
'\n' && *p !=
'\r')
break;
46 if (p == chunk->end) {
51 out_rec->
dptr = chunk->begin;
52 out_rec->
size = p - chunk->begin;
interface of stream I/O for serialization
Definition io.h:30
virtual size_t SeekRecordBegin(Stream *fi)
seek to the beginning of the first record in current file pointer
Definition line_split.cc:9
virtual const char * FindLastRecordBegin(const char *begin, const char *end)
find the last occurance of record header
Definition line_split.cc:27
virtual bool ExtractNextRecord(Blob *out_rec, Chunk *chunk)
extract next record from the chunk
Definition line_split.cc:36
defines serializable interface of dmlc
defines logging macros of dmlc allows use of GLOG, fall back to internal implementation when disabled
base class implementation of input splitter
namespace for dmlc
Definition array_view.h:12