Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetUpper< T >()

static Vector128< T > System.Runtime.Intrinsics.Vector256< T >.GetUpper< T > ( this Vector256< T > vector)
inlinestatic
Type Constraints
T :struct 

Definition at line 947 of file Vector256.cs.

947 : struct
948 {
949 ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType<T>();
950 if (Avx2.IsSupported && typeof(T) != typeof(float) && typeof(T) != typeof(double))
951 {
952 return Avx2.ExtractVector128(vector.AsByte(), 1).As<byte, T>();
953 }
954 if (Avx.IsSupported)
955 {
956 return Avx.ExtractVector128(vector.AsSingle(), 1).As<float, T>();
957 }
958 return SoftwareFallback(vector);
959 static Vector128<T> SoftwareFallback(Vector256<T> vector)
960 {
961 return Unsafe.Add(ref Unsafe.As<Vector256<T>, Vector128<T>>(ref vector), 1);
962 }
963 }
static new bool IsSupported
Definition Avx2.cs:15
static new Vector128< sbyte > ExtractVector128(Vector256< sbyte > value, byte index)
Definition Avx2.cs:702
static new bool IsSupported
Definition Avx.cs:15
static Vector128< byte > ExtractVector128(Vector256< byte > value, byte index)
Definition Avx.cs:332

References System.Runtime.Intrinsics.X86.Avx.ExtractVector128(), System.Runtime.Intrinsics.X86.Avx2.ExtractVector128(), System.Runtime.Intrinsics.X86.Avx.IsSupported, and System.Runtime.Intrinsics.X86.Avx2.IsSupported.