diff options
author | Chunlin <fangchunlin@huawei.com> | 2020-06-01 14:17:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 09:17:57 +0300 |
commit | bdd4e2e29c4b011cf455a72f85c92010656d2722 (patch) | |
tree | 79dbdfff31b8e3720d2aeeaba46174e74303d182 /benchmarks | |
parent | 1b212bda1c2833467177eb0d62c6de6c224c6a80 (diff) | |
download | numpy-bdd4e2e29c4b011cf455a72f85c92010656d2722.tar.gz |
ENH: ARM Neon implementation with intrinsic for np.argmax. (#16375)
* Neon implementation with intrinsic for bool argmax
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/benchmarks/bench_reduce.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/benchmarks/benchmarks/bench_reduce.py b/benchmarks/benchmarks/bench_reduce.py index 76c573a51..7b05f4fcc 100644 --- a/benchmarks/benchmarks/bench_reduce.py +++ b/benchmarks/benchmarks/bench_reduce.py @@ -58,6 +58,15 @@ class MinMax(Benchmark): def time_max(self, dtype): np.max(self.d) +class ArgMax(Benchmark): + params = [np.float32, bool] + param_names = ['dtype'] + + def setup(self, dtype): + self.d = np.zeros(200000, dtype=dtype) + + def time_argmax(self, dtype): + np.argmax(self.d) class SmallReduction(Benchmark): def setup(self): |