From f9b0111a6fbc19e380fe82304a22ee172eebca61 Mon Sep 17 00:00:00 2001 From: Ben Parks Date: Fri, 18 Oct 2024 17:38:33 -0700 Subject: [PATCH] [cpp] Fix typo in ReciprocalSqrtNewtonIter --- r/src/bpcells-cpp/simd/sctransform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r/src/bpcells-cpp/simd/sctransform.cpp b/r/src/bpcells-cpp/simd/sctransform.cpp index db700bbe..8018314a 100644 --- a/r/src/bpcells-cpp/simd/sctransform.cpp +++ b/r/src/bpcells-cpp/simd/sctransform.cpp @@ -37,8 +37,8 @@ template inline V ReciprocalSqrtNewtonIter(const V a, const V V newton = hn::Mul( approx, hn::MulAdd(hn::Mul(minus_half, approx), hn::Mul(a, approx), one_point_five) ); - if constexpr (it > 1) { - newton = ReciprocalSqrt(a, newton); + if constexpr (It > 1) { + newton = ReciprocalSqrtNewtonIter(a, newton); } return newton; }