Merge pull request #36 from Wunkolo/avx512-vrsqrt14ps
Use more accurate `ReciprocalSqrt` when available
This commit is contained in:
@@ -114,6 +114,13 @@ internal static class Intrinsics
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vector256<float> ReciprocalSqrt(Vector256<float> data)
|
||||
{
|
||||
#if !IS_DETERMINISTIC
|
||||
// Accurate to 14 bits
|
||||
if (Avx512F.VL.IsSupported)
|
||||
return Avx512F.VL.ReciprocalSqrt14(data);
|
||||
#endif
|
||||
|
||||
// Accurate to 12 bits
|
||||
if (Avx.IsSupported)
|
||||
return Avx.ReciprocalSqrt(data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user