Skip to content

Commit 442e467

Browse files
committed
Fix vectorized cube root on x86-64 with no SSE41
1 parent 5c89d0a commit 442e467

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ImageSharp/Common/Helpers/Numerics.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,9 @@ public static unsafe void CubeRootOnXYZ(Span<Vector4> vectors)
631631

632632
return;
633633
}
634-
#else
634+
#endif
635+
636+
// Fallback with scalar preprocessing and vectorized approximation steps
635637
for (int x = 0; x < length; x++)
636638
{
637639
ref Vector4 v = ref Unsafe.Add(ref vectorsRef, x);
@@ -671,7 +673,6 @@ public static unsafe void CubeRootOnXYZ(Span<Vector4> vectors)
671673

672674
v = y4;
673675
}
674-
#endif
675676
}
676677
}
677678
}

0 commit comments

Comments
 (0)