Home
last modified time | relevance | path

Searched refs:is_sorted (Results 1 – 25 of 130) sorted by relevance

123456

/llvm-project-15.0.7/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/
H A Dis_sorted.pass.cpp38 assert(std::is_sorted(Iter(a), Iter(a))); in test()
39 assert(std::is_sorted(Iter(a), Iter(a+sa))); in test()
45 assert(std::is_sorted(Iter(a), Iter(a+sa))); in test()
50 assert(std::is_sorted(Iter(a), Iter(a+sa))); in test()
55 assert(!std::is_sorted(Iter(a), Iter(a+sa))); in test()
60 assert(std::is_sorted(Iter(a), Iter(a+sa))); in test()
66 assert(std::is_sorted(Iter(a), Iter(a+sa))); in test()
71 assert(std::is_sorted(Iter(a), Iter(a+sa))); in test()
81 assert(std::is_sorted(Iter(a), Iter(a+sa))); in test()
101 assert(std::is_sorted(Iter(a), Iter(a+sa))); in test()
[all …]
H A Dis_sorted_comp.pass.cpp39 assert(std::is_sorted(Iter(a), Iter(a))); in test()
40 assert(std::is_sorted(Iter(a), Iter(a+sa), std::greater<int>())); in test()
46 assert(std::is_sorted(Iter(a), Iter(a+sa), std::greater<int>())); in test()
51 assert(!std::is_sorted(Iter(a), Iter(a+sa), std::greater<int>())); in test()
56 assert(std::is_sorted(Iter(a), Iter(a+sa), std::greater<int>())); in test()
61 assert(std::is_sorted(Iter(a), Iter(a+sa), std::greater<int>())); in test()
67 assert(std::is_sorted(Iter(a), Iter(a+sa), std::greater<int>())); in test()
72 assert(!std::is_sorted(Iter(a), Iter(a+sa), std::greater<int>())); in test()
87 assert(std::is_sorted(Iter(a), Iter(a+sa), std::greater<int>())); in test()
97 assert(std::is_sorted(Iter(a), Iter(a+sa), std::greater<int>())); in test()
[all …]
H A Dranges.is_sorted.pass.cpp72 auto ret = std::ranges::is_sorted(Iter(a), Sent(Iter(a + 5))); in test_iterators()
78 auto ret = std::ranges::is_sorted(range); in test_iterators()
86 auto ret = std::ranges::is_sorted(Iter(a), Sent(Iter(a + 5))); in test_iterators()
92 auto ret = std::ranges::is_sorted(range); in test_iterators()
114 auto ret = std::ranges::is_sorted(Iter(a), Sent(Iter(a))); in test_iterators()
120 auto ret = std::ranges::is_sorted(range); in test_iterators()
128 auto ret = std::ranges::is_sorted(Iter(a), Sent(Iter(a + 1))); in test_iterators()
134 auto ret = std::ranges::is_sorted(range); in test_iterators()
156 auto ret = std::ranges::is_sorted(a, a + 3, {}, &S::i); in test()
161 auto ret = std::ranges::is_sorted(a, {}, &S::i); in test()
[all …]
/llvm-project-15.0.7/pstl/test/std/algorithms/alg.sorting/
H A Dis_sorted.pass.cpp31 bool res = is_sorted(exec, first, last); in operator ()()
38 res = is_sorted(exec, first, last, std::less<T>()); in operator ()()
53 …invoke_on_all_policies(test_is_sorted(), in.begin(), in.end(), std::is_sorted(in.begin(), in.end()… in test_is_sorted_by_type()
54 …invoke_on_all_policies(test_is_sorted(), in.cbegin(), in.cend(), std::is_sorted(in.begin(), in.end… in test_is_sorted_by_type()
57 …invoke_on_all_policies(test_is_sorted(), in.begin(), in.end(), std::is_sorted(in.begin(), in.end()… in test_is_sorted_by_type()
58 …invoke_on_all_policies(test_is_sorted(), in.cbegin(), in.cend(), std::is_sorted(in.begin(), in.end… in test_is_sorted_by_type()
61 …invoke_on_all_policies(test_is_sorted(), in.begin(), in.end(), std::is_sorted(in.begin(), in.end()… in test_is_sorted_by_type()
62 …invoke_on_all_policies(test_is_sorted(), in.cbegin(), in.cend(), std::is_sorted(in.begin(), in.end… in test_is_sorted_by_type()
66 …invoke_on_all_policies(test_is_sorted(), in0.begin(), in0.end(), std::is_sorted(in0.begin(), in0.e… in test_is_sorted_by_type()
71 …invoke_on_all_policies(test_is_sorted(), in1.begin(), in1.end(), std::is_sorted(in1.begin(), in1.e… in test_is_sorted_by_type()
[all …]
/llvm-project-15.0.7/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/
H A Dstable_sort.pass.cpp41 assert(std::is_sorted(save, save+len)); in test_sort_helper()
97 assert(std::is_sorted(array, array+N)); in test_larger_sorts()
101 assert(std::is_sorted(array, array+N)); in test_larger_sorts()
104 assert(std::is_sorted(array, array+N)); in test_larger_sorts()
108 assert(std::is_sorted(array, array+N)); in test_larger_sorts()
112 assert(std::is_sorted(array, array+N)); in test_larger_sorts()
117 assert(std::is_sorted(array, array+N)); in test_larger_sorts()
H A Dstable_sort_comp.pass.cpp66 assert(std::is_sorted(v.begin(), v.end())); in test()
79 assert(std::is_sorted(v.begin(), v.end(), indirect_less())); in main()
/llvm-project-15.0.7/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/
H A Dsort.pass.cpp40 assert(std::is_sorted(save.begin(), save.end())); in test_sort_helper()
131 assert(std::is_sorted(iter, iter+N)); in test_larger_sorts()
136 assert(std::is_sorted(iter, iter+N)); in test_larger_sorts()
140 assert(std::is_sorted(iter, iter+N)); in test_larger_sorts()
145 assert(std::is_sorted(iter, iter+N)); in test_larger_sorts()
150 assert(std::is_sorted(iter, iter+N)); in test_larger_sorts()
156 assert(std::is_sorted(iter, iter+N)); in test_larger_sorts()
244 assert(std::is_sorted(V.begin(), V.end())); in test_adversarial_quicksort()
H A Dsort_comp.pass.cpp41 assert(std::is_sorted(v.begin(), v.end())); in main()
50 assert(std::is_sorted(v.begin(), v.end(), indirect_less())); in main()
H A Dsort_constexpr.pass.cpp38 assert(std::is_sorted(work, work+N)); in test()
56 assert(std::is_sorted(work, work+N)); in test_pointers()
H A Dsort_constexpr_comp.pass.cpp39 assert(std::is_sorted(work, work+N, std::greater<T>())); in test()
57 assert(std::is_sorted(work, work+N, std::greater<T*>())); in test_pointers()
/llvm-project-15.0.7/libcxx/include/__algorithm/
H A Dis_sorted.h28 is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) in is_sorted() function
38 is_sorted(_ForwardIterator __first, _ForwardIterator __last) in is_sorted() function
40 …return _VSTD::is_sorted(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_… in is_sorted()
/llvm-project-15.0.7/llvm/unittests/ADT/
H A DSimpleIListTest.cpp440 EXPECT_TRUE(llvm::is_sorted(L1)); in TEST()
441 EXPECT_TRUE(llvm::is_sorted(L2)); in TEST()
449 EXPECT_TRUE(llvm::is_sorted(LHS)); in TEST()
486 EXPECT_TRUE(llvm::is_sorted(L1, makeFalse)); in TEST()
501 EXPECT_TRUE(llvm::is_sorted(L2, makeFalse)); in TEST()
525 EXPECT_TRUE(llvm::is_sorted(L1)); in TEST()
533 EXPECT_TRUE(llvm::is_sorted(LHS)); in TEST()
558 EXPECT_FALSE(llvm::is_sorted(L)); in TEST()
562 EXPECT_TRUE(llvm::is_sorted(L)); in TEST()
585 EXPECT_FALSE(llvm::is_sorted(L, compare)); in TEST()
[all …]
/llvm-project-15.0.7/libcxx/test/libcxx/fuzzing/
H A Dstable_partition.pass.cpp31 if (!std::is_sorted(working.begin(), iter, ByteWithPayload::payload_less())) in LLVMFuzzerTestOneInput()
33 if (!std::is_sorted(iter, working.end(), ByteWithPayload::payload_less())) in LLVMFuzzerTestOneInput()
H A Dstable_sort.pass.cpp26 if (!std::is_sorted(working.begin(), working.end(), ByteWithPayload::key_less())) in LLVMFuzzerTestOneInput()
32 if (!std::is_sorted(range.first, range.second, ByteWithPayload::total_less())) in LLVMFuzzerTestOneInput()
H A Dsort.pass.cpp22 if (!std::is_sorted(working.begin(), working.end())) in LLVMFuzzerTestOneInput()
H A Dpartial_sort_copy.pass.cpp27 if (!std::is_sorted(results.begin(), results.end())) in LLVMFuzzerTestOneInput()
/llvm-project-15.0.7/pstl/test/std/algorithms/alg.merge/
H A Dmerge.pass.cpp34 EXPECT_TRUE(is_sorted(out_first, res, comp), "wrong result from merge with predicate"); in operator ()()
41 EXPECT_TRUE(is_sorted(out_first, res), "wrong result from merge"); in operator ()()
58 …EXPECT_TRUE(is_sorted(out_first, res, std::greater<T>()), "wrong result from merge with predicate"… in operator ()()
/llvm-project-15.0.7/clang/test/Analysis/
H A Dptr-sort.cpp14 std::is_sorted(V1.begin(), V1.end()); // no-warning in PointerSorting()
22 …std::is_sorted(V2.begin(), V2.end()); // expected-warning {{Sorting pointer-like elements can resu… in PointerSorting()
/llvm-project-15.0.7/llvm/lib/Target/X86/
H A DX86InstrFMA3Info.cpp131 assert(llvm::is_sorted(Groups) && llvm::is_sorted(RoundGroups) && in verifyTables()
132 llvm::is_sorted(BroadcastGroups) && "FMA3 tables not sorted!"); in verifyTables()
H A DX86EvexToVex.cpp244 assert(llvm::is_sorted(X86EvexToVex128CompressTable) && in CompressEvexToVexImpl()
246 assert(llvm::is_sorted(X86EvexToVex256CompressTable) && in CompressEvexToVexImpl()
/llvm-project-15.0.7/llvm/lib/MC/
H A DMCSubtargetInfo.cpp158 assert(llvm::is_sorted(ProcDesc) && "CPU table is not sorted"); in getFeatures()
159 assert(llvm::is_sorted(ProcFeatures) && "CPU features table is not sorted"); in getFeatures()
310 assert(llvm::is_sorted(ProcDesc) && in getSchedModelForCPU()
/llvm-project-15.0.7/llvm/unittests/IR/
H A DModuleTest.cpp48 EXPECT_FALSE(std::is_sorted(M.global_begin(), M.global_end(), compare)); in TEST()
50 EXPECT_TRUE(std::is_sorted(M.global_begin(), M.global_end(), compare)); in TEST()
/llvm-project-15.0.7/libcxx/test/std/algorithms/alg.sorting/alg.merge/
H A Dinplace_merge_comp.pass.cpp81 assert(std::is_sorted(ia, ia+N, std::greater<value_type>())); in test_one()
165 assert(std::is_sorted(ia, ia+N, indirect_less())); in main()
H A Dranges_inplace_merge.pass.cpp91 std::is_sorted(input.begin(), input.begin() + midIdx); in testInplaceMergeImpl()
92 std::is_sorted(input.begin() + midIdx, input.end()); in testInplaceMergeImpl()
93 std::is_sorted(expected.begin(), expected.end()); in testInplaceMergeImpl()
/llvm-project-15.0.7/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/
H A Dsample.stable.pass.cpp47 unstable |= !std::is_sorted(oa, oa + kSampleSize); in test_stability()

123456