diff options
author | Martijn Coenen <maco@google.com> | 2016-11-14 14:16:08 +0100 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2016-11-15 09:07:11 +0100 |
commit | be763d85c881b58754e650192204e8a2309660cb (patch) | |
tree | 09175cceb1d28d140993c687b4c89abfeac2763d /benchmarks/math_benchmark.cpp | |
parent | b3321c961452f69650e4a6bd2a7db317a80b3234 (diff) |
Fix deprecated range_x() calls.
Test: builds with new libbenchmark.
Change-Id: I91c0e5c1b5cf75b8e551f3c59d83ac9352817c4a
Diffstat (limited to 'benchmarks/math_benchmark.cpp')
-rw-r--r-- | benchmarks/math_benchmark.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/benchmarks/math_benchmark.cpp b/benchmarks/math_benchmark.cpp index 36ac301c6..a411c9ca1 100644 --- a/benchmarks/math_benchmark.cpp +++ b/benchmarks/math_benchmark.cpp @@ -25,7 +25,7 @@ static const char* names[] = { "1234.0", "nan", "HUGE_VAL", "0.0" }; #define BENCHMARK_COMMON_VALS(name) BENCHMARK(name)->Arg(0)->Arg(1)->Arg(2)->Arg(3) static void SetLabel(benchmark::State& state) { - state.SetLabel(names[state.range_x()]); + state.SetLabel(names[state.range(0)]); } // Avoid optimization. @@ -61,7 +61,7 @@ BENCHMARK(BM_math_logb); static void BM_math_isfinite_macro(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += isfinite(v); } @@ -76,7 +76,7 @@ BENCHMARK_COMMON_VALS(BM_math_isfinite_macro); #endif static void BM_math_isfinite(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += test_isfinite(v); } @@ -86,7 +86,7 @@ BENCHMARK_COMMON_VALS(BM_math_isfinite); static void BM_math_isinf_macro(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += isinf(v); } @@ -96,7 +96,7 @@ BENCHMARK_COMMON_VALS(BM_math_isinf_macro); static void BM_math_isinf(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += (isinf)(v); } @@ -106,7 +106,7 @@ BENCHMARK_COMMON_VALS(BM_math_isinf); static void BM_math_isnan_macro(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += isnan(v); } @@ -116,7 +116,7 @@ BENCHMARK_COMMON_VALS(BM_math_isnan_macro); static void BM_math_isnan(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += (isnan)(v); } @@ -126,7 +126,7 @@ BENCHMARK_COMMON_VALS(BM_math_isnan); static void BM_math_isnormal_macro(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += isnormal(v); } @@ -137,7 +137,7 @@ BENCHMARK_COMMON_VALS(BM_math_isnormal_macro); #if defined(__BIONIC__) static void BM_math_isnormal(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += (__isnormal)(v); } @@ -180,7 +180,7 @@ BENCHMARK(BM_math_sin_fesetenv); static void BM_math_fpclassify(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += fpclassify(v); } @@ -190,7 +190,7 @@ BENCHMARK_COMMON_VALS(BM_math_fpclassify); static void BM_math_signbit_macro(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += signbit(v); } @@ -200,7 +200,7 @@ BENCHMARK_COMMON_VALS(BM_math_signbit_macro); static void BM_math_signbit(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += (__signbit)(v); } @@ -210,7 +210,7 @@ BENCHMARK_COMMON_VALS(BM_math_signbit); static void BM_math_fabs_macro(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += fabs(v); } @@ -220,7 +220,7 @@ BENCHMARK_COMMON_VALS(BM_math_fabs_macro); static void BM_math_fabs(benchmark::State& state) { d = 0.0; - v = values[state.range_x()]; + v = values[state.range(0)]; while (state.KeepRunning()) { d += (fabs)(v); } |