From 3317c4dcc8b625b94c7187904cbfdb8dae075edc Mon Sep 17 00:00:00 2001 From: DiSlord Date: Sun, 2 May 2021 14:11:51 +0300 Subject: [PATCH] Use hardware sqrtf --- plot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plot.c b/plot.c index 60b6a4d..87ce2f7 100644 --- a/plot.c +++ b/plot.c @@ -323,7 +323,8 @@ float sa_sqrtf(const float x) return u.x; } #else -#define sa_sqrtf(x) sqrtf(x) +//#define sa_sqrtf(x) sqrtf(x) +__attribute__((always_inline)) __STATIC_INLINE float sa_sqrtf(float x){__asm__ ("vsqrt.f32 %0, %1" : "=t"(x) : "t"(x)); return x;} #endif // Function for convert to different type of values from dBm