Lines Matching refs:__first

158 __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
164 if (__first.__ctz_ != 0)
166 __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
168 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __…
169 __storage_type __b = *__first.__seg_ & __m;
171 return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
173 return __first + __n;
175 ++__first.__seg_;
178 for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
179 if (*__first.__seg_)
180 return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(*__first.__seg_)));
185 __storage_type __b = *__first.__seg_ & __m;
187 return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
189 return _It(__first.__seg_, static_cast<unsigned>(__n));
194 __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
200 if (__first.__ctz_ != 0)
202 __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
204 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __…
205 __storage_type __b = ~*__first.__seg_ & __m;
207 return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
209 return __first + __n;
211 ++__first.__seg_;
214 for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
216 __storage_type __b = ~*__first.__seg_;
218 return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
224 __storage_type __b = ~*__first.__seg_ & __m;
226 return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
228 return _It(__first.__seg_, static_cast<unsigned>(__n));
234 find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __valu…
237 return __find_bool_true(__first, static_cast<typename _Cp::size_type>(__last - __first));
238 return __find_bool_false(__first, static_cast<typename _Cp::size_type>(__last - __first));
245 __count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
253 if (__first.__ctz_ != 0)
255 __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
257 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __…
258 __r = _VSTD::__popcount(*__first.__seg_ & __m);
260 ++__first.__seg_;
263 for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
264 __r += _VSTD::__popcount(*__first.__seg_);
269 __r += _VSTD::__popcount(*__first.__seg_ & __m);
276 __count_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
284 if (__first.__ctz_ != 0)
286 __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
288 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __…
289 __r = _VSTD::__popcount(~*__first.__seg_ & __m);
291 ++__first.__seg_;
294 for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
295 __r += _VSTD::__popcount(~*__first.__seg_);
300 __r += _VSTD::__popcount(~*__first.__seg_ & __m);
308 count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __val…
311 return __count_bool_true(__first, static_cast<typename _Cp::size_type>(__last - __first));
312 return __count_bool_false(__first, static_cast<typename _Cp::size_type>(__last - __first));
319 __fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
325 if (__first.__ctz_ != 0)
327 __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
329 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __…
330 *__first.__seg_ &= ~__m;
332 ++__first.__seg_;
336 _VSTD::memset(_VSTD::__to_raw_pointer(__first.__seg_), 0, __nw * sizeof(__storage_type));
341 __first.__seg_ += __nw;
343 *__first.__seg_ &= ~__m;
349 __fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
355 if (__first.__ctz_ != 0)
357 __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
359 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __…
360 *__first.__seg_ |= __m;
362 ++__first.__seg_;
366 _VSTD::memset(_VSTD::__to_raw_pointer(__first.__seg_), -1, __nw * sizeof(__storage_type));
371 __first.__seg_ += __nw;
373 *__first.__seg_ |= __m;
380 fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value_)
385 __fill_n_true(__first, __n);
387 __fill_n_false(__first, __n);
396 fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool __value_)
398 _VSTD::fill_n(__first, static_cast<typename _Cp::size_type>(__last - __first), __value_);
405 __copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
412 difference_type __n = __last - __first;
416 if (__first.__ctz_ != 0)
418 unsigned __clz = __bits_per_word - __first.__ctz_;
421 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz - __dn…
422 __storage_type __b = *__first.__seg_ & __m;
427 ++__first.__seg_;
428 // __first.__ctz_ = 0;
430 // __first.__ctz_ == 0;
434 _VSTD::__to_raw_pointer(__first.__seg_),
441 __first.__seg_ += __nw;
443 __storage_type __b = *__first.__seg_ & __m;
454 __copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
461 difference_type __n = __last - __first;
465 if (__first.__ctz_ != 0)
467 unsigned __clz_f = __bits_per_word - __first.__ctz_;
470 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __…
471 __storage_type __b = *__first.__seg_ & __m;
476 if (__result.__ctz_ > __first.__ctz_)
477 *__result.__seg_ |= __b << (__result.__ctz_ - __first.__ctz_);
479 *__result.__seg_ |= __b >> (__first.__ctz_ - __result.__ctz_);
487 *__result.__seg_ |= __b >> (__first.__ctz_ + __ddn);
490 ++__first.__seg_;
491 // __first.__ctz_ = 0;
493 // __first.__ctz_ == 0;
497 for (; __n >= __bits_per_word; __n -= __bits_per_word, ++__first.__seg_)
499 __storage_type __b = *__first.__seg_;
510 __storage_type __b = *__first.__seg_ & __m;
533 copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_C…
535 if (__first.__ctz_ == __result.__ctz_)
536 return __copy_aligned(__first, __last, __result);
537 return __copy_unaligned(__first, __last, __result);
544 __copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
551 difference_type __n = __last - __first;
593 __copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __la…
600 difference_type __n = __last - __first;
680 copy_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_it…
683 return __copy_backward_aligned(__first, __last, __result);
684 return __copy_backward_unaligned(__first, __last, __result);
692 move(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_C…
694 return _VSTD::copy(__first, __last, __result);
702 move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_it…
704 return _VSTD::copy_backward(__first, __last, __result);
711 __swap_ranges_aligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1, false> __last,
718 difference_type __n = __last - __first;
722 if (__first.__ctz_ != 0)
724 unsigned __clz = __bits_per_word - __first.__ctz_;
727 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz - __dn…
728 __storage_type __b1 = *__first.__seg_ & __m;
729 *__first.__seg_ &= ~__m;
733 *__first.__seg_ |= __b2;
736 ++__first.__seg_;
737 // __first.__ctz_ = 0;
739 // __first.__ctz_ == 0;
741 for (; __n >= __bits_per_word; __n -= __bits_per_word, ++__first.__seg_, ++__result.__seg_)
742 swap(*__first.__seg_, *__result.__seg_);
747 __storage_type __b1 = *__first.__seg_ & __m;
748 *__first.__seg_ &= ~__m;
752 *__first.__seg_ |= __b2;
761 __swap_ranges_unaligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1, false> __last,
768 difference_type __n = __last - __first;
772 if (__first.__ctz_ != 0)
774 unsigned __clz_f = __bits_per_word - __first.__ctz_;
777 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __…
778 __storage_type __b1 = *__first.__seg_ & __m;
779 *__first.__seg_ &= ~__m;
785 if (__result.__ctz_ > __first.__ctz_)
787 unsigned __s = __result.__ctz_ - __first.__ctz_;
789 *__first.__seg_ |= __b2 >> __s;
793 unsigned __s = __first.__ctz_ - __result.__ctz_;
795 *__first.__seg_ |= __b2 << __s;
805 unsigned __s = __first.__ctz_ + __ddn;
807 *__first.__seg_ |= __b2 << __s;
810 ++__first.__seg_;
811 // __first.__ctz_ = 0;
813 // __first.__ctz_ == 0;
817 for (; __n >= __bits_per_word; __n -= __bits_per_word, ++__first.__seg_)
819 __storage_type __b1 = *__first.__seg_;
823 *__first.__seg_ = __b2 >> __result.__ctz_;
828 *__first.__seg_ |= __b2 << __clz_r;
834 __storage_type __b1 = *__first.__seg_ & __m;
835 *__first.__seg_ &= ~__m;
841 *__first.__seg_ |= __b2 >> __result.__ctz_;
851 *__first.__seg_ |= __b2 << __dn;
901 rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle, __bit_iterator<_Cp,…
905 difference_type __d1 = __middle - __first;
907 _I1 __r = __first + __d2;
915 _VSTD::copy(__first, __middle, __b.begin());
916 _VSTD::copy(__b.begin(), __b.end(), _VSTD::copy(__middle, __last, __first));
921 __bit_iterator<_Cp, false> __mp = _VSTD::swap_ranges(__first, __middle, __middle);
922 __first = __middle;
933 … _VSTD::copy_backward(__b.begin(), __b.end(), _VSTD::copy_backward(__first, __middle, __last));
938 __bit_iterator<_Cp, false> __mp = __first + __d2;
939 _VSTD::swap_ranges(__first, __mp, __middle);
940 __first = __mp;
1226 …template <class _Dp> friend void __fill_n_false(__bit_iterator<_Dp, false> __first, typename _Dp::…
1227 …template <class _Dp> friend void __fill_n_true(__bit_iterator<_Dp, false> __first, typename _Dp::s…
1228 …s _Dp, bool _IC> friend __bit_iterator<_Dp, false> __copy_aligned(__bit_iterator<_Dp, _IC> __first,
1231 …_Dp, bool _IC> friend __bit_iterator<_Dp, false> __copy_unaligned(__bit_iterator<_Dp, _IC> __first,
1234 …late <class _Dp, bool _IC> friend __bit_iterator<_Dp, false> copy(__bit_iterator<_Dp, _IC> __first,
1237 …ol _IC> friend __bit_iterator<_Dp, false> __copy_backward_aligned(__bit_iterator<_Dp, _IC> __first,
1240 … _IC> friend __bit_iterator<_Dp, false> __copy_backward_unaligned(__bit_iterator<_Dp, _IC> __first,
1243 …ss _Dp, bool _IC> friend __bit_iterator<_Dp, false> copy_backward(__bit_iterator<_Dp, _IC> __first,