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

Function ReadFromFile

util/memory/blob.cpp:304–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302
303template <class TCounter>
304static inline TBlob ReadFromFile(const TFile& file, ui64 offset, size_t length) {
305 using TBase = TDynamicBlobBase<TCounter>;
306 THolder<TBase> base(new (length) TBase);
307
308 Y_ASSERT(base->Length() == length);
309
310 file.Pload(base->Data(), length, offset);
311
312 TBlob ret(base->Data(), length, base.Get());
313 Y_UNUSED(base.Release());
314
315 return ret;
316}
317
318template <class TCounter>
319static inline TBlob ConstructFromFileContent(const TFile& file, ui64 offset, ui64 length) {

Callers 1

PreadMethod · 0.50

Calls 6

Y_UNUSEDFunction · 0.85
LengthMethod · 0.45
PloadMethod · 0.45
DataMethod · 0.45
GetMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected