Skip to content

Commit b3a4bf9

Browse files
authored
[libc++] Refactor and add benchmarks from [alg.nonmodifying] (#128206)
1 parent 3c8c291 commit b3a4bf9

27 files changed

+2262
-473
lines changed

libcxx/include/module.modulemap

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -543,11 +543,17 @@ module std [system] {
543543
}
544544
module ranges_fill_n { header "__algorithm/ranges_fill_n.h" }
545545
module ranges_fill { header "__algorithm/ranges_fill.h" }
546-
module ranges_find_end { header "__algorithm/ranges_find_end.h" }
546+
module ranges_find_end {
547+
header "__algorithm/ranges_find_end.h"
548+
export std.ranges.subrange // return type
549+
}
547550
module ranges_find_first_of { header "__algorithm/ranges_find_first_of.h" }
548551
module ranges_find_if_not { header "__algorithm/ranges_find_if_not.h" }
549552
module ranges_find_if { header "__algorithm/ranges_find_if.h" }
550-
module ranges_find_last { header "__algorithm/ranges_find_last.h" }
553+
module ranges_find_last {
554+
header "__algorithm/ranges_find_last.h"
555+
export std.ranges.subrange // return type
556+
}
551557
module ranges_find { header "__algorithm/ranges_find.h" }
552558
module ranges_fold { header "__algorithm/ranges_fold.h" }
553559
module ranges_for_each_n {
@@ -737,8 +743,14 @@ module std [system] {
737743
}
738744
module ranges_rotate { header "__algorithm/ranges_rotate.h" }
739745
module ranges_sample { header "__algorithm/ranges_sample.h" }
740-
module ranges_search_n { header "__algorithm/ranges_search_n.h" }
741-
module ranges_search { header "__algorithm/ranges_search.h" }
746+
module ranges_search_n {
747+
header "__algorithm/ranges_search_n.h"
748+
export std.ranges.subrange // return type
749+
}
750+
module ranges_search {
751+
header "__algorithm/ranges_search.h"
752+
export std.ranges.subrange // return type
753+
}
742754
module ranges_set_difference {
743755
header "__algorithm/ranges_set_difference.h"
744756
export std.functional.ranges_operations

libcxx/test/benchmarks/GenerateInput.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <climits>
1414
#include <concepts>
1515
#include <cstddef>
16+
#include <initializer_list>
1617
#include <random>
1718
#include <string>
1819
#include <vector>

libcxx/test/benchmarks/algorithms/count.bench.cpp

Lines changed: 0 additions & 37 deletions
This file was deleted.

libcxx/test/benchmarks/algorithms/equal.bench.cpp

Lines changed: 0 additions & 99 deletions
This file was deleted.

libcxx/test/benchmarks/algorithms/find.bench.cpp

Lines changed: 0 additions & 90 deletions
This file was deleted.

libcxx/test/benchmarks/algorithms/for_each.bench.cpp

Lines changed: 0 additions & 25 deletions
This file was deleted.

libcxx/test/benchmarks/algorithms/mismatch.bench.cpp

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)