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

Method Load

library/cpp/regex/pire/pire/scanner_io.cpp:51–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void SimpleScanner::Load(yistream* s)
52{
53 SimpleScanner sc;
54 Impl::ValidateHeader(s, ScannerIOTypes::SimpleScanner, sizeof(sc.m));
55 LoadPodType(s, sc.m);
56 Impl::AlignLoad(s, sizeof(sc.m));
57 bool empty;
58 LoadPodType(s, empty);
59 Impl::AlignLoad(s, sizeof(empty));
60 if (empty) {
61 sc.Alias(Null());
62 } else {
63 sc.m_buffer = BufferType(new char[sc.BufSize()]);
64 Impl::AlignedLoadArray(s, sc.m_buffer.Get(), sc.BufSize());
65 sc.Markup(sc.m_buffer.Get());
66 sc.m.initial += reinterpret_cast<size_t>(sc.m_transitions);
67 }
68 Swap(sc);
69}
70
71void SlowScanner::Save(yostream* s) const
72{

Callers

nothing calls this directly

Calls 15

ValidateHeaderFunction · 0.85
LoadPodTypeFunction · 0.85
AlignLoadFunction · 0.85
NullFunction · 0.85
BufferTypeClass · 0.85
AlignedLoadArrayFunction · 0.85
LoadPodArrayFunction · 0.85
SwapFunction · 0.50
LoadFunction · 0.50
AliasMethod · 0.45
BufSizeMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected