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

◆ Equals() [3/3]

bool System.Runtime.Intrinsics.Vector128< T >.Equals ( Vector128< T > other)
inline

Definition at line 1073 of file Vector128.cs.

1074 {
1075 ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType<T>();
1076 if (Sse.IsSupported && typeof(T) == typeof(float))
1077 {
1078 Vector128<float> value = Sse.CompareEqual(this.AsSingle(), other.AsSingle());
1079 return Sse.MoveMask(value) == 15;
1080 }
1081 if (Sse2.IsSupported)
1082 {
1083 if (typeof(T) == typeof(double))
1084 {
1085 Vector128<double> value2 = Sse2.CompareEqual(this.AsDouble(), other.AsDouble());
1086 return Sse2.MoveMask(value2) == 3;
1087 }
1088 Vector128<byte> value3 = Sse2.CompareEqual(this.AsByte(), other.AsByte());
1089 return Sse2.MoveMask(value3) == 65535;
1090 }
1091 return SoftwareFallback(in this, other);
1092 static bool SoftwareFallback(in Vector128<T> vector, Vector128<T> other)
1093 {
1094 for (int i = 0; i < Count; i++)
1095 {
1096 if (!((IEquatable<T>)(object)vector.GetElement(i)).Equals(other.GetElement(i)))
1097 {
1098 return false;
1099 }
1100 }
1101 return true;
1102 }
1103 }
static int MoveMask(Vector128< sbyte > value)
Definition Sse2.cs:772
static Vector128< sbyte > CompareEqual(Vector128< sbyte > left, Vector128< sbyte > right)
Definition Sse2.cs:232
static new bool IsSupported
Definition Sse2.cs:60
static Vector128< float > CompareEqual(Vector128< float > left, Vector128< float > right)
Definition Sse.cs:52
static int MoveMask(Vector128< float > value)
Definition Sse.cs:317
static new bool IsSupported
Definition Sse.cs:30

References System.Runtime.Intrinsics.X86.Sse.CompareEqual(), System.Runtime.Intrinsics.X86.Sse2.CompareEqual(), System.Runtime.Intrinsics.Vector128< T >.Count, System.Runtime.Intrinsics.X86.Sse.IsSupported, System.Runtime.Intrinsics.X86.Sse2.IsSupported, System.Runtime.Intrinsics.X86.Sse.MoveMask(), System.Runtime.Intrinsics.X86.Sse2.MoveMask(), System.other, and System.value.

Referenced by System.Runtime.Intrinsics.Vector128< T >.Equals().