Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/google-benchmark
Submodule google-benchmark updated 92 files
+1 −0 .bazelversion
+11 −0 .github/dependabot.yml
+5 −2 .github/workflows/bazel.yml
+2 −2 .github/workflows/build-and-test-min-cmake.yml
+4 −1 .github/workflows/build-and-test-perfcounters.yml
+10 −10 .github/workflows/build-and-test.yml
+6 −3 .github/workflows/clang-format-lint.yml
+4 −1 .github/workflows/clang-tidy-lint.yml
+4 −1 .github/workflows/doxygen.yml
+27 −0 .github/workflows/ossf.yml
+6 −25 .github/workflows/pre-commit.yml
+2 −2 .github/workflows/sanitizer.yml
+5 −2 .github/workflows/test_bindings.yml
+13 −12 .github/workflows/wheels.yml
+1 −0 .gitignore
+4 −4 .pre-commit-config.yaml
+4 −0 AUTHORS
+1 −0 BUILD.bazel
+17 −7 CMakeLists.txt
+4 −0 CONTRIBUTORS
+2 −2 MODULE.bazel
+1 −1 README.md
+5 −14 bindings/python/google_benchmark/__init__.py
+38 −33 bindings/python/google_benchmark/benchmark.cc
+2 −0 bindings/python/google_benchmark/example.py
+65 −47 cmake/CXXFeatureCheck.cmake
+10 −5 docs/reducing_variance.md
+5 −5 docs/user_guide.md
+102 −49 include/benchmark/benchmark.h
+2 −3 pyproject.toml
+6 −1 setup.py
+22 −1 src/CMakeLists.txt
+6 −2 src/benchmark.cc
+2 −1 src/benchmark_api_internal.cc
+2 −2 src/benchmark_api_internal.h
+28 −19 src/benchmark_register.cc
+1 −0 src/benchmark_register.h
+10 −4 src/benchmark_runner.cc
+6 −1 src/colorprint.h
+4 −0 src/commandlineflags.cc
+8 −1 src/complexity.cc
+1 −0 src/console_reporter.cc
+4 −0 src/counter.cc
+2 −7 src/csv_reporter.cc
+8 −2 src/cycleclock.h
+10 −0 src/internal_macros.h
+3 −1 src/json_reporter.cc
+1 −1 src/perf_counters.cc
+2 −0 src/re.h
+3 −2 src/string_util.cc
+1 −1 src/sysinfo.cc
+6 −0 test/CMakeLists.txt
+2 −0 test/basic_test.cc
+3 −4 test/benchmark_min_time_flag_iters_test.cc
+3 −3 test/benchmark_min_time_flag_time_test.cc
+1 −1 test/benchmark_setup_teardown_cb_types_gtest.cc
+7 −11 test/benchmark_setup_teardown_test.cc
+15 −19 test/benchmark_test.cc
+11 −13 test/complexity_test.cc
+2 −0 test/diagnostics_test.cc
+2 −0 test/display_aggregates_only_test.cc
+4 −3 test/donotoptimize_assembly_test.cc
+6 −7 test/filter_test.cc
+4 −2 test/internal_threading_test.cc
+2 −0 test/link_main_test.cc
+47 −0 test/locale_impermeability_test.cc
+2 −3 test/map_test.cc
+2 −1 test/memory_manager_test.cc
+1 −1 test/memory_results_gtest.cc
+3 −1 test/multiple_ranges_test.cc
+3 −1 test/options_test.cc
+9 −5 test/output_test_helper.cc
+35 −0 test/overload_test.cc
+5 −3 test/perf_counters_test.cc
+2 −3 test/profiler_manager_iterations_test.cc
+2 −0 test/profiler_manager_test.cc
+2 −3 test/register_benchmark_test.cc
+4 −2 test/repetitions_test.cc
+2 −0 test/report_aggregates_only_test.cc
+3 −4 test/reporter_output_test.cc
+10 −11 test/skip_with_error_test.cc
+4 −4 test/spec_arg_test.cc
+3 −1 test/spec_arg_verbosity_test.cc
+1 −0 test/state_assembly_test.cc
+1 −1 test/time_unit_gtest.cc
+3 −1 test/user_counters_tabular_test.cc
+27 −5 test/user_counters_test.cc
+2 −0 test/user_counters_thousands_test.cc
+622 −0 test/user_counters_threads_test.cc
+2 −2 tools/compare.py
+2 −2 tools/requirements.txt
+1 −1 tools/strip_asm.py
2 changes: 1 addition & 1 deletion benchmarks/src/adjacent_difference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void bm(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->Arg(2255);
}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/adjacent_find.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void bm(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->ArgPair(2525, 1142);
}

Expand Down
6 changes: 3 additions & 3 deletions benchmarks/src/find_and_count.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ void bm(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->Args({8021, 3056});
// AVX tail tests
bm->Args({63, 62})->Args({31, 30})->Args({15, 14})->Args({7, 6});
}

struct point {
int16_t x;
int16_t y;
int16_t x{};
int16_t y{};

bool operator==(const point&) const = default;
};
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/find_first_of.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void bm(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->Args({2, 3})->Args({6, 81})->Args({7, 4})->Args({9, 3})->Args({22, 5})->Args({58, 2});
bm->Args({75, 85})->Args({102, 4})->Args({200, 46})->Args({325, 1})->Args({400, 50});
bm->Args({1011, 11})->Args({1280, 46})->Args({1502, 23})->Args({2203, 54})->Args({3056, 7});
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/includes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void bm_includes(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
for (const auto& spread :
{needle_spread::dense, needle_spread::dense_random, needle_spread::sparse, needle_spread::sparse_random}) {
for (const auto& expected_match : {true, false}) {
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/iota.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void bm(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->Arg(7)->Arg(18)->Arg(43)->Arg(131)->Arg(315)->Arg(1212);
}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/is_sorted_until.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void bm_is_sorted_until(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->ArgPair(3000, 1800);
}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/minmax_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void bm(benchmark::State& state) {
}

template <size_t ElementSize>
void common_arg(auto bm) {
void common_arg(benchmark::Benchmark* bm) {
bm->Arg(8021);
// AVX tail tests
bm->Arg(63 / ElementSize);
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/mismatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void bm(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->Args({8, 3})->Args({24, 22})->Args({105, -1})->Args({4021, 3056});
}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/priority_queue_push_range.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void BM_push_range(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->RangeMultiplier(100)->Range(1, vec_size)->Arg(vec_size / 2 + 1);
}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/regex_match.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void bm_match_sequence_of_9a1b(benchmark::State& state, const char* pattern, syn
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->Arg(100)->Arg(200)->Arg(400);
}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/regex_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void bm_lorem_search(benchmark::State& state, const char* pattern, syntax_option
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->Arg(2)->Arg(3)->Arg(4);
}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/reverse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void rc(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->Arg(3449);
// AVX tail tests
bm->Arg(63)->Arg(31)->Arg(15)->Arg(7);
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/rotate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void bm_rotate(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->Args({3333, 2242})->Args({3332, 1666})->Args({3333, 1111})->Args({3333, 501});
bm->Args({3333, 3300})->Args({3333, 12})->Args({3333, 5})->Args({3333, 1});
bm->Args({333, 101})->Args({123, 32})->Args({23, 7})->Args({12, 5})->Args({3, 2});
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void bm_sample(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->Args({1 << 20, 1 << 15});
}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void member_rfind(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->DenseRange(0, std::size(patterns) - 1, 1);
}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/search_n.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void bm(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
for (const auto& n : {40, 18, 16, 14, 10, 8, 5, 4, 3, 2, 1}) {
bm->ArgPair(3000, n);
}
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/shuffle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void bm_shuffle(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->Arg(1 << 20);
}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/vector_bool_transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void transform_two_inputs_aligned(benchmark::State& state) {
}
}

void common_args(auto bm) {
void common_args(benchmark::Benchmark* bm) {
bm->RangeMultiplier(64)->Range(64, 64 << 10);
}

Expand Down
2 changes: 1 addition & 1 deletion boost-math
Submodule boost-math updated 1193 files
2 changes: 1 addition & 1 deletion llvm-project
Submodule llvm-project updated 7295 files
6 changes: 4 additions & 2 deletions stl/inc/__msvc_chrono.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ namespace chrono {
: _MyRep(static_cast<_Rep>(_Val)) {}

template <class _Rep2, class _Period2,
enable_if_t<treat_as_floating_point_v<_Rep>
|| (_Ratio_divide_sfinae<_Period2, _Period>::den == 1 && !treat_as_floating_point_v<_Rep2>),
enable_if_t<is_convertible_v<const _Rep2&, _Rep>
&& (treat_as_floating_point_v<_Rep>
|| (_Ratio_divide_sfinae<_Period2, _Period>::den == 1
&& !treat_as_floating_point_v<_Rep2>) ),
int> = 0>
constexpr duration(const duration<_Rep2, _Period2>& _Dur)
noexcept(is_arithmetic_v<_Rep> && is_arithmetic_v<_Rep2>) // strengthened
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/__msvc_filebuf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class basic_filebuf : public basic_streambuf<_Elem, _Traits> { // stream buffer
_Init(nullptr, _Newfl);
}

explicit basic_filebuf(FILE* const _File) : _Mysb() { // extension
explicit basic_filebuf(FILE* const _File) : _Mysb() { // extension, no ownership taking
_Init(_File, _Newfl);
}

Expand Down
9 changes: 6 additions & 3 deletions stl/inc/fstream
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public:
: basic_ifstream(_Path.c_str(), _Mode, _Prot) {} // _Prot is an extension
#endif // _HAS_CXX17

explicit basic_ifstream(FILE* _File) : _Mybase(_STD addressof(_Filebuffer)), _Filebuffer(_File) {} // extension
explicit basic_ifstream(FILE* _File)
: _Mybase(_STD addressof(_Filebuffer)), _Filebuffer(_File) {} // extension, no ownership taking

basic_ifstream(basic_ifstream&& _Right) : _Mybase(_STD addressof(_Filebuffer)) {
_Assign_rv(_STD move(_Right));
Expand Down Expand Up @@ -207,7 +208,8 @@ public:
: basic_ofstream(_Path.c_str(), _Mode, _Prot) {} // _Prot is an extension
#endif // _HAS_CXX17

explicit basic_ofstream(FILE* _File) : _Mybase(_STD addressof(_Filebuffer)), _Filebuffer(_File) {} // extension
explicit basic_ofstream(FILE* _File)
: _Mybase(_STD addressof(_Filebuffer)), _Filebuffer(_File) {} // extension, no ownership taking

basic_ofstream(basic_ofstream&& _Right) : _Mybase(_STD addressof(_Filebuffer)) {
_Assign_rv(_STD move(_Right));
Expand Down Expand Up @@ -358,7 +360,8 @@ public:
: basic_fstream(_Path.c_str(), _Mode, _Prot) {} // _Prot is an extension
#endif // _HAS_CXX17

explicit basic_fstream(FILE* _File) : _Mybase(_STD addressof(_Filebuffer)), _Filebuffer(_File) {} // extension
explicit basic_fstream(FILE* _File)
: _Mybase(_STD addressof(_Filebuffer)), _Filebuffer(_File) {} // extension, no ownership taking

basic_fstream(basic_fstream&& _Right) : _Mybase(_STD addressof(_Filebuffer)) {
_Assign_rv(_STD move(_Right));
Expand Down
23 changes: 21 additions & 2 deletions stl/inc/memory
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ namespace ranges {

struct _Construct_at_fn {
template <class _Ty, class... _Types>
requires requires(_Ty* _Ptr, _Types&&... _Args) {
requires (!is_unbounded_array_v<_Ty>) && requires(_Ty* _Ptr, _Types&&... _Args) {
::new (static_cast<void*>(_Ptr)) _Ty(static_cast<_Types &&>(_Args)...); // per LWG-3888
}
_STATIC_CALL_OPERATOR constexpr _Ty* operator()(_Ty* _Location, _Types&&... _Args) _CONST_CALL_OPERATOR
Expand All @@ -542,7 +542,26 @@ namespace ranges {
#ifdef __EDG__
return _STD construct_at(_Location, _STD forward<_Types>(_Args)...);
#else // ^^^ EDG / Other vvv
_MSVC_CONSTEXPR return ::new (static_cast<void*>(_Location)) _Ty(_STD forward<_Types>(_Args)...);
if constexpr (is_array_v<_Ty>) {
static_assert(sizeof...(_Types) == 0, "The array is only allowed to be value-initialized by "
"std::ranges::construct_at. (N5032 [specialized.construct]/2)");
#if defined(__clang__) // TRANSITION, LLVM-117294
::new (static_cast<void*>(_Location)) _Ty();
return __builtin_launder(_Location); // per old resolution of LWG-3436
#elif defined(_MSC_VER) // TRANSITION, DevCom-10798069
if constexpr (is_trivially_destructible_v<_Ty>) {
_MSVC_CONSTEXPR return ::new (_Secret_placement_new_tag{}, static_cast<void*>(_Location)) _Ty[1]();
} else {
// For non-trivially-destructible types, the workaround doesn't work
// because additional space is required to record the number of class objects to destroy.
return ::new (static_cast<void*>(_Location)) _Ty[1]();
}
#else // ^^^ workaround / no workaround vvv
_MSVC_CONSTEXPR return ::new (static_cast<void*>(_Location)) _Ty[1]();
#endif // ^^^ no workaround ^^^
} else {
_MSVC_CONSTEXPR return ::new (static_cast<void*>(_Location)) _Ty(_STD forward<_Types>(_Args)...);
}
#endif // ^^^ Other ^^^
}
};
Expand Down
Loading