aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/bit_io
diff options
context:
space:
mode:
authoreeight <eeight@yandex-team.ru>2022-02-10 16:46:19 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:19 +0300
commitbd085aee9b4f7a0bee302ce687964ffb7098f986 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/bit_io
parent475c0a46f28166e83fd263badc7546377cddcabe (diff)
downloadydb-bd085aee9b4f7a0bee302ce687964ffb7098f986.tar.gz
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/bit_io')
-rw-r--r--library/cpp/bit_io/bitinput_impl.h8
-rw-r--r--library/cpp/bit_io/bitoutput.h12
2 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/bit_io/bitinput_impl.h b/library/cpp/bit_io/bitinput_impl.h
index e5125c2154d..b13fbef1012 100644
--- a/library/cpp/bit_io/bitinput_impl.h
+++ b/library/cpp/bit_io/bitinput_impl.h
@@ -33,7 +33,7 @@ namespace NBitIO {
protected:
template <ui32 bits>
Y_FORCE_INLINE bool ReadKImpl(ui64& result) {
- result = (ReadUnaligned<ui64>((const void*)(Start + (BOffset >> 3))) >> (BOffset & 7)) & Mask64(bits);
+ result = (ReadUnaligned<ui64>((const void*)(Start + (BOffset >> 3))) >> (BOffset & 7)) & Mask64(bits);
BOffset += bits;
if (BOffset < FakeStart)
return true;
@@ -79,7 +79,7 @@ namespace NBitIO {
protected:
template <ui64 bits, typename T>
Y_FORCE_INLINE static void CopyToResultK(T& result, ui64 r64, ui64 skipbits) {
- result = (result & ~(Mask64(bits) << skipbits)) | (r64 << skipbits);
+ result = (result & ~(Mask64(bits) << skipbits)) | (r64 << skipbits);
}
template <typename T>
@@ -92,8 +92,8 @@ namespace NBitIO {
Y_FORCE_INLINE bool ReadWordsImpl(ui64& data) {
data = 0;
- const ui64 haveMore = NthBit64(bits);
- const ui64 mask = Mask64(bits);
+ const ui64 haveMore = NthBit64(bits);
+ const ui64 mask = Mask64(bits);
ui64 current = 0;
ui64 byteNo = 0;
diff --git a/library/cpp/bit_io/bitoutput.h b/library/cpp/bit_io/bitoutput.h
index 24dda131780..2b886c1f026 100644
--- a/library/cpp/bit_io/bitoutput.h
+++ b/library/cpp/bit_io/bitoutput.h
@@ -14,10 +14,10 @@ namespace NBitIO {
// Almost all code is hard tuned for sequential write performance.
// Use tools/bursttrie/benchmarks/bitstreams_benchmark to check your changes.
- inline constexpr ui64 BytesUp(ui64 bits) {
- return (bits + 7ULL) >> 3ULL;
- }
-
+ inline constexpr ui64 BytesUp(ui64 bits) {
+ return (bits + 7ULL) >> 3ULL;
+ }
+
template <typename TStorage>
class TBitOutputBase {
protected:
@@ -36,7 +36,7 @@ namespace NBitIO {
}
ui64 GetOffset() const {
- return Offset + BytesUp(64ULL - FreeBits);
+ return Offset + BytesUp(64ULL - FreeBits);
}
ui64 GetBitOffset() const {
@@ -83,7 +83,7 @@ namespace NBitIO {
ui64 part = data;
data >>= bits;
- part |= FastZeroIfFalse(data, NthBit64(bits));
+ part |= FastZeroIfFalse(data, NthBit64(bits));
Write(part, bits + 1ULL);
} while (data);
}