aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/bitops.cpp
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /util/generic/bitops.cpp
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/bitops.cpp')
-rw-r--r--util/generic/bitops.cpp276
1 files changed, 138 insertions, 138 deletions
diff --git a/util/generic/bitops.cpp b/util/generic/bitops.cpp
index db5667a21f..cee2667f4b 100644
--- a/util/generic/bitops.cpp
+++ b/util/generic/bitops.cpp
@@ -1,141 +1,141 @@
#include "bitops.h"
-
-namespace NBitOps {
- namespace NPrivate {
- const ui64 WORD_MASK[] = {
- 0x0000000000000000ULL,
- 0x0000000000000001ULL,
- 0x0000000000000003ULL,
- 0x0000000000000007ULL,
- 0x000000000000000FULL,
- 0x000000000000001FULL,
- 0x000000000000003FULL,
- 0x000000000000007FULL,
- 0x00000000000000FFULL,
- 0x00000000000001FFULL,
- 0x00000000000003FFULL,
- 0x00000000000007FFULL,
- 0x0000000000000FFFULL,
- 0x0000000000001FFFULL,
- 0x0000000000003FFFULL,
- 0x0000000000007FFFULL,
- 0x000000000000FFFFULL,
- 0x000000000001FFFFULL,
- 0x000000000003FFFFULL,
- 0x000000000007FFFFULL,
- 0x00000000000FFFFFULL,
- 0x00000000001FFFFFULL,
- 0x00000000003FFFFFULL,
- 0x00000000007FFFFFULL,
- 0x0000000000FFFFFFULL,
- 0x0000000001FFFFFFULL,
- 0x0000000003FFFFFFULL,
- 0x0000000007FFFFFFULL,
- 0x000000000FFFFFFFULL,
- 0x000000001FFFFFFFULL,
- 0x000000003FFFFFFFULL,
- 0x000000007FFFFFFFULL,
- 0x00000000FFFFFFFFULL,
- 0x00000001FFFFFFFFULL,
- 0x00000003FFFFFFFFULL,
- 0x00000007FFFFFFFFULL,
- 0x0000000FFFFFFFFFULL,
- 0x0000001FFFFFFFFFULL,
- 0x0000003FFFFFFFFFULL,
- 0x0000007FFFFFFFFFULL,
- 0x000000FFFFFFFFFFULL,
- 0x000001FFFFFFFFFFULL,
- 0x000003FFFFFFFFFFULL,
- 0x000007FFFFFFFFFFULL,
- 0x00000FFFFFFFFFFFULL,
- 0x00001FFFFFFFFFFFULL,
- 0x00003FFFFFFFFFFFULL,
- 0x00007FFFFFFFFFFFULL,
- 0x0000FFFFFFFFFFFFULL,
- 0x0001FFFFFFFFFFFFULL,
- 0x0003FFFFFFFFFFFFULL,
- 0x0007FFFFFFFFFFFFULL,
- 0x000FFFFFFFFFFFFFULL,
- 0x001FFFFFFFFFFFFFULL,
- 0x003FFFFFFFFFFFFFULL,
- 0x007FFFFFFFFFFFFFULL,
- 0x00FFFFFFFFFFFFFFULL,
- 0x01FFFFFFFFFFFFFFULL,
- 0x03FFFFFFFFFFFFFFULL,
- 0x07FFFFFFFFFFFFFFULL,
- 0x0FFFFFFFFFFFFFFFULL,
- 0x1FFFFFFFFFFFFFFFULL,
- 0x3FFFFFFFFFFFFFFFULL,
- 0x7FFFFFFFFFFFFFFFULL,
- 0xFFFFFFFFFFFFFFFFULL,
- };
-
- const ui64 INVERSE_WORD_MASK[] = {
- ~0x0000000000000000ULL,
- ~0x0000000000000001ULL,
- ~0x0000000000000003ULL,
- ~0x0000000000000007ULL,
- ~0x000000000000000FULL,
- ~0x000000000000001FULL,
- ~0x000000000000003FULL,
- ~0x000000000000007FULL,
- ~0x00000000000000FFULL,
- ~0x00000000000001FFULL,
- ~0x00000000000003FFULL,
- ~0x00000000000007FFULL,
- ~0x0000000000000FFFULL,
- ~0x0000000000001FFFULL,
- ~0x0000000000003FFFULL,
- ~0x0000000000007FFFULL,
- ~0x000000000000FFFFULL,
- ~0x000000000001FFFFULL,
- ~0x000000000003FFFFULL,
- ~0x000000000007FFFFULL,
- ~0x00000000000FFFFFULL,
- ~0x00000000001FFFFFULL,
- ~0x00000000003FFFFFULL,
- ~0x00000000007FFFFFULL,
- ~0x0000000000FFFFFFULL,
- ~0x0000000001FFFFFFULL,
- ~0x0000000003FFFFFFULL,
- ~0x0000000007FFFFFFULL,
- ~0x000000000FFFFFFFULL,
- ~0x000000001FFFFFFFULL,
- ~0x000000003FFFFFFFULL,
- ~0x000000007FFFFFFFULL,
- ~0x00000000FFFFFFFFULL,
- ~0x00000001FFFFFFFFULL,
- ~0x00000003FFFFFFFFULL,
- ~0x00000007FFFFFFFFULL,
- ~0x0000000FFFFFFFFFULL,
- ~0x0000001FFFFFFFFFULL,
- ~0x0000003FFFFFFFFFULL,
- ~0x0000007FFFFFFFFFULL,
- ~0x000000FFFFFFFFFFULL,
- ~0x000001FFFFFFFFFFULL,
- ~0x000003FFFFFFFFFFULL,
- ~0x000007FFFFFFFFFFULL,
- ~0x00000FFFFFFFFFFFULL,
- ~0x00001FFFFFFFFFFFULL,
- ~0x00003FFFFFFFFFFFULL,
- ~0x00007FFFFFFFFFFFULL,
- ~0x0000FFFFFFFFFFFFULL,
- ~0x0001FFFFFFFFFFFFULL,
- ~0x0003FFFFFFFFFFFFULL,
- ~0x0007FFFFFFFFFFFFULL,
- ~0x000FFFFFFFFFFFFFULL,
- ~0x001FFFFFFFFFFFFFULL,
- ~0x003FFFFFFFFFFFFFULL,
- ~0x007FFFFFFFFFFFFFULL,
- ~0x00FFFFFFFFFFFFFFULL,
- ~0x01FFFFFFFFFFFFFFULL,
- ~0x03FFFFFFFFFFFFFFULL,
- ~0x07FFFFFFFFFFFFFFULL,
- ~0x0FFFFFFFFFFFFFFFULL,
- ~0x1FFFFFFFFFFFFFFFULL,
- ~0x3FFFFFFFFFFFFFFFULL,
- ~0x7FFFFFFFFFFFFFFFULL,
- ~0xFFFFFFFFFFFFFFFFULL,
- };
+
+namespace NBitOps {
+ namespace NPrivate {
+ const ui64 WORD_MASK[] = {
+ 0x0000000000000000ULL,
+ 0x0000000000000001ULL,
+ 0x0000000000000003ULL,
+ 0x0000000000000007ULL,
+ 0x000000000000000FULL,
+ 0x000000000000001FULL,
+ 0x000000000000003FULL,
+ 0x000000000000007FULL,
+ 0x00000000000000FFULL,
+ 0x00000000000001FFULL,
+ 0x00000000000003FFULL,
+ 0x00000000000007FFULL,
+ 0x0000000000000FFFULL,
+ 0x0000000000001FFFULL,
+ 0x0000000000003FFFULL,
+ 0x0000000000007FFFULL,
+ 0x000000000000FFFFULL,
+ 0x000000000001FFFFULL,
+ 0x000000000003FFFFULL,
+ 0x000000000007FFFFULL,
+ 0x00000000000FFFFFULL,
+ 0x00000000001FFFFFULL,
+ 0x00000000003FFFFFULL,
+ 0x00000000007FFFFFULL,
+ 0x0000000000FFFFFFULL,
+ 0x0000000001FFFFFFULL,
+ 0x0000000003FFFFFFULL,
+ 0x0000000007FFFFFFULL,
+ 0x000000000FFFFFFFULL,
+ 0x000000001FFFFFFFULL,
+ 0x000000003FFFFFFFULL,
+ 0x000000007FFFFFFFULL,
+ 0x00000000FFFFFFFFULL,
+ 0x00000001FFFFFFFFULL,
+ 0x00000003FFFFFFFFULL,
+ 0x00000007FFFFFFFFULL,
+ 0x0000000FFFFFFFFFULL,
+ 0x0000001FFFFFFFFFULL,
+ 0x0000003FFFFFFFFFULL,
+ 0x0000007FFFFFFFFFULL,
+ 0x000000FFFFFFFFFFULL,
+ 0x000001FFFFFFFFFFULL,
+ 0x000003FFFFFFFFFFULL,
+ 0x000007FFFFFFFFFFULL,
+ 0x00000FFFFFFFFFFFULL,
+ 0x00001FFFFFFFFFFFULL,
+ 0x00003FFFFFFFFFFFULL,
+ 0x00007FFFFFFFFFFFULL,
+ 0x0000FFFFFFFFFFFFULL,
+ 0x0001FFFFFFFFFFFFULL,
+ 0x0003FFFFFFFFFFFFULL,
+ 0x0007FFFFFFFFFFFFULL,
+ 0x000FFFFFFFFFFFFFULL,
+ 0x001FFFFFFFFFFFFFULL,
+ 0x003FFFFFFFFFFFFFULL,
+ 0x007FFFFFFFFFFFFFULL,
+ 0x00FFFFFFFFFFFFFFULL,
+ 0x01FFFFFFFFFFFFFFULL,
+ 0x03FFFFFFFFFFFFFFULL,
+ 0x07FFFFFFFFFFFFFFULL,
+ 0x0FFFFFFFFFFFFFFFULL,
+ 0x1FFFFFFFFFFFFFFFULL,
+ 0x3FFFFFFFFFFFFFFFULL,
+ 0x7FFFFFFFFFFFFFFFULL,
+ 0xFFFFFFFFFFFFFFFFULL,
+ };
+
+ const ui64 INVERSE_WORD_MASK[] = {
+ ~0x0000000000000000ULL,
+ ~0x0000000000000001ULL,
+ ~0x0000000000000003ULL,
+ ~0x0000000000000007ULL,
+ ~0x000000000000000FULL,
+ ~0x000000000000001FULL,
+ ~0x000000000000003FULL,
+ ~0x000000000000007FULL,
+ ~0x00000000000000FFULL,
+ ~0x00000000000001FFULL,
+ ~0x00000000000003FFULL,
+ ~0x00000000000007FFULL,
+ ~0x0000000000000FFFULL,
+ ~0x0000000000001FFFULL,
+ ~0x0000000000003FFFULL,
+ ~0x0000000000007FFFULL,
+ ~0x000000000000FFFFULL,
+ ~0x000000000001FFFFULL,
+ ~0x000000000003FFFFULL,
+ ~0x000000000007FFFFULL,
+ ~0x00000000000FFFFFULL,
+ ~0x00000000001FFFFFULL,
+ ~0x00000000003FFFFFULL,
+ ~0x00000000007FFFFFULL,
+ ~0x0000000000FFFFFFULL,
+ ~0x0000000001FFFFFFULL,
+ ~0x0000000003FFFFFFULL,
+ ~0x0000000007FFFFFFULL,
+ ~0x000000000FFFFFFFULL,
+ ~0x000000001FFFFFFFULL,
+ ~0x000000003FFFFFFFULL,
+ ~0x000000007FFFFFFFULL,
+ ~0x00000000FFFFFFFFULL,
+ ~0x00000001FFFFFFFFULL,
+ ~0x00000003FFFFFFFFULL,
+ ~0x00000007FFFFFFFFULL,
+ ~0x0000000FFFFFFFFFULL,
+ ~0x0000001FFFFFFFFFULL,
+ ~0x0000003FFFFFFFFFULL,
+ ~0x0000007FFFFFFFFFULL,
+ ~0x000000FFFFFFFFFFULL,
+ ~0x000001FFFFFFFFFFULL,
+ ~0x000003FFFFFFFFFFULL,
+ ~0x000007FFFFFFFFFFULL,
+ ~0x00000FFFFFFFFFFFULL,
+ ~0x00001FFFFFFFFFFFULL,
+ ~0x00003FFFFFFFFFFFULL,
+ ~0x00007FFFFFFFFFFFULL,
+ ~0x0000FFFFFFFFFFFFULL,
+ ~0x0001FFFFFFFFFFFFULL,
+ ~0x0003FFFFFFFFFFFFULL,
+ ~0x0007FFFFFFFFFFFFULL,
+ ~0x000FFFFFFFFFFFFFULL,
+ ~0x001FFFFFFFFFFFFFULL,
+ ~0x003FFFFFFFFFFFFFULL,
+ ~0x007FFFFFFFFFFFFFULL,
+ ~0x00FFFFFFFFFFFFFFULL,
+ ~0x01FFFFFFFFFFFFFFULL,
+ ~0x03FFFFFFFFFFFFFFULL,
+ ~0x07FFFFFFFFFFFFFFULL,
+ ~0x0FFFFFFFFFFFFFFFULL,
+ ~0x1FFFFFFFFFFFFFFFULL,
+ ~0x3FFFFFFFFFFFFFFFULL,
+ ~0x7FFFFFFFFFFFFFFFULL,
+ ~0xFFFFFFFFFFFFFFFFULL,
+ };
}
}