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

Function SkipPadding

catboost/libs/helpers/serialization.cpp:21–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 }
20
21 void SkipPadding(TCountingInput* const input, const ui32 alignment) {
22 if (input->Counter() % alignment == 0) {
23 return;
24 }
25
26 const auto bytesToSkip = alignment - (input->Counter() % alignment);
27 const auto bytesSkipped = input->Skip(bytesToSkip);
28 CB_ENSURE(bytesToSkip == bytesSkipped);
29 }
30
31 void WriteMagic(const char* magic, ui32 magicSize, ui32 alignment, IOutputStream* stream) {
32 TCountingOutput output(stream);

Callers 1

ReadMagicFunction · 0.70

Calls 2

CounterMethod · 0.45
SkipMethod · 0.45

Tested by

no test coverage detected