Home
last modified time | relevance | path

Searched refs:__comp (Results 1 – 25 of 111) sorted by relevance

12345

/openbsd-src/gnu/llvm/libcxx/include/__algorithm/
H A Dnth_element.h31 _RandomAccessIterator __m, _Compare __comp) in __nth_element_find_guard() argument
38 if (__comp(*__j, *__m)) { in __nth_element_find_guard()
46 …AccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp) in __nth_element() argument
64 if (__comp(*--__last, *__first)) in __nth_element()
70 std::__sort3<_AlgPolicy, _Compare>(__first, ++__m, --__last, __comp); in __nth_element()
76 std::__selection_sort<_AlgPolicy, _Compare>(__first, __last, __comp); in __nth_element()
82 unsigned __n_swaps = std::__sort3<_AlgPolicy, _Compare>(__first, __m, --__lm1, __comp); in __nth_element()
91 if (!__comp(*__i, *__m)) // if *__first == *__m in __nth_element()
94 if (_VSTD::__nth_element_find_guard<_Compare>(__i, __j, __m, __comp)) { in __nth_element()
102 if (!__comp(*__first, *--__j)) { // we need a guard if *__first == *(__last-1) in __nth_element()
[all …]
H A Dstable_sort.h37 typename iterator_traits<_InputIterator1>::value_type* __result, _Compare __comp) in __merge_move_construct() argument
60 if (__comp(*__first2, *__first1)) in __merge_move_construct()
79 _OutputIterator __result, _Compare __comp) in __merge_move_assign() argument
91 if (__comp(*__first2, *__first1)) in __merge_move_assign()
108 __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
114 __stable_sort_move(_RandomAccessIterator __first1, _RandomAccessIterator __last1, _Compare __comp, in __stable_sort_move() argument
131 if (__comp(*--__last1, *__first1)) in __stable_sort_move()
150 std::__insertion_sort_move<_AlgPolicy, _Compare>(__first1, __last1, __first2, __comp); in __stable_sort_move()
155 std::__stable_sort<_AlgPolicy, _Compare>(__first1, __m, __comp, __l2, __first2, __l2); in __stable_sort_move()
156 …std::__stable_sort<_AlgPolicy, _Compare>(__m, __last1, __comp, __len - __l2, __first2 + __l2, __le… in __stable_sort_move()
[all …]
H A Dsort.h50 _Comp& __comp; member
53 _WrapAlgPolicy(_Comp& __c) : __comp(__c) {} in _WrapAlgPolicy()
72 _Comp __get_comp(_Comp __comp) { return __comp; }
83 _Comp __get_comp(_Wrapped& __w) { return __w.__comp; }
294 _Compare __comp) {
297 _BidirectionalIterator __i = std::__min_element<_Compare>(__first, __last, __comp);
305 … __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) {
314 for (_BidirectionalIterator __k = __i; __k != __first && __comp(__t, *--__k); --__j)
323 … __insertion_sort_3(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
329 …__sort3_maybe_branchless<_AlgPolicy, _Compare>(__first, __first + difference_type(1), __j, __comp);
[all …]
H A Dpartial_sort.h34 …andomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last, _Compare&& __comp) { in __partial_sort_impl() argument
39 std::__make_heap<_AlgPolicy>(__first, __middle, __comp); in __partial_sort_impl()
45 if (__comp(*__i, *__first)) in __partial_sort_impl()
48 std::__sift_down<_AlgPolicy>(__first, __comp, __len, __first); in __partial_sort_impl()
51 std::__sort_heap<_AlgPolicy>(std::move(__first), std::move(__middle), __comp); in __partial_sort_impl()
59 _Compare& __comp) { in __partial_sort() argument
66 …_sort_impl<_AlgPolicy>(__first, __middle, __last, static_cast<__comp_ref_type<_Compare> >(__comp)); in __partial_sort()
77 _Compare __comp) in partial_sort() argument
82 …artial_sort<_ClassicAlgPolicy>(std::move(__first), std::move(__middle), std::move(__last), __comp); in partial_sort()
H A Dinplace_merge.h66 _OutputIterator __result, _Compare&& __comp) in __half_inplace_merge() argument
76 if (__comp(*__first2, *__first1)) in __half_inplace_merge()
96 _Compare&& __comp, in __buffered_inplace_merge() argument
108 std::__half_inplace_merge<_AlgPolicy>(__buff, __p, __middle, __last, __first, __comp); in __buffered_inplace_merge()
120 _RBi(__last), _Inverted(__comp)); in __buffered_inplace_merge()
129 _Compare&& __comp, in __inplace_merge() argument
144 (__first, __middle, __last, __comp, __len1, __len2, __buff); in __inplace_merge()
150 if (__comp(*__middle, *__first)) in __inplace_merge()
171 … __m1 = std::__upper_bound<_AlgPolicy>(__first, __middle, *__m2, __comp, std::__identity()); in __inplace_merge()
186 __m2 = std::lower_bound(__middle, __last, *__m1, __comp); in __inplace_merge()
[all …]
H A Dpush_heap.h28 void __sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp, in __sift_up() argument
36 if (__comp(*__ptr, *--__last)) { in __sift_up()
45 } while (__comp(*__ptr, __t)); in __sift_up()
54 void __push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) { in __push_heap() argument
56 …t_up<_AlgPolicy, __comp_ref_type<_Compare> >(std::move(__first), std::move(__last), __comp, __len); in __push_heap()
61 void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { in push_heap() argument
65 std::__push_heap<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp); in push_heap()
H A Dsift_down.h26 __sift_down(_RandomAccessIterator __first, _Compare&& __comp, in __sift_down() argument
44 if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { in __sift_down()
51 if (__comp(*__child_i, *__start)) in __sift_down()
69 if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { in __sift_down()
76 } while (!__comp(*__child_i, __top)); in __sift_down()
82 __floyd_sift_down(_RandomAccessIterator __first, _Compare&& __comp, in __floyd_sift_down() argument
96 if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { in __floyd_sift_down()
H A Dranges_min.h42 …const _Tp& operator()(const _Tp& __a, const _Tp& __b, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
43 return std::invoke(__comp, std::invoke(__proj, __b), std::invoke(__proj, __a)) ? __b : __a;
49 _Tp operator()(initializer_list<_Tp> __il, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
51 return *ranges::__min_element_impl(__il.begin(), __il.end(), __comp, __proj);
58 range_value_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
65 return *ranges::__min_element_impl(__first, __last, __comp, __proj);
69 if (std::invoke(__comp, std::invoke(__proj, *__first), std::invoke(__proj, __result)))
H A Dranges_binary_search.h37 …bool operator()(_Iter __first, _Sent __last, const _Type& __value, _Comp __comp = {}, _Proj __proj… in operator()
38 auto __ret = std::__lower_bound_impl<_RangeAlgPolicy>(__first, __last, __value, __comp, __proj);
39 return __ret != __last && !std::invoke(__comp, __value, std::invoke(__proj, *__ret));
45 bool operator()(_Range&& __r, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
48 auto __ret = std::__lower_bound_impl<_RangeAlgPolicy>(__first, __last, __value, __comp, __proj);
49 return __ret != __last && !std::invoke(__comp, __value, std::invoke(__proj, *__ret));
H A Dequal_range.h38 __equal_range(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp, _Proj&& __proj) { in __equal_range() argument
44 if (std::__invoke(__comp, std::__invoke(__proj, *__mid), __value)) { in __equal_range()
47 } else if (std::__invoke(__comp, __value, std::__invoke(__proj, *__mid))) { in __equal_range()
53 std::__lower_bound_impl<_AlgPolicy>(__first, __mid, __value, __comp, __proj), in __equal_range()
54 std::__upper_bound<_AlgPolicy>(++__mp1, __end, __value, __comp, __proj)); in __equal_range()
62 equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)… in equal_range() argument
71 static_cast<__comp_ref_type<_Compare> >(__comp), in equal_range()
H A Dranges_max.h43 …const _Tp& operator()(const _Tp& __a, const _Tp& __b, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
44 return std::invoke(__comp, std::invoke(__proj, __a), std::invoke(__proj, __b)) ? __b : __a;
50 _Tp operator()(initializer_list<_Tp> __il, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
53 …auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, …
61 range_value_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
68 …auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, …
73 if (std::invoke(__comp, std::invoke(__proj, __result), std::invoke(__proj, *__first)))
H A Dranges_lexicographical_compare.h38 _Comp& __comp, in __lexicographical_compare_impl()
43 || std::invoke(__comp, std::invoke(__proj1, *__first1), std::invoke(__proj2, *__first2))) in __lexicographical_compare_impl()
45 if (std::invoke(__comp, std::invoke(__proj2, *__first2), std::invoke(__proj1, *__first1))) in __lexicographical_compare_impl()
61 _Comp __comp = {}, in operator()
66 __comp,
78 …bool operator()(_Range1&& __range1, _Range2&& __range2, _Comp __comp = {}, _Proj1 __proj1 = {}, _P… in operator()
81 __comp,
H A Dranges_is_heap.h40 static bool __is_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) { in __is_heap_fn_impl()
42 auto&& __projected_comp = std::__make_projected(__comp, __proj); in __is_heap_fn_impl()
51 bool operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
52 return __is_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
58 bool operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
59 return __is_heap_fn_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj);
H A Dranges_stable_sort.h44 static _Iter __stable_sort_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) { in __stable_sort_fn_impl()
47 auto&& __projected_comp = std::__make_projected(__comp, __proj); in __stable_sort_fn_impl()
56 _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
57 return __stable_sort_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
63 borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
64 return __stable_sort_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
H A Dranges_push_heap.h45 _Iter __push_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) { in __push_heap_fn_impl()
48 auto&& __projected_comp = std::__make_projected(__comp, __proj); in __push_heap_fn_impl()
57 _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
58 return __push_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
64 borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
65 return __push_heap_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
H A Dranges_sort_heap.h45 _Iter __sort_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) { in __sort_heap_fn_impl()
48 auto&& __projected_comp = std::__make_projected(__comp, __proj); in __sort_heap_fn_impl()
57 _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
58 return __sort_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
64 borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
65 return __sort_heap_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
H A Dranges_sort.h44 _Iter __sort_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) { in __sort_fn_impl()
47 auto&& __projected_comp = std::__make_projected(__comp, __proj); in __sort_fn_impl()
56 _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
57 return __sort_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
63 borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
64 return __sort_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
H A Dranges_make_heap.h45 _Iter __make_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) { in __make_heap_fn_impl()
48 auto&& __projected_comp = std::__make_projected(__comp, __proj); in __make_heap_fn_impl()
57 _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
58 return __make_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
64 borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
65 return __make_heap_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
H A Dranges_is_heap_until.h41 static _Iter __is_heap_until_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) { in __is_heap_until_fn_impl()
43 auto&& __projected_comp = std::__make_projected(__comp, __proj); in __is_heap_until_fn_impl()
51 _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
52 return __is_heap_until_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
58 …borrowed_iterator_t<_Range> operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) con… in operator()
59 return __is_heap_until_fn_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj);
H A Dranges_min_element.h36 _Ip __min_element_impl(_Ip __first, _Sp __last, _Comp& __comp, _Proj& __proj) { in __min_element_impl() argument
42 if (std::invoke(__comp, std::invoke(__proj, *__i), std::invoke(__proj, *__first))) in __min_element_impl()
52 _Ip operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
53 return ranges::__min_element_impl(__first, __last, __comp, __proj);
59 borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const { in operator()
60 return ranges::__min_element_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
H A Dmin_element.h29 _Iter __min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) { in __min_element() argument
35 if (std::__invoke(__comp, std::__invoke(__proj, *__i), std::__invoke(__proj, *__first))) in __min_element()
43 _Iter __min_element(_Iter __first, _Sent __last, _Comp __comp) { in __min_element() argument
45 return std::__min_element<_Comp>(std::move(__first), std::move(__last), __comp, __proj); in __min_element()
50 min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) in min_element() argument
57 …turn std::__min_element<__comp_ref_type<_Compare> >(std::move(__first), std::move(__last), __comp); in min_element()
/openbsd-src/gnu/gcc/libstdc++-v3/include/bits/
H A Dstl_heap.h88 __is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp, in __is_heap() argument
94 if (__comp(__first[__parent], __first[__child])) in __is_heap()
110 _StrictWeakOrdering __comp) in __is_heap() argument
111 { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } in __is_heap()
163 _Distance __topIndex, _Tp __value, _Compare __comp) in __push_heap() argument
167 && __comp(*(__first + __parent), __value)) in __push_heap()
190 _Compare __comp) in push_heap() argument
201 __glibcxx_requires_heap_pred(__first, __last - 1, __comp); in push_heap()
204 _DistanceType(0), _ValueType(*(__last - 1)), __comp); in push_heap()
273 _Distance __len, _Tp __value, _Compare __comp) in __adjust_heap() argument
[all …]
H A Dstl_algo.h121 __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) in __median() argument
125 if (__comp(__a, __b)) in __median()
126 if (__comp(__b, __c)) in __median()
128 else if (__comp(__a, __c)) in __median()
132 else if (__comp(__a, __c)) in __median()
134 else if (__comp(__b, __c)) in __median()
2274 _Tp __pivot, _Compare __comp) in __unguarded_partition() argument
2278 while (__comp(*__first, __pivot)) in __unguarded_partition()
2281 while (__comp(__pivot, *__last)) in __unguarded_partition()
2326 _Compare __comp) in __unguarded_linear_insert() argument
[all …]
/openbsd-src/gnu/lib/libstdc++/libstdc++/include/bits/
H A Dstl_heap.h104 _Distance __topIndex, _Tp __value, _Compare __comp) in __push_heap() argument
107 while (__holeIndex > __topIndex && __comp(*(__first + __parent), __value)) { in __push_heap()
118 _Compare __comp) in push_heap() argument
130 _ValueType(*(__last - 1)), __comp); in push_heap()
182 _Distance __len, _Tp __value, _Compare __comp) in __adjust_heap() argument
187 if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1)))) in __adjust_heap()
197 __push_heap(__first, __holeIndex, __topIndex, __value, __comp); in __adjust_heap()
203 _RandomAccessIterator __result, _Tp __value, _Compare __comp) in __pop_heap() argument
208 __value, __comp); in __pop_heap()
214 _RandomAccessIterator __last, _Compare __comp) in pop_heap() argument
[all …]
H A Dstl_algo.h120 __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) in __median() argument
124 if (__comp(__a, __b)) in __median()
125 if (__comp(__b, __c)) in __median()
127 else if (__comp(__a, __c)) in __median()
131 else if (__comp(__a, __c)) in __median()
133 else if (__comp(__b, __c)) in __median()
1909 _Tp __pivot, _Compare __comp) in __unguarded_partition() argument
1912 while (__comp(*__first, __pivot)) in __unguarded_partition()
1915 while (__comp(__pivot, *__last)) in __unguarded_partition()
1959 __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val, _Compare __comp) in __unguarded_linear_insert() argument
[all …]

12345