1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 04:00:34 +00:00

Give more descriptive names to atan2 benchmark. Avoid unused-but-set-variable warning

This commit is contained in:
Carles Fernandez 2022-02-10 19:44:29 +01:00
parent 322deecee8
commit c7de901d45
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -20,7 +20,7 @@
#include <cmath>
#include <random>
void bm_atan2(benchmark::State& state)
void bm_std_atan2(benchmark::State& state)
{
std::random_device rd;
std::default_random_engine e2(rd());
@ -33,10 +33,14 @@ void bm_atan2(benchmark::State& state)
{
c = std::atan2(a, b);
}
if (c > 1.0)
{
// Avoid unused-but-set-variable warning
}
}
void bm_fast_atan2(benchmark::State& state)
void bm_gr_fast_atan2f(benchmark::State& state)
{
std::random_device rd;
std::default_random_engine e2(rd());
@ -49,9 +53,13 @@ void bm_fast_atan2(benchmark::State& state)
{
c = gr::fast_atan2f(a, b);
}
if (c > 1.0)
{
// Avoid unused-but-set-variable warning
}
}
BENCHMARK(bm_atan2);
BENCHMARK(bm_fast_atan2);
BENCHMARK(bm_std_atan2);
BENCHMARK(bm_gr_fast_atan2f);
BENCHMARK_MAIN();