Skip to content

Commit

Permalink
clang-format all source files
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Apr 24, 2024
1 parent 70c6196 commit 5916ac6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 4 additions & 8 deletions benchmarks/product_range.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ static void multi_loop_product(benchmark::State &state) {
long a = 1 << state.range(0);
long b = 1 << state.range(1);

for (auto _ : state){
for (auto [i, j]: product_range(a, b)){
benchmark::ClobberMemory();
}
for (auto _ : state) {
for (auto [i, j] : product_range(a, b)) { benchmark::ClobberMemory(); }
}
}
BENCHMARK(multi_loop_product)->ArgsProduct({{8, 10}, {8, 10}});
Expand All @@ -37,11 +35,9 @@ static void multi_loop_bare(benchmark::State &state) {
long a = 1 << state.range(0);
long b = 1 << state.range(1);

for (auto _ : state){
for (auto _ : state) {
for (auto i = 0; i < a; ++i) {
for (auto j = 0; j < b; ++j) {
benchmark::ClobberMemory();
}
for (auto j = 0; j < b; ++j) { benchmark::ClobberMemory(); }
}
}
}
Expand Down
12 changes: 4 additions & 8 deletions benchmarks/range.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ static void loop_range(benchmark::State &state) {
long b = 1 << state.range(0);
long s = state.range(1);

for (auto _ : state){
for (auto i: range(a, b, s)){
benchmark::ClobberMemory();
}
for (auto _ : state) {
for (auto i : range(a, b, s)) { benchmark::ClobberMemory(); }
}
}
BENCHMARK(loop_range)->ArgsProduct({{10, 20}, {1, 5}});
Expand All @@ -39,10 +37,8 @@ static void loop_bare(benchmark::State &state) {
long b = 1 << state.range(0);
long s = state.range(1);

for (auto _ : state){
for (auto i = a; i < b; i += s) {
benchmark::ClobberMemory();
}
for (auto _ : state) {
for (auto i = a; i < b; i += s) { benchmark::ClobberMemory(); }
}
}
BENCHMARK(loop_bare)->ArgsProduct({{10, 20}, {1, 5}});

0 comments on commit 5916ac6

Please sign in to comment.