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

◆ WithLower< T >()

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

Definition at line 926 of file Vector256.cs.

926 : struct
927 {
928 ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType<T>();
929 if (Avx2.IsSupported && typeof(T) != typeof(float) && typeof(T) != typeof(double))
930 {
931 return Avx2.InsertVector128(vector.AsByte(), value.AsByte(), 0).As<byte, T>();
932 }
933 if (Avx.IsSupported)
934 {
935 return Avx.InsertVector128(vector.AsSingle(), value.AsSingle(), 0).As<float, T>();
936 }
937 return SoftwareFallback(vector, value);
938 static Vector256<T> SoftwareFallback(Vector256<T> vector, Vector128<T> value)
939 {
940 Vector256<T> source = vector;
941 Unsafe.As<Vector256<T>, Vector128<T>>(ref source) = value;
942 return source;
943 }
944 }
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.