algorithm (321369) | algorithm (326496) |
---|---|
1// -*- C++ -*- 2//===-------------------------- algorithm ---------------------------------===// 3// 4// The LLVM Compiler Infrastructure 5// 6// This file is dual licensed under the MIT and the University of Illinois Open 7// Source Licenses. See LICENSE.TXT for details. 8// --- 2999 unchanged lines hidden (view full) --- 3008{ 3009 return static_cast<result_type>(__e_() & __mask0_); 3010} 3011 3012template<class _Engine, class _UIntType> 3013_UIntType 3014__independent_bits_engine<_Engine, _UIntType>::__eval(true_type) 3015{ | 1// -*- C++ -*- 2//===-------------------------- algorithm ---------------------------------===// 3// 4// The LLVM Compiler Infrastructure 5// 6// This file is dual licensed under the MIT and the University of Illinois Open 7// Source Licenses. See LICENSE.TXT for details. 8// --- 2999 unchanged lines hidden (view full) --- 3008{ 3009 return static_cast<result_type>(__e_() & __mask0_); 3010} 3011 3012template<class _Engine, class _UIntType> 3013_UIntType 3014__independent_bits_engine<_Engine, _UIntType>::__eval(true_type) 3015{ |
3016 const size_t _WRt = numeric_limits<result_type>::digits; |
|
3016 result_type _Sp = 0; 3017 for (size_t __k = 0; __k < __n0_; ++__k) 3018 { 3019 _Engine_result_type __u; 3020 do 3021 { 3022 __u = __e_() - _Engine::min(); 3023 } while (__u >= __y0_); | 3017 result_type _Sp = 0; 3018 for (size_t __k = 0; __k < __n0_; ++__k) 3019 { 3020 _Engine_result_type __u; 3021 do 3022 { 3023 __u = __e_() - _Engine::min(); 3024 } while (__u >= __y0_); |
3024 if (__w0_ < _WDt) | 3025 if (__w0_ < _WRt) |
3025 _Sp <<= __w0_; 3026 else 3027 _Sp = 0; 3028 _Sp += __u & __mask0_; 3029 } 3030 for (size_t __k = __n0_; __k < __n_; ++__k) 3031 { 3032 _Engine_result_type __u; 3033 do 3034 { 3035 __u = __e_() - _Engine::min(); 3036 } while (__u >= __y1_); | 3026 _Sp <<= __w0_; 3027 else 3028 _Sp = 0; 3029 _Sp += __u & __mask0_; 3030 } 3031 for (size_t __k = __n0_; __k < __n_; ++__k) 3032 { 3033 _Engine_result_type __u; 3034 do 3035 { 3036 __u = __e_() - _Engine::min(); 3037 } while (__u >= __y1_); |
3037 if (__w0_ < _WDt - 1) | 3038 if (__w0_ < _WRt - 1) |
3038 _Sp <<= __w0_ + 1; 3039 else 3040 _Sp = 0; 3041 _Sp += __u & __mask1_; 3042 } 3043 return _Sp; 3044} 3045 --- 2859 unchanged lines hidden --- | 3039 _Sp <<= __w0_ + 1; 3040 else 3041 _Sp = 0; 3042 _Sp += __u & __mask1_; 3043 } 3044 return _Sp; 3045} 3046 --- 2859 unchanged lines hidden --- |