From 6a6a366ade6ff99552c372f81f4731a2d2b08bf9 Mon Sep 17 00:00:00 2001 From: Griffin Bassman Date: Fri, 10 Nov 2023 16:56:55 -0500 Subject: [PATCH] lint --- vowpalwabbit/core/src/reductions/gd.cc | 52 +++++++++++++------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/vowpalwabbit/core/src/reductions/gd.cc b/vowpalwabbit/core/src/reductions/gd.cc index d00f30264e7..023eeee04ed 100644 --- a/vowpalwabbit/core/src/reductions/gd.cc +++ b/vowpalwabbit/core/src/reductions/gd.cc @@ -154,32 +154,32 @@ VW_WARNING_STATE_POP static inline float inv_sqrt(float x) { return 1 / std::sqrt(x); -/* -#if !defined(VW_NO_INLINE_SIMD) -# if defined(__ARM_NEON__) - // Propagate into vector - float32x2_t v1 = vdup_n_f32(x); - // Estimate - float32x2_t e1 = vrsqrte_f32(v1); - // N-R iteration 1 - float32x2_t e2 = vmul_f32(e1, vrsqrts_f32(v1, vmul_f32(e1, e1))); - // N-R iteration 2 - float32x2_t e3 = vmul_f32(e2, vrsqrts_f32(v1, vmul_f32(e2, e2))); - // Extract result - return vget_lane_f32(e3, 0); -# elif defined(__SSE2__) - __m128 eta = _mm_load_ss(&x); - eta = _mm_rsqrt_ss(eta); - _mm_store_ss(&x, eta); -# else - x = quake_inv_sqrt(x); -# endif -#else - x = quake_inv_sqrt(x); -#endif - - return x; -*/ + /* + #if !defined(VW_NO_INLINE_SIMD) + # if defined(__ARM_NEON__) + // Propagate into vector + float32x2_t v1 = vdup_n_f32(x); + // Estimate + float32x2_t e1 = vrsqrte_f32(v1); + // N-R iteration 1 + float32x2_t e2 = vmul_f32(e1, vrsqrts_f32(v1, vmul_f32(e1, e1))); + // N-R iteration 2 + float32x2_t e3 = vmul_f32(e2, vrsqrts_f32(v1, vmul_f32(e2, e2))); + // Extract result + return vget_lane_f32(e3, 0); + # elif defined(__SSE2__) + __m128 eta = _mm_load_ss(&x); + eta = _mm_rsqrt_ss(eta); + _mm_store_ss(&x, eta); + # else + x = quake_inv_sqrt(x); + # endif + #else + x = quake_inv_sqrt(x); + #endif + + return x; + */ } VW_WARNING_STATE_PUSH