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

Method PackLeaf

library/cpp/packers/packers.h:121–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119
120 template <>
121 inline void TIntegralPacker<ui64>::PackLeaf(char* buffer, const ui64& val, size_t len) const {
122 ui64 value = val;
123 int lenmask = 0;
124
125 for (size_t i = len - 1; i; --i) {
126 buffer[i] = (char)(value & 0xFF);
127 value >>= 8;
128 lenmask = ((lenmask >> 1) | (1 << 7));
129 }
130
131 buffer[0] = (char)(lenmask | value);
132 }
133
134 extern const ui8 SkipTable[];
135

Callers 6

PackLeafMethod · 0.45
PackLeafMethod · 0.45
DoPackUnpackTestFunction · 0.45
Y_UNIT_TESTFunction · 0.45
TestPackerMethod · 0.45
TestPackerFunction · 0.45

Calls 5

sizeMethod · 0.45
MeasureLeafMethod · 0.45
dataMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 2

TestPackerMethod · 0.36
TestPackerFunction · 0.36