From 5916ac696343efcc52a57343323af79bc6baef03 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Wed, 24 Apr 2024 11:03:37 -0400 Subject: [PATCH] clang-format all source files --- benchmarks/product_range.cpp | 12 ++++-------- benchmarks/range.cpp | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) 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}});