Skip to content

Commit

Permalink
[cpp] Fix typo in ReciprocalSqrtNewtonIter
Browse files Browse the repository at this point in the history
  • Loading branch information
bnprks committed Oct 19, 2024
1 parent 8a511dc commit f9b0111
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions r/src/bpcells-cpp/simd/sctransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ template <int It, class V> 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<It-1>(a, newton);
if constexpr (It > 1) {
newton = ReciprocalSqrtNewtonIter<It-1>(a, newton);
}
return newton;
}
Expand Down

0 comments on commit f9b0111

Please sign in to comment.