Refactor benchmarks using Google Benchmark

This commit is contained in:
Bram Veenboer
2025-08-12 13:16:59 +02:00
parent e9a74ef283
commit 5e7aca89bb
8 changed files with 195 additions and 81 deletions

View File

@@ -2,8 +2,20 @@
#include "benchmark_utils.hpp"
int main() {
benchmark_sinf<GPUBackend>();
benchmark_cosf<GPUBackend>();
benchmark_sincosf<GPUBackend>();
}
BENCHMARK_TEMPLATE(benchmark_sinf, GPUBackend)
->Unit(benchmark::kMillisecond)
->Arg(1e5)
->Arg(1e6)
->Arg(1e7);
BENCHMARK_TEMPLATE(benchmark_cosf, GPUBackend)
->Unit(benchmark::kMillisecond)
->Arg(1e5)
->Arg(1e6)
->Arg(1e7);
BENCHMARK_TEMPLATE(benchmark_sincosf, GPUBackend)
->Unit(benchmark::kMillisecond)
->Arg(1e5)
->Arg(1e6)
->Arg(1e7);
BENCHMARK_MAIN();