Hello,
In file "integer.h", in this section:
#if defined I128_USE_BITS
#include "bits.h"
#elif defined GNUC
#define clz(x) extension ({ uint n = __builtin_clzll(x); n == 0 ? 64 : n; })
#define ctz(x) extension ({ uint n = __builtin_ctzll(x); n == 0 ? 64 : n; })
#define popcnt(x) __builtin_popcount(x)
#define bswap64(x) __builtin_bswap64(x)
#elif defined _MSC_VER
#include <intrin.h>
#define clz(x) _lzcnt_u64(x)
#define ctz(x) _tzcnt_u64(x)
#define popcnt(x) __popcnt64(x)
#define bswap64(x) _byteswap_uint64(x)
#endif
I think the GNUC version for popcnt(x) shall be 64-bit, not 32-bit (with -ll suffix)?
#define popcnt(x) __builtin_popcountll(x)
Thank you!
Hello,
In file "integer.h", in this section:
#if defined I128_USE_BITS
#include "bits.h"
#elif defined GNUC
#define clz(x) extension ({ uint n = __builtin_clzll(x); n == 0 ? 64 : n; })
#define ctz(x) extension ({ uint n = __builtin_ctzll(x); n == 0 ? 64 : n; })
#define popcnt(x) __builtin_popcount(x)
#define bswap64(x) __builtin_bswap64(x)
#elif defined _MSC_VER
#include <intrin.h>
#define clz(x) _lzcnt_u64(x)
#define ctz(x) _tzcnt_u64(x)
#define popcnt(x) __popcnt64(x)
#define bswap64(x) _byteswap_uint64(x)
#endif
I think the GNUC version for popcnt(x) shall be 64-bit, not 32-bit (with -ll suffix)?
#define popcnt(x) __builtin_popcountll(x)
Thank you!