also note silkx which this is to be a part of is intended to target net8 and up if any net8 optimiza
also note silkx which this is to be a part of is intended to target net8 and up if any net8 optimizations impact things
Sse2.Add?// USE AN EPSILON DAMNIT!
Sse2.Add// USE AN EPSILON DAMNIT! if (!RuntimeHelpers.IsReferenceOrContainsReferences<T>())
{
var size = Unsafe.SizeOf<T>();
if (Vector128.IsHardwareAccelerated && (size * Count) < 16)
{
Span<byte> data = stackalloc byte[32];
data.Clear(); // optional?
var copy = this; // make you guys happy
MemoryMarshal.AsBytes(MemoryMarshal.CreateSpan(ref copy, 1)).CopyTo(data);
MemoryMarshal.AsBytes(MemoryMarshal.CreateSpan(ref other, 1)).CopyTo(data[16..]);
MemoryMarshal.Cast<byte, Vector128<>()
}
}if (Vector128.IsHardwareAccelerated && typeof(T) == typeof(float))
{
return Unsafe.BitCast<Vector3<T>, Vector3>(this).AsVector128().Equals(Unsafe.BitCast<Vector3<T>, Vector3>(other).AsVector128());
}