| 1 |
/* benchmark_main.cc -- benchmark suite main entry point |
| 2 |
* Copyright (C) 2022 Nathan Moinvaziri |
| 3 |
* For conditions of distribution and use, see copyright notice in zlib.h |
| 4 |
*/ |
| 5 |
|
| 6 |
#include <stdio.h> |
| 7 |
|
| 8 |
#include <benchmark/benchmark.h> |
| 9 |
|
| 10 |
#ifndef BUILD_ALT |
| 11 |
extern "C" { |
| 12 |
# include "zbuild.h" |
| 13 |
# include "cpu_features.h" |
| 14 |
} |
| 15 |
#endif |
| 16 |
|
| 17 |
int main(int argc, char** argv) { |
| 18 |
#ifndef BUILD_ALT |
| 19 |
cpu_check_features(); |
| 20 |
#endif |
| 21 |
|
| 22 |
::benchmark::Initialize(&argc, argv); |
| 23 |
::benchmark::RunSpecifiedBenchmarks(); |
| 24 |
|
| 25 |
return EXIT_SUCCESS; |
| 26 |
} |