Lines Matching refs:__x
82 int __libcpp_ctz(unsigned __x) _NOEXCEPT { return __builtin_ctz(__x); }
85 int __libcpp_ctz(unsigned long __x) _NOEXCEPT { return __builtin_ctzl(__x); }
88 int __libcpp_ctz(unsigned long long __x) _NOEXCEPT { return __builtin_ctzll(__x); }
92 int __libcpp_clz(unsigned __x) _NOEXCEPT { return __builtin_clz(__x); }
95 int __libcpp_clz(unsigned long __x) _NOEXCEPT { return __builtin_clzl(__x); }
98 int __libcpp_clz(unsigned long long __x) _NOEXCEPT { return __builtin_clzll(__x); }
102 int __libcpp_popcount(unsigned __x) _NOEXCEPT { return __builtin_popcount(__x); }
105 int __libcpp_popcount(unsigned long __x) _NOEXCEPT { return __builtin_popcountl(__x); }
108 int __libcpp_popcount(unsigned long long __x) _NOEXCEPT { return __builtin_popcountll(__x); }
112 // Precondition: __x != 0
114 int __libcpp_ctz(unsigned __x) {
118 if (_BitScanForward(&__where, __x))
124 int __libcpp_ctz(unsigned long __x) {
126 return __ctz(static_cast<unsigned>(__x));
130 int __libcpp_ctz(unsigned long long __x) {
134 if (_BitScanForward64(&__where, __x))
138 if (_BitScanForward(&__where, static_cast<unsigned long>(__x)))
140 if (_BitScanForward(&__where, static_cast<unsigned long>(__x >> 32)))
146 // Precondition: __x != 0
148 int __libcpp_clz(unsigned __x) {
152 if (_BitScanReverse(&__where, __x))
158 int __libcpp_clz(unsigned long __x) {
160 return __libcpp_clz(static_cast<unsigned>(__x));
164 int __libcpp_clz(unsigned long long __x) {
167 if (_BitScanReverse64(&__where, __x))
171 if (_BitScanReverse(&__where, static_cast<unsigned long>(__x >> 32)))
173 if (_BitScanReverse(&__where, static_cast<unsigned long>(__x)))
179 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned __x) {
181 return __popcnt(__x);
184 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long __x) {
186 return __popcnt(__x);
189 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long long __x) {
191 return __popcnt64(__x);