| /llvm-project-15.0.7/libcxx/include/__algorithm/ |
| H A D | nth_element.h | 38 if (__comp(*__j, *__m)) { in __nth_element_find_guard() 64 if (__comp(*--__last, *__first)) in __nth_element() 120 while (!__comp(*__first, *__i)) in __nth_element() 122 while (__comp(*__first, *--__j)) in __nth_element() 150 while (__comp(*__i, *__m)) in __nth_element() 153 while (!__comp(*--__j, *__m)) in __nth_element() 167 if (__i != __m && __comp(*__m, *__i)) in __nth_element() 187 if (__comp(*__j, *__m)) { in __nth_element() 203 if (__comp(*__j, *__m)) { in __nth_element() 228 _Compare& __comp) { in __nth_element_impl() argument [all …]
|
| H A D | stable_sort.h | 33 typename iterator_traits<_InputIterator1>::value_type* __result, _Compare __comp) in __merge_move_construct() argument 56 if (__comp(*__first2, *__first1)) in __merge_move_construct() 75 _OutputIterator __result, _Compare __comp) in __merge_move_assign() argument 87 if (__comp(*__first2, *__first1)) in __merge_move_assign() 104 __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp, 127 if (__comp(*--__last1, *__first1)) in __stable_sort_move() 151 std::__stable_sort<_AlgPolicy, _Compare>(__first1, __m, __comp, __l2, __first2, __l2); in __stable_sort_move() 176 if (__comp(*--__last, *__first)) in __stable_sort() 182 std::__insertion_sort<_AlgPolicy, _Compare>(__first, __last, __comp); in __stable_sort() 191 std::__stable_sort_move<_AlgPolicy, _Compare>(__first, __m, __comp, __l2, __buff); in __stable_sort() [all …]
|
| H A D | sort.h | 44 _Comp& __comp; member 66 _Comp __get_comp(_Comp __comp) { return __comp; } 320 if (__comp(*__i, *__j)) { 350 if (__comp(*--__last, *__first)) 363 --__last, __comp); 372 if (__comp(*__i, *__j)) { 449 --__last, __comp); 533 if (__comp(*__j, *__m)) { 549 while (__comp(*__i, *__m)) 632 __less<uintptr_t> __comp; [all …]
|
| H A D | partial_sort.h | 34 …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() 52 std::__sort_heap<_AlgPolicy>(std::move(__first), std::move(__middle), __comp); in __partial_sort_impl() 60 _Compare& __comp) { in __partial_sort() argument 67 … = std::__partial_sort_impl<_AlgPolicy>(__first, __middle, __last, static_cast<_Comp_ref>(__comp)); in __partial_sort() 78 _Compare __comp) in partial_sort() argument 83 …artial_sort<_ClassicAlgPolicy>(std::move(__first), std::move(__middle), std::move(__last), __comp); in partial_sort()
|
| H A D | inplace_merge.h | 61 _OutputIterator __result, _Compare&& __comp) in __half_inplace_merge() argument 71 if (__comp(*__first2, *__first1)) in __half_inplace_merge() 90 _Compare&& __comp, in __buffered_inplace_merge() argument 114 _RBi(__last), _Inverted(__comp)); in __buffered_inplace_merge() 123 _Compare&& __comp, in __inplace_merge() argument 138 (__first, __middle, __last, __comp, __len1, __len2, __buff); in __inplace_merge() 144 if (__comp(*__middle, *__first)) in __inplace_merge() 180 __m2 = std::lower_bound(__middle, __last, *__m1, __comp); in __inplace_merge() 193 __first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size); in __inplace_merge() 202 __middle, __m2, __last, __comp, __len12, __len22, __buff, __buff_size); in __inplace_merge() [all …]
|
| H A D | sift_down.h | 26 __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 D | ranges_min.h | 42 …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 D | push_heap.h | 28 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 57 std::__sift_up<_AlgPolicy, _CompRef>(std::move(__first), std::move(__last), __comp, __len); in __push_heap() 62 void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { in push_heap() argument 66 std::__push_heap<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp); in push_heap()
|
| H A D | ranges_binary_search.h | 37 …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, *__first)); 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, *__first));
|
| H A D | ranges_lexicographical_compare.h | 38 _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 D | ranges_max.h | 43 …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 D | equal_range.h | 38 __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 69 …std::move(__first), std::move(__last), __value, static_cast<_Comp_ref>(__comp), std::__identity()); in equal_range()
|
| H A D | ranges_is_heap_until.h | 41 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 D | ranges_min_element.h | 36 _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 D | ranges_sort.h | 44 _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 D | ranges_sort_heap.h | 45 _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 D | ranges_make_heap.h | 45 _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 D | ranges_push_heap.h | 45 _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 D | ranges_is_heap.h | 40 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 D | ranges_stable_sort.h | 44 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 D | ranges_is_sorted_until.h | 35 _Iter __is_sorted_until_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) { in __is_sorted_until_impl() argument 40 if (std::invoke(__comp, std::invoke(__proj, *__i), std::invoke(__proj, *__first))) in __is_sorted_until_impl() 53 _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const { in operator() 54 return ranges::__is_sorted_until_impl(std::move(__first), std::move(__last), __comp, __proj); 61 …borrowed_iterator_t<_Range> operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) con… in operator() 62 …return ranges::__is_sorted_until_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj…
|
| /llvm-project-15.0.7/pstl/include/pstl/internal/omp/ |
| H A D | parallel_merge.h | 26 _RandomAccessIterator3 __zs, _Compare __comp, _LeafMerge __leaf_merge) in __parallel_merge_body() argument 31 __leaf_merge(__xs, __xe, __ys, __ye, __zs, __comp); in __parallel_merge_body() 41 __xm = std::upper_bound(__xs, __xe, *__ym, __comp); in __parallel_merge_body() 46 __ym = std::lower_bound(__ys, __ye, *__xm, __comp); in __parallel_merge_body() 52 firstprivate(__xs, __xm, __ys, __ym, __zs, __comp, __leaf_merge)) in __parallel_merge_body() 53 …_omp_backend::__parallel_merge_body(__xm - __xs, __ym - __ys, __xs, __xm, __ys, __ym, __zs, __comp, in __parallel_merge_body() 57 firstprivate(__xm, __xe, __ym, __ye, __zm, __comp, __leaf_merge)) in __parallel_merge_body() 58 …_omp_backend::__parallel_merge_body(__xe - __xm, __ye - __ym, __xm, __xe, __ym, __ye, __zm, __comp, in __parallel_merge_body() 69 _RandomAccessIterator3 __zs, _Compare __comp, _LeafMerge __leaf_merge) in __parallel_merge() argument 82 …stl::__omp_backend::__parallel_merge_body(__size_x, __size_y, __xs, __xe, __ys, __ye, __zs, __comp, in __parallel_merge() [all …]
|
| H A D | parallel_stable_sort.h | 78 __parallel_stable_sort_body(_RandomAccessIterator __xs, _RandomAccessIterator __xe, _Compare __comp, in __parallel_stable_sort_body() argument 89 __leaf_sort(__xs, __xe, __comp); in __parallel_stable_sort_body() 96 [&]() { __parallel_stable_sort_body(__xs, __mid, __comp, __leaf_sort); }, in __parallel_stable_sort_body() 97 [&]() { __parallel_stable_sort_body(__mid, __xe, __comp, __leaf_sort); }); in __parallel_stable_sort_body() 105 __mid - __xs, __xe - __mid, __xs, __mid, __mid, __xe, __output_data.begin(), __comp, in __parallel_stable_sort_body() 108 _OutputIterator __cs, _Compare __comp) in __parallel_stable_sort_body() 125 __leaf_sort(__xs, __xe, __comp); 136 __pstl::__omp_backend::__parallel_stable_sort_body(__xs, __xe, __comp, __leaf_sort); 140 …__pstl::__omp_backend::__parallel_stable_partial_sort(__tag, __xs, __xe, __comp, __leaf_sort, __ns… 149 __pstl::__omp_backend::__parallel_stable_sort_body(__xs, __xe, __comp, __leaf_sort); [all …]
|
| /llvm-project-15.0.7/pstl/include/pstl/internal/ |
| H A D | parallel_backend_utils.h | 72 if (__comp(*__ys, *__xs)) in operator() 144 _ForwardIterator2 __last2, _OutputIterator __result, _Compare __comp, in __set_union_construct() argument 153 if (__comp(*__first2, *__first1)) in __set_union_construct() 161 if (!__comp(*__first1, *__first2)) in __set_union_construct() 178 if (__comp(*__first1, *__first2)) in __set_intersection_construct() 182 if (!__comp(*__first2, *__first1)) in __set_intersection_construct() 198 _ForwardIterator2 __last2, _OutputIterator __result, _Compare __comp, in __set_difference_construct() argument 208 if (__comp(*__first1, *__first2)) in __set_difference_construct() 216 if (!__comp(*__first2, *__first1)) in __set_difference_construct() 237 if (__comp(*__first1, *__first2)) in __set_symmetric_difference_construct() [all …]
|
| H A D | algorithm_impl.h | 2185 std::sort(__first, __last, __comp); in __pattern_sort() 2481 if (!__comp(*__nth, *__x) && !__comp(*__x, *__nth)) in __pattern_nth_element() 2726 _Compare __comp) noexcept in __pattern_merge() argument 2743 __comp, in __pattern_merge() 2808 __comp, in __pattern_inplace_merge() 2840 _Compare __comp) in __pattern_includes() argument 2847 … if (__first1 >= __last1 || __comp(*__first2, *__first1) || __comp(*(__last1 - 1), *(__last2 - 1))) in __pattern_includes() 2855 return !__comp(*__first1, *__first2) && !__comp(*__first2, *__first1); in __pattern_includes() 2869 { return !__comp(*__a, *__b) && !__comp(*__b, *__a); }; in __pattern_includes() 3742 return __comp(__x, __y) || __comp(__y, __x); in __brick_lexicographical_compare() [all …]
|