MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / writeSignedVarInt

Method writeSignedVarInt

lib/Bytecode/Writer/BytecodeWriter.cpp:97–99  ·  view source on GitHub ↗

Emit a signed variable length integer. Signed varints are encoded using a varint with zigzag encoding, meaning that we use the low bit of the value to indicate the sign of the value. This allows for more efficient encoding of negative values by limiting the number of active bits

Source from the content-addressed store, hash-verified

95 /// value to indicate the sign of the value. This allows for more efficient
96 /// encoding of negative values by limiting the number of active bits
97 void writeSignedVarInt(uint64_t value) {
98 writeVarInt((value << 1) ^ (uint64_t)((int64_t)value >> 63));
99 }
100
101 template <typename T>
102 std::enable_if_t<std::is_integral<T>::value, void> writeLE(T value) {

Callers 2

writeAPIntFunction · 0.80
writeSingleAttributeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected