From 87298cb451a7650f8d2d24f34f1ddd662c2aeecc Mon Sep 17 00:00:00 2001 From: Geolm Date: Mon, 29 Jan 2024 17:36:55 -0500 Subject: [PATCH] added benchmark on neon --- tests/benchmark.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/tests/benchmark.c b/tests/benchmark.c index b400604..7d2c21e 100644 --- a/tests/benchmark.c +++ b/tests/benchmark.c @@ -40,7 +40,19 @@ int benchmark(approximation_function function, const char* name) output = _mm256_cvtss_f32(result); #else + float32x4_t step = vdupq_n_f32(FLT_EPSILON); + float32x4_t input = vld1q_f32(init_array); + float32x4_t result = vdupq_n_f32(0.f); + start = stm_now(); + + for(uint32_t i=0; i