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

Method LoadThin

catboost/libs/model/ctr_value_table.cpp:73–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void TCtrValueTable::LoadThin(TMemoryInput* in) {
74 auto len = LoadSize(in);
75 auto ptr = in->Buf();
76 in->Skip(len);
77
78 using namespace flatbuffers;
79 Impl = TThinTable();
80 auto& thin = std::get<TThinTable>(Impl);
81 auto ctrValueTable = flatbuffers::GetRoot<NCatBoostFbs::TCtrValueTable>(ptr);
82 ModelCtrBase.FBDeserialize(ctrValueTable->ModelCtrBase());
83 CounterDenominator = ctrValueTable->CounterDenominator();
84 TargetClassesCount = ctrValueTable->TargetClassesCount();
85
86 thin.IndexBuckets = TConstArrayRef<NCatboost::TBucket>(
87 reinterpret_cast<const NCatboost::TBucket*>(ctrValueTable->IndexHashRaw()->data()),
88 reinterpret_cast<const NCatboost::TBucket*>(ctrValueTable->IndexHashRaw()->data() + ctrValueTable->IndexHashRaw()->size())
89 );
90 thin.CTRBlob = TConstArrayRef<ui8>(ctrValueTable->CTRBlob()->data(), ctrValueTable->CTRBlob()->size());
91}

Callers 1

LoadNonOwningMethod · 0.80

Calls 7

LoadSizeFunction · 0.85
TThinTableClass · 0.85
BufMethod · 0.45
SkipMethod · 0.45
FBDeserializeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected