Skip to content

Commit b72e5c8

Browse files
author
Роберт Смайт
committed
major stupid bug fix
1 parent 1020640 commit b72e5c8

2 files changed

Lines changed: 438 additions & 83 deletions

File tree

include/bits.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <cstddef>
88
#include <cstdint>
99
#include <numeric>
10+
#include <limits>
1011

1112
#if defined(__AVX512VPOPCNTDQ__) && defined(__AVX512F__) && \
1213
defined(__AVX512BW__)
@@ -18,7 +19,7 @@
1819
// Lookup table for 4-bit popcount
1920
// This table maps each 4-bit value (0-15) to its population count
2021
// clang-format off
21-
const __m256i lookup_popcount_4 = _mm256_setr_epi8(
22+
static inline const __m256i lookup_popcount_4 = _mm256_setr_epi8(
2223
0, 1, 1, 2, // 0000, 0001, 0010, 0011
2324
1, 2, 2, 3, // 0100, 0101, 0110, 0111
2425
1, 2, 2, 3, // 1000, 1001, 1010, 1011
@@ -31,7 +32,7 @@ const __m256i lookup_popcount_4 = _mm256_setr_epi8(
3132
2, 3, 3, 4 // 1100, 1101, 1110, 1111
3233
);
3334

34-
const __m256i mask_first_half = _mm256_setr_epi8(
35+
static inline const __m256i mask_first_half = _mm256_setr_epi8(
3536
0xFF, 0xFF, 0xFF, 0xFF,
3637
0xFF, 0xFF, 0xFF, 0xFF,
3738
0xFF, 0xFF, 0xFF, 0xFF,

0 commit comments

Comments
 (0)