srand() at beginning of benchmark for comparability
This commit is contained in:
parent
64d3391e5e
commit
991c26844b
1 changed files with 11 additions and 2 deletions
|
@ -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 **);
|
||||
|
|
Loading…
Reference in a new issue