style: use explicit type for Vector128<byte>

This commit is contained in:
Oliver Booth 2023-03-31 20:18:22 +01:00
parent f293f247e7
commit 626f1e931c
No known key found for this signature in database
GPG Key ID: 20BEB9DC87961025
1 changed files with 5 additions and 5 deletions

View File

@ -61,11 +61,11 @@ public static class ByteExtensions
);
var mask1 = Vector128.Create((byte)0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1);
var vec = Vector128.Create(value).AsByte();
var shuffle = Ssse3.Shuffle(vec, mask1);
var and = Sse2.AndNot(shuffle, mask2);
var cmp = Sse2.CompareEqual(and, Vector128<byte>.Zero);
var correctness = Sse2.And(cmp, Vector128.Create((byte)0x01));
Vector128<byte> vec = Vector128.Create(value).AsByte();
Vector128<byte> shuffle = Ssse3.Shuffle(vec, mask1);
Vector128<byte> and = Sse2.AndNot(shuffle, mask2);
Vector128<byte> cmp = Sse2.CompareEqual(and, Vector128<byte>.Zero);
Vector128<byte> correctness = Sse2.And(cmp, Vector128.Create((byte)0x01));
Sse2.StoreScalar((long*)pDestination, correctness.AsInt64());
}