srand() at beginning of benchmark for comparability

This commit is contained in:
Maximilian Keßler 2022-04-16 20:29:07 +02:00
parent 64d3391e5e
commit 991c26844b

View file

@ -18,7 +18,16 @@ static void BM_area_computation(benchmark::State& state) {
}
// add benchmark
BENCHMARK(BM_area_computation)->ArgsProduct({benchmark::CreateRange(1<<4,1<<24,4),{1<<20}})->Threads(8)->Complexity(benchmark::oNLogN);
BENCHMARK(BM_area_computation)->ArgsProduct({benchmark::CreateRange(1<<4,1<<18,4),{1<<20}})->Complexity(benchmark::oNLogN);
// run benchmark as main()
BENCHMARK_MAIN();
int main(int argc, char **argv) {
srand(876);
::benchmark::Initialize(&argc, argv);
if (::benchmark::ReportUnrecognizedArguments(argc, argv))return 1;
::benchmark::RunSpecifiedBenchmarks();
::benchmark::Shutdown();
return 0;
}
int main(int, char **);