| /freebsd/contrib/llvm-project/libcxx/include/__cxx03/__algorithm/ |
| H A D | search.h | 39 …_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred& __pred, _Proj1& __proj1, … in __search_forward_impl() argument 41 return std::make_pair(__first1, __first1); // Everything matches an empty sequence in __search_forward_impl() 45 if (__first1 == __last1) { // return __last1 if no element matches *__first2 in __search_forward_impl() 46 _IterOps<_AlgPolicy>::__advance_to(__first1, __last1); in __search_forward_impl() 47 return std::make_pair(__first1, __first1); in __search_forward_impl() 49 … if (std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2))) in __search_forward_impl() 51 ++__first1; in __search_forward_impl() 54 _Iter1 __m1 = __first1; in __search_forward_impl() 58 return std::make_pair(__first1, ++__m1); in __search_forward_impl() 65 ++__first1; in __search_forward_impl() [all …]
|
| H A D | mismatch.h | 41 __mismatch_loop(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Pred& __pred, _Proj1& __proj1, _… in __mismatch_loop() argument 42 while (__first1 != __last1) { in __mismatch_loop() 43 … if (!std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2))) in __mismatch_loop() 45 ++__first1; in __mismatch_loop() 48 return std::make_pair(std::move(__first1), std::move(__first2)); in __mismatch_loop() 53 __mismatch(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Pred& __pred, _Proj1& __proj1, _Proj2… in __mismatch() argument 54 return std::__mismatch_loop(__first1, __last1, __first2, __pred, __proj1, __proj2); in __mismatch() 61 __mismatch_vectorized(_Iter __first1, _Iter __last1, _Iter __first2) { in __mismatch_vectorized() argument 68 auto __orig_first1 = __first1; in __mismatch_vectorized() 69 auto __last2 = __first2 + (__last1 - __first1); in __mismatch_vectorized() [all …]
|
| H A D | set_intersection.h | 51 _InForwardIter1& __first1, in __set_intersection_add_output_if_equal() argument 56 *__result = *__first1; in __set_intersection_add_output_if_equal() 58 ++__first1; in __set_intersection_add_output_if_equal() 87 _InForwardIter1 __first1, in __set_intersection() argument 100 std::__lower_bound_onesided<_AlgPolicy>(__first1, __last1, *__first2, __comp, __proj); in __set_intersection() 101 std::swap(__first1_next, __first1); in __set_intersection() 105 __first1 == __first1_next, __first1, __first2, __result, __prev_may_be_equal); in __set_intersection() 106 if (__first1 == __last1) in __set_intersection() 110 std::__lower_bound_onesided<_AlgPolicy>(__first2, __last2, *__first1, __comp, __proj); in __set_intersection() 113 __first2 == __first2_next, __first1, __first2, __result, __prev_may_be_equal); in __set_intersection() [all …]
|
| H A D | is_permutation.h | 58 _Iter1 __first1, 67 for (auto __i = __first1; __i != __last1; ++__i) { 69 auto __match = __first1; 102 …_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2, _BinaryPredicate&& __p… 104 for (; __first1 != __last1; ++__first1, (void)++__first2) { 105 if (!__pred(*__first1, *__first2)) 109 if (__first1 == __last1) 114 _D1 __l1 = _IterOps<_AlgPolicy>::distance(__first1, __last1); 120 std::move(__first1), 139 _Iter1 __first1, [all …]
|
| H A D | stable_sort.h | 39 _BidirectionalIterator __first1, in __insertion_sort_move() argument 46 if (__first1 != __last1) { in __insertion_sort_move() 50 ::new ((void*)__last2) value_type(_Ops::__iter_move(__first1)); in __insertion_sort_move() 52 for (++__last2; ++__first1 != __last1; ++__last2) { in __insertion_sort_move() 55 if (__comp(*__first1, *--__i2)) { in __insertion_sort_move() 58 for (--__j2; __i2 != __first2 && __comp(*__first1, *--__i2); --__j2) in __insertion_sort_move() 60 *__j2 = _Ops::__iter_move(__first1); in __insertion_sort_move() 62 ::new ((void*)__j2) value_type(_Ops::__iter_move(__first1)); in __insertion_sort_move() 72 _InputIterator1 __first1, in __merge_move_construct() argument 84 if (__first1 == __last1) { in __merge_move_construct() [all …]
|
| H A D | find_end.h | 40 _Iter1 __first1, in __find_end_impl() argument 50 …_Iter1 __match_first = _IterOps<_AlgPolicy>::next(__first1, __last1); // __last1 is the "default" … in __find_end_impl() 56 …if (__first1 == __last1) // if source exhausted return last correct answer (or __last1 if never fo… in __find_end_impl() 58 … if (std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2))) in __find_end_impl() 60 ++__first1; in __find_end_impl() 63 _Iter1 __m1 = __first1; in __find_end_impl() 67 __match_first = __first1; in __find_end_impl() 69 ++__first1; in __find_end_impl() 76 ++__first1; in __find_end_impl() 92 _Iter1 __first1, in __find_end() argument [all …]
|
| H A D | swap_ranges.h | 29 __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2, _Sentinel… in __swap_ranges() argument 30 while (__first1 != __last1 && __first2 != __last2) { in __swap_ranges() 31 _IterOps<_AlgPolicy>::iter_swap(__first1, __first2); in __swap_ranges() 32 ++__first1; in __swap_ranges() 36 return pair<_ForwardIterator1, _ForwardIterator2>(std::move(__first1), std::move(__first2)); in __swap_ranges() 42 __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2) { in __swap_ranges() argument 43 while (__first1 != __last1) { in __swap_ranges() 44 _IterOps<_AlgPolicy>::iter_swap(__first1, __first2); in __swap_ranges() 45 ++__first1; in __swap_ranges() 49 return pair<_ForwardIterator1, _ForwardIterator2>(std::move(__first1), std::move(__first2)); in __swap_ranges() [all …]
|
| H A D | set_difference.h | 34 …_InIter1&& __first1, _Sent1&& __last1, _InIter2&& __first2, _Sent2&& __last2, _OutIter&& __result,… in __set_difference() argument 35 while (__first1 != __last1 && __first2 != __last2) { in __set_difference() 36 if (__comp(*__first1, *__first2)) { in __set_difference() 37 *__result = *__first1; in __set_difference() 38 ++__first1; in __set_difference() 40 } else if (__comp(*__first2, *__first1)) { in __set_difference() 43 ++__first1; in __set_difference() 47 return std::__copy<_AlgPolicy>(std::move(__first1), std::move(__last1), std::move(__result)); in __set_difference() 52 _InputIterator1 __first1, in set_difference() argument 59 __first1, __last1, __first2, __last2, __result, __comp) in set_difference() [all …]
|
| H A D | equal.h | 38 …_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate& __p… in __equal_iter_impl() argument 39 for (; __first1 != __last1; ++__first1, (void)++__first2) in __equal_iter_impl() 40 if (!__pred(*__first1, *__first2)) in __equal_iter_impl() 52 __equal_iter_impl(_Tp* __first1, _Tp* __last1, _Up* __first2, _BinaryPredicate&) { in __equal_iter_impl() argument 53 return std::__constexpr_memcmp_equal(__first1, __first2, __element_count(__last1 - __first1)); in __equal_iter_impl() 58 equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate… in equal() argument 60 … std::__unwrap_iter(__first1), std::__unwrap_iter(__last1), std::__unwrap_iter(__first2), __pred); in equal() 65 equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { in equal() argument 66 return std::equal(__first1, __last1, __first2, __equal_to()); in equal()
|
| H A D | merge.h | 26 _InputIterator1 __first1, in __merge() argument 32 for (; __first1 != __last1; ++__result) { in __merge() 34 return std::copy(__first1, __last1, __result); in __merge() 35 if (__comp(*__first2, *__first1)) { in __merge() 39 *__result = *__first1; in __merge() 40 ++__first1; in __merge() 48 merge(_InputIterator1 __first1, in merge() argument 54 …return std::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __… in merge() 59 merge(_InputIterator1 __first1, in merge() argument 64 return std::merge(__first1, __last1, __first2, __last2, __result, __less<>()); in merge()
|
| H A D | set_symmetric_difference.h | 44 …_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&… in __set_symmetric_difference() argument 45 while (__first1 != __last1) { in __set_symmetric_difference() 47 …auto __ret1 = std::__copy<_AlgPolicy>(std::move(__first1), std::move(__last1), std::move(__result)… in __set_symmetric_difference() 51 if (__comp(*__first1, *__first2)) { in __set_symmetric_difference() 52 *__result = *__first1; in __set_symmetric_difference() 54 ++__first1; in __set_symmetric_difference() 56 if (__comp(*__first2, *__first1)) { in __set_symmetric_difference() 60 ++__first1; in __set_symmetric_difference() 67 std::move(__first1), std::move(__ret2.first), std::move((__ret2.second))); in __set_symmetric_difference() 72 _InputIterator1 __first1, in set_symmetric_difference() argument [all …]
|
| /freebsd/contrib/llvm-project/libcxx/include/__algorithm/ |
| H A D | search.h | 40 …_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred& __pred, _Proj1& __proj1, … in __search_forward_impl() argument 42 return std::make_pair(__first1, __first1); // Everything matches an empty sequence in __search_forward_impl() 46 if (__first1 == __last1) { // return __last1 if no element matches *__first2 in __search_forward_impl() 47 _IterOps<_AlgPolicy>::__advance_to(__first1, __last1); in __search_forward_impl() 48 return std::make_pair(__first1, __first1); in __search_forward_impl() 50 … if (std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2))) in __search_forward_impl() 52 ++__first1; in __search_forward_impl() 55 _Iter1 __m1 = __first1; in __search_forward_impl() 59 return std::make_pair(__first1, ++__m1); in __search_forward_impl() 66 ++__first1; in __search_forward_impl() [all …]
|
| H A D | equal.h | 42 __equal_unaligned(__bit_iterator<_Cp, _IsConst1> __first1, in __equal_unaligned() argument 50 difference_type __n = __last1 - __first1; in __equal_unaligned() 53 if (__first1.__ctz_ != 0) { in __equal_unaligned() 54 unsigned __clz_f = __bits_per_word - __first1.__ctz_; in __equal_unaligned() 57 __storage_type __m = std::__middle_mask<__storage_type>(__clz_f - __dn, __first1.__ctz_); in __equal_unaligned() 58 __storage_type __b = *__first1.__seg_ & __m; in __equal_unaligned() 62 if (__first2.__ctz_ > __first1.__ctz_) { in __equal_unaligned() 64 static_cast<__storage_type>(__b << (__first2.__ctz_ - __first1.__ctz_))) in __equal_unaligned() 68 static_cast<__storage_type>(__b >> (__first1.__ctz_ - __first2.__ctz_))) in __equal_unaligned() 77 static_cast<__storage_type>(__b >> (__first1.__ctz_ + __ddn))) in __equal_unaligned() [all …]
|
| H A D | mismatch.h | 42 __mismatch_loop(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Pred& __pred, _Proj1& __proj1, _… in __mismatch_loop() argument 43 while (__first1 != __last1) { in __mismatch_loop() 44 … if (!std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2))) in __mismatch_loop() 46 ++__first1; in __mismatch_loop() 49 return std::make_pair(std::move(__first1), std::move(__first2)); in __mismatch_loop() 54 __mismatch(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Pred& __pred, _Proj1& __proj1, _Proj2… in __mismatch() argument 55 return std::__mismatch_loop(__first1, __last1, __first2, __pred, __proj1, __proj2); in __mismatch() 62 __mismatch_vectorized(_Iter __first1, _Iter __last1, _Iter __first2) { in __mismatch_vectorized() argument 69 auto __orig_first1 = __first1; in __mismatch_vectorized() 70 auto __last2 = __first2 + (__last1 - __first1); in __mismatch_vectorized() [all …]
|
| H A D | set_intersection.h | 54 _InForwardIter1& __first1, in __set_intersection_add_output_if_equal() argument 59 *__result = *__first1; in __set_intersection_add_output_if_equal() 61 ++__first1; in __set_intersection_add_output_if_equal() 91 _InForwardIter1 __first1, in __set_intersection() argument 104 std::__lower_bound_onesided<_AlgPolicy>(__first1, __last1, *__first2, __comp, __proj); in __set_intersection() 105 std::swap(__first1_next, __first1); in __set_intersection() 109 __first1 == __first1_next, __first1, __first2, __result, __prev_may_be_equal); in __set_intersection() 110 if (__first1 == __last1) in __set_intersection() 114 std::__lower_bound_onesided<_AlgPolicy>(__first2, __last2, *__first1, __comp, __proj); in __set_intersection() 117 __first2 == __first2_next, __first1, __first2, __result, __prev_may_be_equal); in __set_intersection() [all …]
|
| H A D | is_permutation.h | 74 _Iter1 __first1, 83 for (auto __i = __first1; __i != __last1; ++__i) { 85 auto __match = __first1; 118 …_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2, _BinaryPredicate&& __p… 120 for (; __first1 != __last1; ++__first1, (void)++__first2) { 121 if (!__pred(*__first1, *__first2)) 125 if (__first1 == __last1) 130 _D1 __l1 = _IterOps<_AlgPolicy>::distance(__first1, __last1); 136 std::move(__first1), 155 _Iter1 __first1, [all …]
|
| H A D | lexicographical_compare_three_way.h | 38 …_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __las… 39 -> decltype(__comp(*__first1, *__first2)) { 49 _Len1 __len1 = __last1 - __first1; 54 auto __c = __comp(*__first1, *__first2); 58 ++__first1; 68 …_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __las… 69 -> decltype(__comp(*__first1, *__first2)) { 71 bool __exhausted1 = __first1 == __last1; 82 auto __c = __comp(*__first1, *__first2); 87 ++__first1; [all …]
|
| H A D | lexicographical_compare.h | 44 …_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Comp& __comp, _Proj1& __proj1, … in __lexicographical_compare() argument 46 if (__first1 == __last1 || in __lexicographical_compare() 47 std::__invoke(__comp, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2))) in __lexicographical_compare() 49 if (std::__invoke(__comp, std::__invoke(__proj2, *__first2), std::__invoke(__proj1, *__first1))) in __lexicographical_compare() 51 ++__first1; in __lexicographical_compare() 73 __lexicographical_compare(_Tp* __first1, _Tp* __last1, _Tp* __first2, _Tp* __last2, _Comp&, _Proj1&… in __lexicographical_compare() argument 76 …std::__constexpr_memcmp(__first1, __first2, __element_count(std::min(__last1 - __first1, __last2 -… in __lexicographical_compare() 78 return __last1 - __first1 < __last2 - __first2; in __lexicographical_compare() 83 …auto __res = std::__constexpr_wmemcmp(__first1, __first2, std::min(__last1 - __first1, __last2 - _… in __lexicographical_compare() 85 return __last1 - __first1 < __last2 - __first2; in __lexicographical_compare() [all …]
|
| H A D | ranges_search.h | 39 _Iter1 __first1, in __ranges_search_impl() 49 return {__first1, __first1}; in __ranges_search_impl() 52 auto __size1 = ranges::distance(__first1, __last1); in __ranges_search_impl() 54 ranges::advance(__first1, __last1); in __ranges_search_impl() 55 return {__first1, __first1}; in __ranges_search_impl() 60 __first1, __last1, __first2, __last2, __pred, __proj1, __proj2, __size1, __size2); in __ranges_search_impl() 67 …std::__search_forward_impl<_RangeAlgPolicy>(__first1, __last1, __first2, __last2, __pred, __proj1,… in __ranges_search_impl() 80 _Iter1 __first1, in operator() 87 return __ranges_search_impl(__first1, __last1, __first2, __last2, __pred, __proj1, __proj2); 98 auto __first1 = ranges::begin(__range1); local [all …]
|
| H A D | find_end.h | 36 _Iter1 __first1, in __find_end_impl() argument 46 …_Iter1 __match_first = _IterOps<_AlgPolicy>::next(__first1, __last1); // __last1 is the "default" … in __find_end_impl() 52 …if (__first1 == __last1) // if source exhausted return last correct answer (or __last1 if never fo… in __find_end_impl() 54 … if (std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2))) in __find_end_impl() 56 ++__first1; in __find_end_impl() 59 _Iter1 __m1 = __first1; in __find_end_impl() 63 __match_first = __first1; in __find_end_impl() 65 ++__first1; in __find_end_impl() 72 ++__first1; in __find_end_impl() 81 _ForwardIterator1 __first1, in __find_end_classic() argument [all …]
|
| H A D | stable_sort.h | 45 _BidirectionalIterator __first1, in __insertion_sort_move() argument 52 if (__first1 != __last1) { in __insertion_sort_move() 56 std::__construct_at(__last2, _Ops::__iter_move(__first1)); in __insertion_sort_move() 58 for (++__last2; ++__first1 != __last1; ++__last2) { in __insertion_sort_move() 61 if (__comp(*__first1, *--__i2)) { in __insertion_sort_move() 64 for (--__j2; __i2 != __first2 && __comp(*__first1, *--__i2); --__j2) in __insertion_sort_move() 66 *__j2 = _Ops::__iter_move(__first1); in __insertion_sort_move() 68 std::__construct_at(__j2, _Ops::__iter_move(__first1)); in __insertion_sort_move() 78 _InputIterator1 __first1, in __merge_move_construct() argument 90 if (__first1 == __last1) { in __merge_move_construct() [all …]
|
| H A D | set_difference.h | 34 …_InIter1&& __first1, _Sent1&& __last1, _InIter2&& __first2, _Sent2&& __last2, _OutIter&& __result,… in __set_difference() argument 35 while (__first1 != __last1 && __first2 != __last2) { in __set_difference() 36 if (__comp(*__first1, *__first2)) { in __set_difference() 37 *__result = *__first1; in __set_difference() 38 ++__first1; in __set_difference() 40 } else if (__comp(*__first2, *__first1)) { in __set_difference() 43 ++__first1; in __set_difference() 47 return std::__copy(std::move(__first1), std::move(__last1), std::move(__result)); in __set_difference() 52 _InputIterator1 __first1, in set_difference() argument 58 …return std::__set_difference<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __r… in set_difference() [all …]
|
| H A D | set_symmetric_difference.h | 44 …_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&… in __set_symmetric_difference() argument 45 while (__first1 != __last1) { in __set_symmetric_difference() 47 auto __ret1 = std::__copy(std::move(__first1), std::move(__last1), std::move(__result)); in __set_symmetric_difference() 51 if (__comp(*__first1, *__first2)) { in __set_symmetric_difference() 52 *__result = *__first1; in __set_symmetric_difference() 54 ++__first1; in __set_symmetric_difference() 56 if (__comp(*__first2, *__first1)) { in __set_symmetric_difference() 60 ++__first1; in __set_symmetric_difference() 67 std::move(__first1), std::move(__ret2.first), std::move((__ret2.second))); in __set_symmetric_difference() 72 _InputIterator1 __first1, in set_symmetric_difference() argument [all …]
|
| /freebsd/contrib/llvm-project/libcxx/include/__pstl/internal/ |
| H A D | parallel_backend_utils.h | |
| /freebsd/contrib/llvm-project/libcxx/include/__numeric/ |
| H A D | inner_product.h | 27 inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init) { 28 for (; __first1 != __last1; ++__first1, (void)++__first2) in inner_product() argument 30 __init = std::move(__init) + *__first1 * *__first2; in inner_product() 32 __init = __init + *__first1 * *__first2; in inner_product() 39 _InputIterator1 __first1, 45 for (; __first1 != __last1; ++__first1, (void)++__first2) in inner_product() 47 __init = __binary_op1(std::move(__init), __binary_op2(*__first1, *__first2)); in inner_product() 49 __init = __binary_op1(__init, __binary_op2(*__first1, *__first in inner_product() 42 inner_product(_InputIterator1 __first1,_InputIterator1 __last1,_InputIterator2 __first2,_Tp __init,_BinaryOperation1 __binary_op1,_BinaryOperation2 __binary_op2) inner_product() argument [all...] |