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

◆ WithUpper< T >()

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

Definition at line 966 of file Vector256.cs.

966 : struct
967 {
968 ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType<T>();
969 if (Avx2.IsSupported && typeof(T) != typeof(float) && typeof(T) != typeof(double))
970 {
971 return Avx2.InsertVector128(vector.AsByte(), value.AsByte(), 1).As<byte, T>();
972 }
973 if (Avx.IsSupported)
974 {
975 return Avx.InsertVector128(vector.AsSingle(), value.AsSingle(), 1).As<float, T>();
976 }
977 return SoftwareFallback(vector, value);
978 static Vector256<T> SoftwareFallback(Vector256<T> vector, Vector128<T> value)
979 {
980 Vector256<T> source = vector;
981 Unsafe.Add(ref Unsafe.As<Vector256<T>, Vector128<T>>(ref source), 1) = value;
982 return source;
983 }
984 }
static new bool IsSupported
Definition Avx2.cs:15
static new Vector256< sbyte > InsertVector128(Vector256< sbyte > value, Vector128< sbyte > data, byte index)
Definition Avx2.cs:1348
static new bool IsSupported
Definition Avx.cs:15
static Vector256< byte > InsertVector128(Vector256< byte > value, Vector128< byte > data, byte index)
Definition Avx.cs:412

References System.Runtime.Intrinsics.X86.Avx.InsertVector128(), System.Runtime.Intrinsics.X86.Avx2.InsertVector128(), System.Runtime.Intrinsics.X86.Avx.IsSupported, System.Runtime.Intrinsics.X86.Avx2.IsSupported, System.source, and System.value.