Add clang-format (#1086)

Co-authored-by: mwilsnd <mwilsnd@gmail.com>
This commit is contained in:
Bart Louwers
2023-05-01 16:57:37 +02:00
committed by GitHub
parent 403a12bd1b
commit 71f6da2722
1018 changed files with 27876 additions and 25862 deletions

View File

@@ -5,9 +5,12 @@ namespace util {
// From http://stackoverflow.com/questions/3272424/compute-fast-log-base-2-ceiling
uint32_t ceil_log2(uint64_t x) {
static const uint64_t t[6] = {0xFFFFFFFF00000000, 0x00000000FFFF0000,
0x000000000000FF00, 0x00000000000000F0,
0x000000000000000C, 0x0000000000000002};
static const uint64_t t[6] = {0xFFFFFFFF00000000,
0x00000000FFFF0000,
0x000000000000FF00,
0x00000000000000F0,
0x000000000000000C,
0x0000000000000002};
uint32_t y = (((x & (x - 1)) == 0) ? 0 : 1);
uint32_t j = 32;