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

Function ZigZagDecode32

library/cpp/yson/zigzag.h:16–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14 }
15
16 inline i32 ZigZagDecode32(ui32 n) {
17 return (n >> 1) ^ -static_cast<i32>(n & 1);
18 }
19
20 inline ui64 ZigZagEncode64(i64 n) {
21 // Note: the right-shift must be arithmetic

Callers 15

ReadVarInt32Function · 0.70
ReadBinaryStringMethod · 0.70
kZigZag>Method · 0.50
PackedVarintMethod · 0.50
VarintParserFunction · 0.50
ReadVarintZigZag32Function · 0.50
TYPE_SINT32>Method · 0.50
RenderNonMessageFieldMethod · 0.50
PackedVarintMethod · 0.50
MpVarintMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected