File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 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
2423inline uint64_t popcnt64 (uint64_t x)
2524{
@@ -51,10 +50,10 @@ inline uint64_t popcnt64(uint64_t x)
5150
5251inline 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);
You can’t perform that action at this time.
0 commit comments