diff options
author | Elliott Hughes <enh@google.com> | 2017-10-19 13:56:28 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2017-10-19 14:15:31 -0700 |
commit | 5c6a7bf0dc821bcaa49d5289f01360f8dd78aa86 (patch) | |
tree | 3c535768b792308647f3c7294d72799b2b70fb4d /benchmarks | |
parent | ab9dc08bdd60d3709e1bce555625d923b32812be (diff) | |
download | android_bionic-5c6a7bf0dc821bcaa49d5289f01360f8dd78aa86.tar.gz android_bionic-5c6a7bf0dc821bcaa49d5289f01360f8dd78aa86.tar.bz2 android_bionic-5c6a7bf0dc821bcaa49d5289f01360f8dd78aa86.zip |
Remove some legacy declarations from <math.h>.
These are still needed for backwards compatibility with code built by old
versions of the NDK, but we don't need to pollute the headers with them.
Also lose the hand-written code for these. The compiler-generated code
is either the same or better, and no new code is calling these functions
anyway.
Bug: N/A
Test: ran tests
Change-Id: Ib01ad9805034433e0105aec882608cc8e6526f78
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/math_benchmark.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/benchmarks/math_benchmark.cpp b/benchmarks/math_benchmark.cpp index 7b9a28321..4d9d3cb54 100644 --- a/benchmarks/math_benchmark.cpp +++ b/benchmarks/math_benchmark.cpp @@ -69,16 +69,11 @@ static void BM_math_isfinite_macro(benchmark::State& state) { } BIONIC_BENCHMARK(BM_math_isfinite_macro); -#if defined(__BIONIC__) -#define test_isfinite __isfinite -#else -#define test_isfinite __finite -#endif static void BM_math_isfinite(benchmark::State& state) { d = 0.0; v = values[state.range(0)]; while (state.KeepRunning()) { - d += test_isfinite(v); + d += isfinite(v); } SetLabel(state); } @@ -134,17 +129,15 @@ static void BM_math_isnormal_macro(benchmark::State& state) { } BIONIC_BENCHMARK(BM_math_isnormal_macro); -#if defined(__BIONIC__) static void BM_math_isnormal(benchmark::State& state) { d = 0.0; v = values[state.range(0)]; while (state.KeepRunning()) { - d += (__isnormal)(v); + d += isnormal(v); } SetLabel(state); } BIONIC_BENCHMARK(BM_math_isnormal); -#endif static void BM_math_sin_fast(benchmark::State& state) { d = 1.0; @@ -202,7 +195,7 @@ static void BM_math_signbit(benchmark::State& state) { d = 0.0; v = values[state.range(0)]; while (state.KeepRunning()) { - d += (__signbit)(v); + d += signbit(v); } SetLabel(state); } |