diff --git a/benchmarks/product_range.cpp b/benchmarks/product_range.cpp index f93bf66..7e09100 100644 --- a/benchmarks/product_range.cpp +++ b/benchmarks/product_range.cpp @@ -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}}); @@ -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(); } } } } diff --git a/benchmarks/range.cpp b/benchmarks/range.cpp index 86a8048..fba9dd7 100644 --- a/benchmarks/range.cpp +++ b/benchmarks/range.cpp @@ -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}}); @@ -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}});