Skip to content

Commit e728c19

Browse files
committed
Minor update
1 parent b6b96a3 commit e728c19

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

include/popcnt.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
#define __has_builtin(x) 0
1919
#endif
2020

21-
#if defined(__GNUC__) || \
22-
__has_builtin(__builtin_popcountll)
21+
#if defined(__GNUC__) || __has_builtin(__builtin_popcountll)
2322

2423
inline uint64_t popcnt64(uint64_t x)
2524
{
@@ -51,10 +50,10 @@ inline uint64_t popcnt64(uint64_t x)
5150

5251
inline uint64_t popcnt64(uint64_t x)
5352
{
54-
uint64_t m1 = 0x5555555555555555ll;
55-
uint64_t m2 = 0x3333333333333333ll;
56-
uint64_t m4 = 0x0F0F0F0F0F0F0F0Fll;
57-
uint64_t h01 = 0x0101010101010101ll;
53+
uint64_t m1 = 0x5555555555555555ull;
54+
uint64_t m2 = 0x3333333333333333ull;
55+
uint64_t m4 = 0x0F0F0F0F0F0F0F0Full;
56+
uint64_t h01 = 0x0101010101010101ull;
5857

5958
x -= (x >> 1) & m1;
6059
x = (x & m2) + ((x >> 2) & m2);

0 commit comments

Comments
 (0)