Mpzf.h “_BitScanForward64”: 找不到标识符
inline int ctz (boost::uint64_t x) {
#ifdef _MSC_VER
#ifdef _WIN64
unsigned long ret;
_BitScanForward64(&ret, x);
return (int)ret;
#else
unsigned long ret;
_BitScanForward(&ret, x);
return (int)ret;
#endif
#else
// Assume long long is 64 bits
return __builtin_ctzll (x);
#endif
}
inline int clz (boost::uint64_t x) {
#ifdef _MSC_VER
#ifdef _WIN64
unsigned long ret;
_BitScanReverse64(&ret, x);
return 63 - (int)ret;
#else
unsigned long ret;
_BitScanReverse(&ret, x);
return 63 - (int)ret;
#endif
#else
return __builtin_clzll (x);
#endif
}