Lines Matching refs:__x

28 int __libcpp_ctz(unsigned __x)           _NOEXCEPT { return __builtin_ctz(__x); }
31 int __libcpp_ctz(unsigned long __x) _NOEXCEPT { return __builtin_ctzl(__x); }
34 int __libcpp_ctz(unsigned long long __x) _NOEXCEPT { return __builtin_ctzll(__x); }
38 int __libcpp_clz(unsigned __x) _NOEXCEPT { return __builtin_clz(__x); }
41 int __libcpp_clz(unsigned long __x) _NOEXCEPT { return __builtin_clzl(__x); }
44 int __libcpp_clz(unsigned long long __x) _NOEXCEPT { return __builtin_clzll(__x); }
48 int __libcpp_clz(__uint128_t __x) _NOEXCEPT {
58 return ((__x >> 64) == 0)
59 ? (64 + __builtin_clzll(static_cast<unsigned long long>(__x)))
60 : __builtin_clzll(static_cast<unsigned long long>(__x >> 64));
65 int __libcpp_popcount(unsigned __x) _NOEXCEPT { return __builtin_popcount(__x); }
68 int __libcpp_popcount(unsigned long __x) _NOEXCEPT { return __builtin_popcountl(__x); }
71 int __libcpp_popcount(unsigned long long __x) _NOEXCEPT { return __builtin_popcountll(__x); }
75 // Precondition: __x != 0
77 int __libcpp_ctz(unsigned __x) {
81 if (_BitScanForward(&__where, __x))
87 int __libcpp_ctz(unsigned long __x) {
89 return __ctz(static_cast<unsigned>(__x));
93 int __libcpp_ctz(unsigned long long __x) {
96 if (_BitScanForward64(&__where, __x))
100 if (_BitScanForward(&__where, static_cast<unsigned long>(__x)))
102 if (_BitScanForward(&__where, static_cast<unsigned long>(__x >> 32)))
108 // Precondition: __x != 0
110 int __libcpp_clz(unsigned __x) {
114 if (_BitScanReverse(&__where, __x))
120 int __libcpp_clz(unsigned long __x) {
122 return __libcpp_clz(static_cast<unsigned>(__x));
126 int __libcpp_clz(unsigned long long __x) {
129 if (_BitScanReverse64(&__where, __x))
133 if (_BitScanReverse(&__where, static_cast<unsigned long>(__x >> 32)))
135 if (_BitScanReverse(&__where, static_cast<unsigned long>(__x)))
141 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned __x) {
143 return __popcnt(__x);
146 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long __x) {
148 return __popcnt(__x);
151 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long long __x) {
153 return __popcnt64(__x);