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

Method DoInit

util/system/filemap.h:279–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277
278private:
279 void DoInit(const TString& fileName) {
280 DataHolder_->Map(0, DataHolder_->Length());
281 if (DataHolder_->Length() % sizeof(T)) {
282 Term();
283 ythrow yexception() << "Incorrect size of file " << fileName.Quote();
284 }
285 Ptr_ = (const T*)DataHolder_->Ptr();
286 Size_ = DataHolder_->Length() / sizeof(T);
287 End_ = Ptr_ + Size_;
288 }
289};
290
291class TMappedAllocation: TMoveOnly {

Callers

nothing calls this directly

Calls 4

TermClass · 0.85
MapMethod · 0.45
LengthMethod · 0.45
PtrMethod · 0.45

Tested by

no test coverage detected