1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-23 00:38:47 +00:00

Use explicit type where non-evident in SpanExtensions

This commit is contained in:
Oliver Booth 2023-03-23 15:11:15 +00:00
parent 136382a2a3
commit ea26b5a7e1
No known key found for this signature in database
GPG Key ID: 20BEB9DC87961025

View File

@ -179,7 +179,7 @@ public static class SpanExtensions
if (Sse2.IsSupported) if (Sse2.IsSupported)
{ {
var load = Sse2.LoadScalarVector128((ulong*)pSource).AsByte(); Vector128<byte> load = Sse2.LoadScalarVector128((ulong*)pSource).AsByte();
return unchecked((byte)(IntegerPackingMagic * load.CorrectBoolean().AsUInt64().GetElement(0) >> 56)); return unchecked((byte)(IntegerPackingMagic * load.CorrectBoolean().AsUInt64().GetElement(0) >> 56));
} }
@ -190,7 +190,7 @@ public static class SpanExtensions
if (AdvSimd.IsSupported) if (AdvSimd.IsSupported)
{ {
// Hasn't been tested since March 6th 2023 (Reason: Unavailable hardware). // Hasn't been tested since March 6th 2023 (Reason: Unavailable hardware).
var load = AdvSimd.LoadVector64((byte*)pSource); Vector64<byte> load = AdvSimd.LoadVector64((byte*)pSource);
return unchecked((byte)(IntegerPackingMagic * load.CorrectBoolean().AsUInt64().GetElement(0) >> 56)); return unchecked((byte)(IntegerPackingMagic * load.CorrectBoolean().AsUInt64().GetElement(0) >> 56));
} }