|
|
|
@ -24,15 +24,6 @@ namespace SixLabors.ImageSharp.Common.Helpers; |
|
|
|
internal static class Vector128_ |
|
|
|
#pragma warning restore SA1649 // File name should match first type name
|
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Gets a value indicating whether shuffle operations are supported.
|
|
|
|
/// </summary>
|
|
|
|
public static bool SupportsShuffleNativeFloat |
|
|
|
{ |
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|
|
|
get => Sse.IsSupported; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets a value indicating whether shuffle operations are supported.
|
|
|
|
/// </summary>
|
|
|
|
@ -87,8 +78,14 @@ internal static class Vector128_ |
|
|
|
return Sse.Shuffle(vector, vector, control); |
|
|
|
} |
|
|
|
|
|
|
|
ThrowUnreachableException(); |
|
|
|
return default; |
|
|
|
// Don't use InverseMMShuffle here as we want to avoid the cast.
|
|
|
|
Vector128<int> indices = Vector128.Create( |
|
|
|
control & 0x3, |
|
|
|
(control >> 2) & 0x3, |
|
|
|
(control >> 4) & 0x3, |
|
|
|
(control >> 6) & 0x3); |
|
|
|
|
|
|
|
return Vector128.Shuffle(vector, indices); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|