• Home
  • Raw
  • Download

Lines Matching refs:__t

210 _Tp __rotl(_Tp __t, unsigned int __cnt) _NOEXCEPT
215 return __t;
216 return (__t << (__cnt % __dig)) | (__t >> (__dig - (__cnt % __dig)));
222 _Tp __rotr(_Tp __t, unsigned int __cnt) _NOEXCEPT
227 return __t;
228 return (__t >> (__cnt % __dig)) | (__t << (__dig - (__cnt % __dig)));
235 int __countr_zero(_Tp __t) _NOEXCEPT
238 if (__t == 0)
242 return __libcpp_ctz(static_cast<unsigned int>(__t));
244 return __libcpp_ctz(static_cast<unsigned long>(__t));
246 return __libcpp_ctz(static_cast<unsigned long long>(__t));
252 while ((__iter = __libcpp_ctz(static_cast<unsigned long long>(__t))) == __ulldigits)
255 __t >>= __ulldigits;
263 int __countl_zero(_Tp __t) _NOEXCEPT
266 if (__t == 0)
270 return __libcpp_clz(static_cast<unsigned int>(__t))
273 return __libcpp_clz(static_cast<unsigned long>(__t))
276 return __libcpp_clz(static_cast<unsigned long long>(__t))
284 __t = __rotr(__t, __ulldigits);
285 if ((__iter = __countl_zero(static_cast<unsigned long long>(__t))) != __ulldigits)
295 int __countl_one(_Tp __t) _NOEXCEPT
298 return __t != numeric_limits<_Tp>::max()
299 ? __countl_zero(static_cast<_Tp>(~__t))
306 int __countr_one(_Tp __t) _NOEXCEPT
309 return __t != numeric_limits<_Tp>::max()
310 ? __countr_zero(static_cast<_Tp>(~__t))
318 __popcount(_Tp __t) _NOEXCEPT
322 return __libcpp_popcount(static_cast<unsigned int>(__t));
324 return __libcpp_popcount(static_cast<unsigned long>(__t));
326 return __libcpp_popcount(static_cast<unsigned long long>(__t));
330 while (__t != 0)
332 __ret += __libcpp_popcount(static_cast<unsigned long long>(__t));
333 __t >>= numeric_limits<unsigned long long>::digits;
343 unsigned __bit_log2(_Tp __t) _NOEXCEPT
346 return numeric_limits<_Tp>::digits - 1 - __countl_zero(__t);
351 bool __has_single_bit(_Tp __t) _NOEXCEPT
354 return __t != 0 && (((__t & (__t - 1)) == 0));
363 rotl(_Tp __t, unsigned int __cnt) noexcept
365 return __rotl(__t, __cnt);
373 rotr(_Tp __t, unsigned int __cnt) noexcept
375 return __rotr(__t, __cnt);
382 countl_zero(_Tp __t) noexcept
384 return __countl_zero(__t);
391 countl_one(_Tp __t) noexcept
393 return __countl_one(__t);
400 countr_zero(_Tp __t) noexcept
402 return __countr_zero(__t);
409 countr_one(_Tp __t) noexcept
411 return __countr_one(__t);
418 popcount(_Tp __t) noexcept
420 return __popcount(__t);
427 has_single_bit(_Tp __t) noexcept
429 return __has_single_bit(__t);
435 bit_floor(_Tp __t) noexcept
437 return __t == 0 ? 0 : _Tp{1} << __bit_log2(__t);
443 bit_ceil(_Tp __t) noexcept
445 if (__t < 2) return 1;
446 const unsigned __n = numeric_limits<_Tp>::digits - countl_zero((_Tp)(__t - 1u));
462 bit_width(_Tp __t) noexcept
464 return __t == 0 ? 0 : __bit_log2(__t) + 1;