/freebsd/contrib/llvm-project/libcxx/include/__algorithm/ |
H A D | search_n.h | 35 … _Iter __first, _Sent __last, _SizeT __count, const _Type& __value, _Pred& __pred, _Proj& __proj) { in __search_n_forward_impl() argument 37 return std::make_pair(__first, __first); in __search_n_forward_impl() 41 if (__first == __last) { // return __last if no element matches __value in __search_n_forward_impl() 42 _IterOps<_AlgPolicy>::__advance_to(__first, __last); in __search_n_forward_impl() 43 return std::make_pair(__first, __first); in __search_n_forward_impl() 45 if (std::__invoke(__pred, std::__invoke(__proj, *__first), __value)) in __search_n_forward_impl() 47 ++__first; in __search_n_forward_impl() 50 _Iter __m = __first; in __search_n_forward_impl() 54 return std::make_pair(__first, ++__m); in __search_n_forward_impl() 56 _IterOps<_AlgPolicy>::__advance_to(__first, __last); in __search_n_forward_impl() [all …]
|
H A D | sort.h | 271 __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { 273 for (--__lm1; __first != __lm1; ++__first) { 274 _BidirectionalIterator __i = std::__min_element<_Compare>(__first, __last, __comp); 275 if (__i != __first) 276 _IterOps<_AlgPolicy>::iter_swap(__first, __i); 284 __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { 288 if (__first == __last) 290 _BidirectionalIterator __i = __first; 301 } while (__j != __first && __comp(__t, *--__k)); 314 __insertion_sort_unguarded(_RandomAccessIterator const __first, _RandomAccessIterator __last, _Comp… [all …]
|
H A D | rotate.h | 33 __rotate_left(_ForwardIterator __first, _ForwardIterator __last) { in __rotate_left() argument 37 value_type __tmp = _Ops::__iter_move(__first); in __rotate_left() 38 _ForwardIterator __lm1 = std::__move<_AlgPolicy>(_Ops::next(__first), __last, __first).second; in __rotate_left() 45 __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last) { in __rotate_right() argument 51 …_BidirectionalIterator __fp1 = std::__move_backward<_AlgPolicy>(__first, __lm1, std::move(__last))… in __rotate_right() 52 *__first = std::move(__tmp); in __rotate_right() 58 __rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last) { in __rotate_forward() argument 61 _IterOps<_AlgPolicy>::iter_swap(__first, __i); in __rotate_forward() 62 ++__first; in __rotate_forward() 65 if (__first == __middle) in __rotate_forward() [all …]
|
H A D | stable_partition.h | 36 _ForwardIterator __first, in __stable_partition_impl() 44 // *__first is known to be false in __stable_partition_impl() 47 return __first; in __stable_partition_impl() 49 _ForwardIterator __m = __first; in __stable_partition_impl() 51 _Ops::iter_swap(__first, __m); in __stable_partition_impl() 54 return __first; in __stable_partition_impl() 61 // Update __first to always point to the end of the trues in __stable_partition_impl() 63 ::new ((void*)__t) value_type(_Ops::__iter_move(__first)); in __stable_partition_impl() 66 _ForwardIterator __i = __first; in __stable_partition_impl() 69 *__first in __stable_partition_impl() 33 __stable_partition_impl(_ForwardIterator __first,_ForwardIterator __last,_Predicate __pred,_Distance __len,_Pair __p,forward_iterator_tag __fit) __stable_partition_impl() argument 122 __stable_partition_impl(_ForwardIterator __first,_ForwardIterator __last,_Predicate __pred,forward_iterator_tag) __stable_partition_impl() argument 157 __stable_partition_impl(_BidirectionalIterator __first,_BidirectionalIterator __last,_Predicate __pred,_Distance __len,_Pair __p,bidirectional_iterator_tag __bit) __stable_partition_impl() argument 268 __stable_partition_impl(_BidirectionalIterator __first,_BidirectionalIterator __last,_Predicate __pred,bidirectional_iterator_tag) __stable_partition_impl() argument 312 __stable_partition(_ForwardIterator __first,_ForwardIterator __last,_Predicate && __pred,_IterCategory __iter_category) __stable_partition() argument 320 stable_partition(_ForwardIterator __first,_ForwardIterator __last,_Predicate __pred) stable_partition() argument [all...] |
H A D | find.h | 46 __find(_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) { in __find() argument 47 for (; __first != __last; ++__first) in __find() 48 if (std::__invoke(__proj, *__first) == __value) in __find() 50 return __first; in __find() 60 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find(_Tp* __first, _Tp* __last, const _U… in __find() argument 61 if (auto __ret = std::__constexpr_memchr(__first, __value, __last - __first)) in __find() 73 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find(_Tp* __first, _Tp* __last, const _U… in __find() argument 74 if (auto __ret = std::__constexpr_wmemchr(__first, __value, __last - __first)) in __find() 90 __find(_Tp* __first, _Tp* __last, const _Up& __value, _Proj& __proj) { in __find() argument 93 return std::__find(__first, __last, _Tp(__value), __proj); in __find() [all …]
|
H A D | partition.h | 29 __partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred, forward_iterator_tag) { in __partition_impl() 31 if (__first == __last) in __partition_impl() 32 return std::make_pair(std::move(__first), std::move(__first)); in __partition_impl() 33 if (!__pred(*__first)) in __partition_impl() 35 ++__first; in __partition_impl() 38 _ForwardIterator __p = __first; in __partition_impl() 41 _IterOps<_AlgPolicy>::iter_swap(__first, __p); in __partition_impl() 42 ++__first; in __partition_impl() 45 return std::make_pair(std::move(__first), st in __partition_impl() 26 __partition_impl(_ForwardIterator __first,_Sentinel __last,_Predicate __pred,forward_iterator_tag) __partition_impl() argument 51 __partition_impl(_BidirectionalIterator __first,_Sentinel __sentinel,_Predicate __pred,bidirectional_iterator_tag) __partition_impl() argument 80 __partition(_ForwardIterator __first,_Sentinel __last,_Predicate && __pred,_IterCategory __iter_category) __partition() argument 88 partition(_ForwardIterator __first,_ForwardIterator __last,_Predicate __pred) partition() argument [all...] |
H A D | unique_copy.h | 41 __unique_copy(_InputIterator __first, in __unique_copy() 46 if (__first != __last) { in __unique_copy() 47 typename _IterOps<_AlgPolicy>::template __value_type<_InputIterator> __t(*__first); in __unique_copy() 50 while (++__first != __last) { in __unique_copy() 51 if (!__pred(__t, *__first)) { in __unique_copy() 52 __t = *__first; in __unique_copy() 58 return pair<_InputIterator, _OutputIterator>(std::move(__first), std::move(__result)); 63 __unique_copy(_ForwardIterator __first, in __unique_copy() 68 if (__first != __last) { in __unique_copy() 69 _ForwardIterator __i = __first; in __unique_copy() 38 __unique_copy(_InputIterator __first,_Sent __last,_OutputIterator __result,_BinaryPredicate && __pred,__unique_copy_tags::__read_from_tmp_value_tag) __unique_copy() argument 60 __unique_copy(_ForwardIterator __first,_Sent __last,_OutputIterator __result,_BinaryPredicate && __pred,__unique_copy_tags::__reread_from_input_tag) __unique_copy() argument 82 __unique_copy(_InputIterator __first,_Sent __last,_InputAndOutputIterator __result,_BinaryPredicate && __pred,__unique_copy_tags::__reread_from_output_tag) __unique_copy() argument 99 unique_copy(_InputIterator __first,_InputIterator __last,_OutputIterator __result,_BinaryPredicate __pred) unique_copy() argument 116 unique_copy(_InputIterator __first,_InputIterator __last,_OutputIterator __result) unique_copy() argument [all...] |
H A D | fill_n.h | 32 __fill_n(_OutputIterator __first, _Size __n, const _Tp& __value); 36 __fill_n_bool(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { in __fill_n_bool() argument 42 if (__first.__ctz_ != 0) { in __fill_n_bool() 43 __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); in __fill_n_bool() 45 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f … in __fill_n_bool() 47 *__first.__seg_ |= __m; in __fill_n_bool() 49 *__first.__seg_ &= ~__m; in __fill_n_bool() 51 ++__first.__seg_; in __fill_n_bool() 55 …std::__fill_n(std::__to_address(__first.__seg_), __nw, _FillVal ? static_cast<__storage_type>(-1) … in __fill_n_bool() 59 __first.__seg_ += __nw; in __fill_n_bool() [all …]
|
H A D | minmax_element.h | 43 __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) { in __minmax_element_impl() argument 46 pair<_Iter, _Iter> __result(__first, __first); in __minmax_element_impl() 47 if (__first == __last || ++__first == __last) in __minmax_element_impl() 50 if (__less(__first, __result.first)) in __minmax_element_impl() 51 __result.first = __first; in __minmax_element_impl() 53 __result.second = __first; in __minmax_element_impl() 55 while (++__first != __last) { in __minmax_element_impl() 56 _Iter __i = __first; in __minmax_element_impl() 57 if (++__first == __last) { in __minmax_element_impl() 65 if (__less(__first, __i)) { in __minmax_element_impl() [all …]
|
H A D | nth_element.h | 49 _RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp) { in __nth_element() 58 difference_type __len = __last - __first; in __nth_element() 64 if (__comp(*--__last, *__first)) in __nth_element() 65 _Ops::iter_swap(__first, __last); in __nth_element() 68 _RandomAccessIterator __m = __first; in __nth_element() 69 std::__sort3<_AlgPolicy, _Compare>(__first, ++__m, --__last, __comp); in __nth_element() 74 std::__selection_sort<_AlgPolicy, _Compare>(__first, __last, __comp); in __nth_element() 78 _RandomAccessIterator __m = __first + __len / 2; in __nth_element() 80 unsigned __n_swaps = std::__sort3<_AlgPolicy, _Compare>(__first, __m, --__lm1, __comp); in __nth_element() 82 // partition [__first, __ in __nth_element() 45 __nth_element(_RandomAccessIterator __first,_RandomAccessIterator __nth,_RandomAccessIterator __last,_Compare __comp) __nth_element() argument 226 __nth_element_impl(_RandomAccessIterator __first,_RandomAccessIterator __nth,_RandomAccessIterator __last,_Compare & __comp) __nth_element_impl() argument 243 nth_element(_RandomAccessIterator __first,_RandomAccessIterator __nth,_RandomAccessIterator __last,_Compare __comp) nth_element() argument 250 nth_element(_RandomAccessIterator __first,_RandomAccessIterator __nth,_RandomAccessIterator __last) nth_element() argument [all...] |
H A D | lower_bound.h | 32 _Iter __first, in __lower_bound_bisecting() argument 39 _Iter __m = __first; in __lower_bound_bisecting() 42 __first = ++__m; in __lower_bound_bisecting() 48 return __first; in __lower_bound_bisecting() 62 __lower_bound_onesided(_ForwardIterator __first, _Sent __last, const _Type& __value, _Comp& __comp,… in __lower_bound_onesided() argument 64 if (__first == __last || !std::__invoke(__comp, std::__invoke(__proj, *__first), __value)) in __lower_bound_onesided() 65 return __first; in __lower_bound_onesided() 68 for (_Distance __step = 1; __first != __last; __step <<= 1) { in __lower_bound_onesided() 69 auto __it = __first; in __lower_bound_onesided() 78 return std::__lower_bound_bisecting<_AlgPolicy>(__first, __value, __dist, __comp, __proj); in __lower_bound_onesided() [all …]
|
H A D | count.h | 35 __count(_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) { in __count() argument 37 for (; __first != __last; ++__first) in __count() 38 if (std::__invoke(__proj, *__first) == __value) in __count() 46 __count_bool(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { in __count_bool() argument 54 if (__first.__ctz_ != 0) { in __count_bool() 55 __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); in __count_bool() 57 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f … in __count_bool() 58 …__r = std::__libcpp_popcount(std::__invert_if<!_ToCount>(*__first.__seg_) & __m… in __count_bool() 60 ++__first.__seg_; in __count_bool() 63 for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word) in __count_bool() [all …]
|
H A D | unique.h | 33 __unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) { in __unique() argument 34 __first = std::__adjacent_find(__first, __last, __pred); in __unique() 35 if (__first != __last) { in __unique() 38 _Iter __i = __first; in __unique() 40 if (!__pred(*__first, *__i)) in __unique() 41 *++__first = _IterOps<_AlgPolicy>::__iter_move(__i); in __unique() 42 ++__first; in __unique() 43 return std::pair<_Iter, _Iter>(std::move(__first), std::move(__i)); in __unique() 45 return std::pair<_Iter, _Iter>(__first, __first); in __unique() 50 unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) { in unique() argument [all …]
|
H A D | shuffle.h | 96 random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) { 100 difference_type __d = __last - __first; in random_shuffle() 104 for (--__last, (void)--__d; __first < __last; ++__first, (void)--__d) { in random_shuffle() 107 swap(*__first, *(__first + __i)); in random_shuffle() 114 random_shuffle(_RandomAccessIterator __first, in random_shuffle() 123 difference_type __d = __last - __first; in random_shuffle() 125 for (--__last; __first < __last; ++__first, (voi in random_shuffle() 97 random_shuffle(_RandomAccessIterator __first,_RandomAccessIterator __last) random_shuffle() argument 118 random_shuffle(_RandomAccessIterator __first,_RandomAccessIterator __last,_RandomNumberGenerator && __rand) random_shuffle() argument 141 __shuffle(_RandomAccessIterator __first,_Sentinel __last_sentinel,_UniformRandomNumberGenerator && __g) __shuffle() argument 165 shuffle(_RandomAccessIterator __first,_RandomAccessIterator __last,_UniformRandomNumberGenerator && __g) shuffle() argument [all...] |
/freebsd/contrib/llvm-project/libcxx/include/__random/ |
H A D | seed_seq.h | 46 _LIBCPP_HIDE_FROM_ABI seed_seq(_InputIterator __first, _InputIterator __last) { in seed_seq() argument 49 __init(__first, __last); in seed_seq() 54 _LIBCPP_HIDE_FROM_ABI void generate(_RandomAccessIterator __first, _RandomAccessIterator __last); 70 _LIBCPP_HIDE_FROM_ABI void __init(_InputIterator __first, _InputIterator __last); 76 void seed_seq::__init(_InputIterator __first, _InputIterator __last) { in __init() argument 77 for (_InputIterator __s = __first; __s != __last; ++__s) in __init() 82 void seed_seq::generate(_RandomAccessIterator __first, _RandomAccessIterator __last) { in generate() argument 88 if (__first != __last) { in generate() 89 std::fill(__first, __last, 0x8b8b8b8b); in generate() 90 const size_t __n = static_cast<size_t>(__last - __first); in generate() [all …]
|
/freebsd/contrib/llvm-project/libcxx/include/__charconv/ |
H A D | to_chars_base_10.h | 33 _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append1(char* __first, uint32_t … in __append1() argument 34 *__first = '0' + static_cast<char>(__value); in __append1() 35 return __first + 1; in __append1() 38 _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append2(char* __first, uint32_t … in __append2() argument 39 return std::copy_n(&__digits_base_10[__value * 2], 2, __first); in __append2() 42 _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append3(char* __first, uint32_t … in __append3() argument 43 return __itoa::__append2(__itoa::__append1(__first, __value / 100), __value % 100); in __append3() 46 _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append4(char* __first, uint32_t … in __append4() argument 47 return __itoa::__append2(__itoa::__append2(__first, __value / 100), __value % 100); in __append4() 50 _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append5(char* __first, uint32_t … in __append5() argument [all …]
|
H A D | to_chars_integral.h | 47 __to_chars_itoa(char* __first, char* __last, _Tp __value, false_type); 51 __to_chars_itoa(char* __first, char* __last, _Tp __value, true_type) { in __to_chars_itoa() argument 53 if (__value < 0 && __first != __last) { in __to_chars_itoa() 54 *__first++ = '-'; in __to_chars_itoa() 58 return std::__to_chars_itoa(__first, __last, __x, false_type()); in __to_chars_itoa() 63 __to_chars_itoa(char* __first, char* __last, _Tp __value, false_type) { in __to_chars_itoa() argument 65 auto __diff = __last - __first; in __to_chars_itoa() 68 return {__tx::__convert(__first, __value), errc(0)}; in __to_chars_itoa() 76 __to_chars_itoa(char* __first, char* __last, __uint128_t __value, false_type) { in __to_chars_itoa() argument 82 return __to_chars_itoa(__first, __last, static_cast<uint64_t>(__value), false_type()); in __to_chars_itoa() [all …]
|
/freebsd/contrib/llvm-project/libcxx/include/__pstl/internal/ |
H A D | algorithm_impl.h |
|
H A D | numeric_impl.h |
|
H A D | unseq_backend_simd.h |
|
H A D | glue_algorithm_impl.h |
|
H A D | memory_impl.h |
|
/freebsd/contrib/llvm-project/libcxx/include/__numeric/ |
H A D | partial_sum.h | 28 partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { 29 if (__first != __last) { in partial_sum() argument 30 typename iterator_traits<_InputIterator>::value_type __t(*__first); in partial_sum() 32 for (++__first, (void)++__result; __first != __last; ++__first, (void)++__result) { in partial_sum() 34 __t = std::move(__t) + *__first; in partial_sum() 36 __t = __t + *__first; in partial_sum() 46 partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op) { in partial_sum() 47 if (__first ! in partial_sum() 51 partial_sum(_InputIterator __first,_InputIterator __last,_OutputIterator __result,_BinaryOperation __binary_op) partial_sum() argument [all...] |
/freebsd/contrib/llvm-project/libcxx/src/ |
H A D | charconv.cpp | 36 to_chars_result to_chars(char* __first, char* __last, float __value) { 37 return _Floating_to_chars<_Floating_to_chars_overload::_Plain>(__first, __last, __value, chars_format{}, 0); 40 to_chars_result to_chars(char* __first, char* __last, double __value) { 41 return _Floating_to_chars<_Floating_to_chars_overload::_Plain>(__first, __last, __value, chars_format{}, 0); 44 to_chars_result to_chars(char* __first, char* __last, long double __value) { 46 __first, __last, static_cast<double>(__value), chars_format{}, 0); in to_chars() 49 to_chars_result to_chars(char* __first, char* __last, float __value, chars_format __fmt) { in to_chars() argument 50 return _Floating_to_chars<_Floating_to_chars_overload::_Format_only>(__first, __last, __value, __fmt, 0); in to_chars() 53 to_chars_result to_chars(char* __first, char* __last, double __value, chars_format __fmt) { in to_chars() argument 54 return _Floating_to_chars<_Floating_to_chars_overload::_Format_only>(__first, __las in to_chars() 45 to_chars(char * __first,char * __last,float __value) to_chars() argument 58 to_chars(char * __first,char * __last,float __value,chars_format __fmt) to_chars() argument 62 to_chars(char * __first,char * __last,double __value,chars_format __fmt) to_chars() argument 66 to_chars(char * __first,char * __last,long double __value,chars_format __fmt) to_chars() argument 71 to_chars(char * __first,char * __last,float __value,chars_format __fmt,int __precision) to_chars() argument 76 to_chars(char * __first,char * __last,double __value,chars_format __fmt,int __precision) to_chars() argument 81 to_chars(char * __first,char * __last,long double __value,chars_format __fmt,int __precision) to_chars() argument [all...] |
/freebsd/contrib/llvm-project/libcxx/include/__debug_utils/ |
H A D | strict_weak_ordering_check.h | 28 __check_strict_weak_ordering_sorted(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) { in __check_strict_weak_ordering_sorted() argument 35 (std::is_sorted<_RandomAccessIterator, _Comp_ref>(__first, __last, _Comp_ref(__comp))), in __check_strict_weak_ordering_sorted() 38 __diff_t __size = __last - __first > __diff_t(100) ? __diff_t(100) : __last - __first; in __check_strict_weak_ordering_sorted() 42 // Find first element that is greater than *(__first+__p). in __check_strict_weak_ordering_sorted() 43 while (__q < __size && !__comp(*(__first + __p), *(__first + __q))) { in __check_strict_weak_ordering_sorted() 50 !__comp(*(__first + __a), *(__first + __b)), "Your comparator is not a valid strict-weak ordering"); in __check_strict_weak_ordering_sorted() 52 !__comp(*(__first in __check_strict_weak_ordering_sorted() [all...] |