MCPcopy Create free account
hub / github.com/catboost/catboost / Load

Method Load

util/stream/input.cpp:57–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57size_t IInputStream::Load(void* buf_in, size_t len) {
58 char* buf = (char*)buf_in;
59
60 while (len) {
61 const size_t ret = Read(buf, len);
62
63 buf += ret;
64 len -= ret;
65
66 if (ret == 0) {
67 break;
68 }
69 }
70
71 return buf - (char*)buf_in;
72}
73
74void IInputStream::LoadOrFail(void* buf, size_t len) {
75 const size_t realLen = Load(buf, len);

Callers 3

Y_UNIT_TESTFunction · 0.45
Y_UNIT_TESTFunction · 0.45
TestBufferedIOMethod · 0.45

Calls 1

ReadFunction · 0.50

Tested by 1

TestBufferedIOMethod · 0.36