1352 references to Count
GenerateDocumentationAndConfigFiles (24)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (24)
503for (int i = 0; i < SecretLengthBytes; i += Vector128<byte>.Count) 562Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 563Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 564Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 573source += Vector128<byte>.Count; 575secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 577source += Vector128<byte>.Count; 579secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 581source += Vector128<byte>.Count; 583secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 585source += Vector128<byte>.Count; 593acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 594acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 595acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 600Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 601Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 602Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 647for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 652accumulators += Vector128<ulong>.Count; 653secret += Vector128<byte>.Count; 654source += Vector128<byte>.Count; 740for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 745accumulators += Vector128<ulong>.Count; 746secret += Vector128<byte>.Count;
Microsoft.AspNetCore.Razor.Utilities.Shared (24)
Utilities\Hashing\XxHashShared.cs (24)
502for (int i = 0; i < SecretLengthBytes; i += Vector128<byte>.Count) 561Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 562Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 563Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 572source += Vector128<byte>.Count; 574secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 576source += Vector128<byte>.Count; 578secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 580source += Vector128<byte>.Count; 582secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 584source += Vector128<byte>.Count; 592acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 593acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 594acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 599Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 600Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 601Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 646for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 651accumulators += Vector128<ulong>.Count; 652secret += Vector128<byte>.Count; 653source += Vector128<byte>.Count; 739for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 744accumulators += Vector128<ulong>.Count; 745secret += Vector128<byte>.Count;
Microsoft.CodeAnalysis (24)
Hashing\XxHashShared.cs (24)
503for (int i = 0; i < SecretLengthBytes; i += Vector128<byte>.Count) 562Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 563Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 564Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 573source += Vector128<byte>.Count; 575secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 577source += Vector128<byte>.Count; 579secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 581source += Vector128<byte>.Count; 583secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 585source += Vector128<byte>.Count; 593acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 594acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 595acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 600Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 601Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 602Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 647for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 652accumulators += Vector128<ulong>.Count; 653secret += Vector128<byte>.Count; 654source += Vector128<byte>.Count; 740for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 745accumulators += Vector128<ulong>.Count; 746secret += Vector128<byte>.Count;
Microsoft.CodeAnalysis.Workspaces (24)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (24)
503for (int i = 0; i < SecretLengthBytes; i += Vector128<byte>.Count) 562Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 563Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 564Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 573source += Vector128<byte>.Count; 575secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 577source += Vector128<byte>.Count; 579secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 581source += Vector128<byte>.Count; 583secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 585source += Vector128<byte>.Count; 593acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 594acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 595acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 600Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 601Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 602Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 647for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 652accumulators += Vector128<ulong>.Count; 653secret += Vector128<byte>.Count; 654source += Vector128<byte>.Count; 740for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 745accumulators += Vector128<ulong>.Count; 746secret += Vector128<byte>.Count;
System.IO.Hashing (58)
System\IO\Hashing\Adler32.cs (2)
198source.Length >= Vector128<byte>.Count * 2) 245Debug.Assert(source.Length >= Vector128<byte>.Count * 2);
System\IO\Hashing\Crc32ParameterSet.Vectorized.cs (16)
64if (!_canVectorize || source.Length < _shouldVectorizeScale * Vector128<byte>.Count) 80if (remaining.Length >= Vector128<byte>.Count * 4) 87remaining = remaining.Slice(Vector128<byte>.Count * 4); 91while (remaining.Length >= Vector128<byte>.Count * 4) 103remaining = remaining.Slice(Vector128<byte>.Count * 4); 115remaining = remaining.Slice(Vector128<byte>.Count); 118while (remaining.Length >= Vector128<byte>.Count) 122remaining = remaining.Slice(Vector128<byte>.Count); 198if (!_canVectorize || source.Length < Vector128<byte>.Count) 213if (remaining.Length >= Vector128<byte>.Count * 4) 220remaining = remaining.Slice(Vector128<byte>.Count * 4); 224while (remaining.Length >= Vector128<byte>.Count * 4) 236remaining = remaining.Slice(Vector128<byte>.Count * 4); 248remaining = remaining.Slice(Vector128<byte>.Count); 251while (remaining.Length >= Vector128<byte>.Count) 255remaining = remaining.Slice(Vector128<byte>.Count);
System\IO\Hashing\Crc64ParameterSet.Vectorized.cs (16)
74if (!_canVectorize || source.Length < Vector128<byte>.Count) 89if (remaining.Length >= Vector128<byte>.Count * 4) 96remaining = remaining.Slice(Vector128<byte>.Count * 4); 100while (remaining.Length >= Vector128<byte>.Count * 4) 112remaining = remaining.Slice(Vector128<byte>.Count * 4); 124remaining = remaining.Slice(Vector128<byte>.Count); 127while (remaining.Length >= Vector128<byte>.Count) 131remaining = remaining.Slice(Vector128<byte>.Count); 201if (!_canVectorize || source.Length < Vector128<byte>.Count) 216if (remaining.Length >= Vector128<byte>.Count * 4) 223remaining = remaining.Slice(Vector128<byte>.Count * 4); 227while (remaining.Length >= Vector128<byte>.Count * 4) 239remaining = remaining.Slice(Vector128<byte>.Count * 4); 251remaining = remaining.Slice(Vector128<byte>.Count); 254while (remaining.Length >= Vector128<byte>.Count) 258remaining = remaining.Slice(Vector128<byte>.Count);
System\IO\Hashing\XxHashShared.cs (24)
495for (int i = 0; i < SecretLengthBytes; i += Vector128<byte>.Count) 554Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 555Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 556Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 565source += Vector128<byte>.Count; 567secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 569source += Vector128<byte>.Count; 571secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 573source += Vector128<byte>.Count; 575secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 577source += Vector128<byte>.Count; 585acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 586acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 587acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 592Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 593Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 594Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 639for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 644accumulators += Vector128<ulong>.Count; 645secret += Vector128<byte>.Count; 646source += Vector128<byte>.Count; 745for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 750accumulators += Vector128<ulong>.Count; 751secret += Vector128<byte>.Count;
System.Numerics.Tensors (777)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IAggregationOperator.cs (83)
116if (remainder >= (uint)Vector128<T>.Count) 157Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 161if (remainder > (uint)(Vector128<T>.Count * 8)) 200misalignment = (uint)Vector128<T>.Count; 212while (remainder >= (uint)(Vector128<T>.Count * 8)) 216vector1 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0))); 217vector2 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1))); 218vector3 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2))); 219vector4 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3))); 228vector1 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4))); 229vector2 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5))); 230vector3 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6))); 231vector4 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7))); 241xPtr += (uint)(Vector128<T>.Count * 8); 243remainder -= (uint)(Vector128<T>.Count * 8); 264(nuint blocks, nuint trailing) = Math.DivRem(remainder, (nuint)Vector128<T>.Count); 272Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7))); 279Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6))); 286Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5))); 293Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4))); 300Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3))); 307Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2))); 314Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 1))); 800Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 802end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 947Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 949end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 1047Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 1049end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 1130Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 1132end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 1235if (remainder >= (uint)Vector128<T>.Count) 1278Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1279Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 1283if (remainder > (uint)(Vector128<T>.Count * 8)) 1326misalignment = (uint)Vector128<T>.Count; 1341while (remainder >= (uint)(Vector128<T>.Count * 8)) 1345vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 1346Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0))); 1347vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 1348Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1))); 1349vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 1350Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2))); 1351vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 1352Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3))); 1361vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 1362Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4))); 1363vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 1364Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5))); 1365vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 1366Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6))); 1367vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 1368Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7))); 1378xPtr += (uint)(Vector128<T>.Count * 8); 1379yPtr += (uint)(Vector128<T>.Count * 8); 1381remainder -= (uint)(Vector128<T>.Count * 8); 1403(nuint blocks, nuint trailing) = Math.DivRem(remainder, (nuint)Vector128<T>.Count); 1411Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 1412Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 7))); 1419Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 1420Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 6))); 1427Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 1428Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 5))); 1435Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 1436Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 4))); 1443Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 1444Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 3))); 1451Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 1452Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 2))); 1459Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 1)), 1460Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 1))); 2000Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2001Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 2003end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 2153Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2154Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 2156end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 2259Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2260Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 2262end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 2350Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2351Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 2353end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBinaryOperator.cs (168)
123if (remainder >= (uint)Vector128<T>.Count) 162Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 163Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 165if (remainder > (uint)(Vector128<T>.Count * 8)) 213while (remainder >= (uint)(Vector128<T>.Count * 8)) 217vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 218Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0))); 219vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 220Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1))); 221vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 222Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2))); 223vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 224Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3))); 226vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 0)); 227vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 1)); 228vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 2)); 229vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 3)); 233vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 234Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4))); 235vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 236Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5))); 237vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 238Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6))); 239vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 240Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7))); 242vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 4)); 243vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 5)); 244vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 6)); 245vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 7)); 250xPtr += (uint)(Vector128<T>.Count * 8); 251yPtr += (uint)(Vector128<T>.Count * 8); 252dPtr += (uint)(Vector128<T>.Count * 8); 254remainder -= (uint)(Vector128<T>.Count * 8); 259while (remainder >= (uint)(Vector128<T>.Count * 8)) 263vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 264Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0))); 265vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 266Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1))); 267vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 268Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2))); 269vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 270Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3))); 272vector1.Store(dPtr + (uint)(Vector128<T>.Count * 0)); 273vector2.Store(dPtr + (uint)(Vector128<T>.Count * 1)); 274vector3.Store(dPtr + (uint)(Vector128<T>.Count * 2)); 275vector4.Store(dPtr + (uint)(Vector128<T>.Count * 3)); 279vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 280Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4))); 281vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 282Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5))); 283vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 284Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6))); 285vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 286Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7))); 288vector1.Store(dPtr + (uint)(Vector128<T>.Count * 4)); 289vector2.Store(dPtr + (uint)(Vector128<T>.Count * 5)); 290vector3.Store(dPtr + (uint)(Vector128<T>.Count * 6)); 291vector4.Store(dPtr + (uint)(Vector128<T>.Count * 7)); 296xPtr += (uint)(Vector128<T>.Count * 8); 297yPtr += (uint)(Vector128<T>.Count * 8); 298dPtr += (uint)(Vector128<T>.Count * 8); 300remainder -= (uint)(Vector128<T>.Count * 8); 320remainder = (remainder + (uint)(Vector128<T>.Count - 1)) & (nuint)(-Vector128<T>.Count); 322switch (remainder / (uint)Vector128<T>.Count) 326Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8)), 327Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 8))); 328vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 8)); 334Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 335Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 7))); 336vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 7)); 342Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 343Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 6))); 344vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 6)); 350Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 351Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 5))); 352vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 5)); 358Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 359Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 4))); 360vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 4)); 366Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 367Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 3))); 368vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 3)); 374Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 375Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 2))); 376vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 2)); 383end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.Count); 988Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 989Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 992end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 1152Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1153Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 1156end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 1261Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1262Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 1265end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 1349Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1350Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 1353end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 1455if (remainder >= (uint)Vector128<T>.Count) 1496Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)), 1499if (remainder > (uint)(Vector128<T>.Count * 8)) 1544while (remainder >= (uint)(Vector128<T>.Count * 8)) 1548vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0))), 1550vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1))), 1552vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2))), 1554vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3))), 1557vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 0)); 1558vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 1)); 1559vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 2)); 1560vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 3)); 1564vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4))), 1566vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5))), 1568vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6))), 1570vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7))), 1573vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 4)); 1574vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 5)); 1575vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 6)); 1576vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 7)); 1581xPtr += (uint)(Vector128<T>.Count * 8); 1582dPtr += (uint)(Vector128<T>.Count * 8); 1584remainder -= (uint)(Vector128<T>.Count * 8); 1589while (remainder >= (uint)(Vector128<T>.Count * 8)) 1593vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0))), 1595vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1))), 1597vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2))), 1599vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3))), 1602vector1.Store(dPtr + (uint)(Vector128<T>.Count * 0)); 1603vector2.Store(dPtr + (uint)(Vector128<T>.Count * 1)); 1604vector3.Store(dPtr + (uint)(Vector128<T>.Count * 2)); 1605vector4.Store(dPtr + (uint)(Vector128<T>.Count * 3)); 1609vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4))), 1611vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5))), 1613vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6))), 1615vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7))), 1618vector1.Store(dPtr + (uint)(Vector128<T>.Count * 4)); 1619vector2.Store(dPtr + (uint)(Vector128<T>.Count * 5)); 1620vector3.Store(dPtr + (uint)(Vector128<T>.Count * 6)); 1621vector4.Store(dPtr + (uint)(Vector128<T>.Count * 7)); 1626xPtr += (uint)(Vector128<T>.Count * 8); 1627dPtr += (uint)(Vector128<T>.Count * 8); 1629remainder -= (uint)(Vector128<T>.Count * 8); 1648remainder = (remainder + (uint)(Vector128<T>.Count - 1)) & (nuint)(-Vector128<T>.Count); 1650switch (remainder / (uint)Vector128<T>.Count) 1654Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8))), 1656vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 8)); 1662Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7))), 1664vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 7)); 1670Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6))), 1672vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 6)); 1678Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5))), 1680vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 5)); 1686Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4))), 1688vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 4)); 1694Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3))), 1696vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 3)); 1702Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2))), 1704vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 2)); 1711end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.Count); 2312Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)), 2316end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 2480Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)), 2484end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 2593Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)), 2597end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 2685Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)), 2689end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBooleanUnaryOperator.cs (26)
141oneVectorFromEnd = x.Length - Vector128<T>.Count; 152i += Vector128<T>.Count; 158TAnyAll.ShouldEarlyExit(TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count))))) 281int vectorFromEnd = x.Length - Vector128<T>.Count; 288i += Vector128<T>.Count; 295i = x.Length - Vector128<T>.Count; 395int vectorsFromEnd = x.Length - (Vector128<T>.Count * sizeof(T)); 402i += Vector128<T>.Count * sizeof(T); 409i = x.Length - (Vector128<T>.Count * sizeof(T)); 420TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt16()); 520int vectorsFromEnd = x.Length - (Vector128<T>.Count * sizeof(T)); 527i += Vector128<T>.Count * sizeof(T); 534i = x.Length - (Vector128<T>.Count * sizeof(T)); 546TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt32()), 548TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector128<T>.Count)))).AsUInt32(), 549TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector128<T>.Count)))).AsUInt32())); 669int vectorsFromEnd = x.Length - (Vector128<T>.Count * sizeof(T)); 676i += Vector128<T>.Count * sizeof(T); 683i = x.Length - (Vector128<T>.Count * sizeof(T)); 696TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt64()), 698TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector128<T>.Count)))).AsUInt64(), 699TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector128<T>.Count)))).AsUInt64())), 702TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (4 * Vector128<T>.Count)))).AsUInt64(), 703TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (5 * Vector128<T>.Count)))).AsUInt64()), 705TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (6 * Vector128<T>.Count)))).AsUInt64(), 706TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (7 * Vector128<T>.Count)))).AsUInt64())));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IIndexOfMinMaxOperator.cs (16)
47if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 104Vector128<TInt> indexIncrement = Vector128.Create(TInt.CreateTruncating(Vector128<TInt>.Count)); 107ReadOnlySpan<T> span = x.Slice(Vector128<T>.Count); 112if (span.Length >= Vector128<T>.Count) 115span = span.Slice(Vector128<T>.Count); 120int start = x.Length - Vector128<T>.Count; 171Vector128<uint> indexIncrement = Vector128.Create((uint)Vector128<uint>.Count); 175ReadOnlySpan<T> span = x.Slice(Vector128<T>.Count); 180if (span.Length >= Vector128<T>.Count) 183span = span.Slice(Vector128<T>.Count); 188int start = x.Length - Vector128<T>.Count; 246Vector128<uint> indexIncrement = Vector128.Create((uint)Vector128<uint>.Count); 252ReadOnlySpan<T> span = x.Slice(Vector128<T>.Count); 257if (span.Length >= Vector128<T>.Count) 260span = span.Slice(Vector128<T>.Count); 265int start = x.Length - Vector128<T>.Count;
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IStatefulUnaryOperator.cs (69)
89if (remainder >= (uint)Vector128<T>.Count) 126Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 128if (remainder > (uint)(Vector128<T>.Count * 8)) 173while (remainder >= (uint)(Vector128<T>.Count * 8)) 177vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0))); 178vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1))); 179vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2))); 180vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3))); 182vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 0)); 183vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 1)); 184vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 2)); 185vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 3)); 189vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4))); 190vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5))); 191vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6))); 192vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7))); 194vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 4)); 195vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 5)); 196vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 6)); 197vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 7)); 202xPtr += (uint)(Vector128<T>.Count * 8); 203dPtr += (uint)(Vector128<T>.Count * 8); 205remainder -= (uint)(Vector128<T>.Count * 8); 210while (remainder >= (uint)(Vector128<T>.Count * 8)) 214vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0))); 215vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1))); 216vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2))); 217vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3))); 219vector1.Store(dPtr + (uint)(Vector128<T>.Count * 0)); 220vector2.Store(dPtr + (uint)(Vector128<T>.Count * 1)); 221vector3.Store(dPtr + (uint)(Vector128<T>.Count * 2)); 222vector4.Store(dPtr + (uint)(Vector128<T>.Count * 3)); 226vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4))); 227vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5))); 228vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6))); 229vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7))); 231vector1.Store(dPtr + (uint)(Vector128<T>.Count * 4)); 232vector2.Store(dPtr + (uint)(Vector128<T>.Count * 5)); 233vector3.Store(dPtr + (uint)(Vector128<T>.Count * 6)); 234vector4.Store(dPtr + (uint)(Vector128<T>.Count * 7)); 239xPtr += (uint)(Vector128<T>.Count * 8); 240dPtr += (uint)(Vector128<T>.Count * 8); 242remainder -= (uint)(Vector128<T>.Count * 8); 261remainder = (remainder + (uint)(Vector128<T>.Count - 1)) & (nuint)(-Vector128<T>.Count); 263switch (remainder / (uint)Vector128<T>.Count) 267Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8))); 268vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 8)); 274Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7))); 275vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 7)); 281Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6))); 282vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 6)); 288Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5))); 289vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 5)); 295Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4))); 296vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 4)); 302Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3))); 303vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 3)); 309Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2))); 310vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 2)); 317end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.Count); 856Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 859end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 1000Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 1003end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 1097Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 1100end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 1177Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 1180end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.ITernaryOperator.cs (297)
110if (remainder >= (uint)Vector128<T>.Count) 151Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 152Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 153Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 155if (remainder > (uint)(Vector128<T>.Count * 8)) 206while (remainder >= (uint)(Vector128<T>.Count * 8)) 210vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 211Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 212Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 0))); 213vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 214Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 215Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 1))); 216vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 217Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 218Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 2))); 219vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 220Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 221Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 3))); 223vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 0)); 224vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 1)); 225vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 2)); 226vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 3)); 230vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 231Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 232Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 4))); 233vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 234Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 235Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 5))); 236vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 237Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 238Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 6))); 239vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 240Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 241Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 7))); 243vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 4)); 244vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 5)); 245vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 6)); 246vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 7)); 251xPtr += (uint)(Vector128<T>.Count * 8); 252yPtr += (uint)(Vector128<T>.Count * 8); 253zPtr += (uint)(Vector128<T>.Count * 8); 254dPtr += (uint)(Vector128<T>.Count * 8); 256remainder -= (uint)(Vector128<T>.Count * 8); 261while (remainder >= (uint)(Vector128<T>.Count * 8)) 265vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 266Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 267Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 0))); 268vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 269Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 270Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 1))); 271vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 272Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 273Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 2))); 274vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 275Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 276Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 3))); 278vector1.Store(dPtr + (uint)(Vector128<T>.Count * 0)); 279vector2.Store(dPtr + (uint)(Vector128<T>.Count * 1)); 280vector3.Store(dPtr + (uint)(Vector128<T>.Count * 2)); 281vector4.Store(dPtr + (uint)(Vector128<T>.Count * 3)); 285vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 286Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 287Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 4))); 288vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 289Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 290Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 5))); 291vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 292Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 293Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 6))); 294vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 295Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 296Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 7))); 298vector1.Store(dPtr + (uint)(Vector128<T>.Count * 4)); 299vector2.Store(dPtr + (uint)(Vector128<T>.Count * 5)); 300vector3.Store(dPtr + (uint)(Vector128<T>.Count * 6)); 301vector4.Store(dPtr + (uint)(Vector128<T>.Count * 7)); 306xPtr += (uint)(Vector128<T>.Count * 8); 307yPtr += (uint)(Vector128<T>.Count * 8); 308zPtr += (uint)(Vector128<T>.Count * 8); 309dPtr += (uint)(Vector128<T>.Count * 8); 311remainder -= (uint)(Vector128<T>.Count * 8); 332remainder = (remainder + (uint)(Vector128<T>.Count - 1)) & (nuint)(-Vector128<T>.Count); 334switch (remainder / (uint)Vector128<T>.Count) 338Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8)), 339Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 8)), 340Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 8))); 341vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 8)); 347Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 348Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 7)), 349Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 7))); 350vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 7)); 356Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 357Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 6)), 358Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 6))); 359vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 6)); 365Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 366Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 5)), 367Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 5))); 368vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 5)); 374Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 375Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 4)), 376Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 4))); 377vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 4)); 383Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 384Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 3)), 385Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 3))); 386vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 3)); 392Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 393Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 2)), 394Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 2))); 395vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 2)); 402end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.Count); 1073Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1074Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1075Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1078end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 1257Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1258Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1259Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1262end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 1378Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1379Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1380Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1383end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 1474Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1475Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1476Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1479end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 1585if (remainder >= (uint)Vector128<T>.Count) 1628Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1629Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1632if (remainder > (uint)(Vector128<T>.Count * 8)) 1680while (remainder >= (uint)(Vector128<T>.Count * 8)) 1684vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 1685Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 1687vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 1688Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 1690vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 1691Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 1693vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 1694Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 1697vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 0)); 1698vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 1)); 1699vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 2)); 1700vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 3)); 1704vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 1705Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 1707vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 1708Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 1710vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 1711Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 1713vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 1714Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 1717vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 4)); 1718vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 5)); 1719vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 6)); 1720vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 7)); 1725xPtr += (uint)(Vector128<T>.Count * 8); 1726yPtr += (uint)(Vector128<T>.Count * 8); 1727dPtr += (uint)(Vector128<T>.Count * 8); 1729remainder -= (uint)(Vector128<T>.Count * 8); 1734while (remainder >= (uint)(Vector128<T>.Count * 8)) 1738vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 1739Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 1741vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 1742Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 1744vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 1745Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 1747vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 1748Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 1751vector1.Store(dPtr + (uint)(Vector128<T>.Count * 0)); 1752vector2.Store(dPtr + (uint)(Vector128<T>.Count * 1)); 1753vector3.Store(dPtr + (uint)(Vector128<T>.Count * 2)); 1754vector4.Store(dPtr + (uint)(Vector128<T>.Count * 3)); 1758vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 1759Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 1761vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 1762Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 1764vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 1765Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 1767vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 1768Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 1771vector1.Store(dPtr + (uint)(Vector128<T>.Count * 4)); 1772vector2.Store(dPtr + (uint)(Vector128<T>.Count * 5)); 1773vector3.Store(dPtr + (uint)(Vector128<T>.Count * 6)); 1774vector4.Store(dPtr + (uint)(Vector128<T>.Count * 7)); 1779xPtr += (uint)(Vector128<T>.Count * 8); 1780yPtr += (uint)(Vector128<T>.Count * 8); 1781dPtr += (uint)(Vector128<T>.Count * 8); 1783remainder -= (uint)(Vector128<T>.Count * 8); 1803remainder = (remainder + (uint)(Vector128<T>.Count - 1)) & (nuint)(-Vector128<T>.Count); 1805switch (remainder / (uint)Vector128<T>.Count) 1809Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8)), 1810Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 8)), 1812vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 8)); 1818Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 1819Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 7)), 1821vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 7)); 1827Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 1828Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 6)), 1830vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 6)); 1836Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 1837Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 5)), 1839vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 5)); 1845Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 1846Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 4)), 1848vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 4)); 1854Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 1855Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 3)), 1857vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 3)); 1863Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 1864Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 2)), 1866vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 2)); 1873end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.Count); 2540Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2541Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2545end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 2728Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2729Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2733end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 2853Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2854Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2858end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 2953Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2954Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2958end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 3071if (remainder >= (uint)Vector128<T>.Count) 3115Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 3119if (remainder > (uint)(Vector128<T>.Count * 8)) 3164while (remainder >= (uint)(Vector128<T>.Count * 8)) 3168vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 3171vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 3174vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 3177vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 3181vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 0)); 3182vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 1)); 3183vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 2)); 3184vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 3)); 3188vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 3191vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 3194vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 3197vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 3201vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 4)); 3202vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 5)); 3203vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 6)); 3204vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.Count * 7)); 3209xPtr += (uint)(Vector128<T>.Count * 8); 3210dPtr += (uint)(Vector128<T>.Count * 8); 3212remainder -= (uint)(Vector128<T>.Count * 8); 3217while (remainder >= (uint)(Vector128<T>.Count * 8)) 3221vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 3224vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 3227vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 3230vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 3234vector1.Store(dPtr + (uint)(Vector128<T>.Count * 0)); 3235vector2.Store(dPtr + (uint)(Vector128<T>.Count * 1)); 3236vector3.Store(dPtr + (uint)(Vector128<T>.Count * 2)); 3237vector4.Store(dPtr + (uint)(Vector128<T>.Count * 3)); 3241vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 3244vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 3247vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 3250vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 3254vector1.Store(dPtr + (uint)(Vector128<T>.Count * 4)); 3255vector2.Store(dPtr + (uint)(Vector128<T>.Count * 5)); 3256vector3.Store(dPtr + (uint)(Vector128<T>.Count * 6)); 3257vector4.Store(dPtr + (uint)(Vector128<T>.Count * 7)); 3262xPtr += (uint)(Vector128<T>.Count * 8); 3263dPtr += (uint)(Vector128<T>.Count * 8); 3265remainder -= (uint)(Vector128<T>.Count * 8); 3284remainder = (remainder + (uint)(Vector128<T>.Count - 1)) & (nuint)(-Vector128<T>.Count); 3286switch (remainder / (uint)Vector128<T>.Count) 3290Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8)), 3293vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 8)); 3299Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 3302vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 7)); 3308Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 3311vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 6)); 3317Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 3320vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 5)); 3326Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 3329vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 4)); 3335Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 3338vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 3)); 3344Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 3347vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.Count * 2)); 3354end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.Count); 4013Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4018end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 4203Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4208end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 4330Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4335end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count); 4432Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4437end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.Count);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryInputBinaryOutput.cs (9)
132oneVectorFromEnd = x.Length - Vector128<T>.Count; 142i += Vector128<T>.Count; 149i = x.Length - Vector128<T>.Count; 303oneVectorFromEnd = x.Length - Vector128<T>.Count; 313i += Vector128<T>.Count; 322i = x.Length - Vector128<T>.Count; 488oneVectorFromEnd = x.Length - Vector128<T>.Count; 500i += Vector128<T>.Count; 509i = x.Length - Vector128<T>.Count;
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToFourOperator.cs (9)
123oneVectorFromEnd = x.Length - Vector128<TInput>.Count; 131results.Item2.StoreUnsafe(ref destinationRef, (uint)(i + Vector128<TOutput>.Count)); 132results.Item3.StoreUnsafe(ref destinationRef, (uint)(i + (Vector128<TOutput>.Count * 2))); 133results.Item4.StoreUnsafe(ref destinationRef, (uint)(i + (Vector128<TOutput>.Count * 3))); 135i += Vector128<TInput>.Count; 142i = x.Length - Vector128<TInput>.Count; 146results.Item2.StoreUnsafe(ref destinationRef, (uint)(i + Vector128<TOutput>.Count)); 147results.Item3.StoreUnsafe(ref destinationRef, (uint)(i + (Vector128<TOutput>.Count * 2))); 148results.Item4.StoreUnsafe(ref destinationRef, (uint)(i + (Vector128<TOutput>.Count * 3)));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToTwoOperator.cs (5)
115oneVectorFromEnd = x.Length - Vector128<TInput>.Count; 123upper.StoreUnsafe(ref destinationRef, (uint)(i + Vector128<TOutput>.Count)); 125i += Vector128<TInput>.Count; 132i = x.Length - Vector128<TInput>.Count; 136upper.StoreUnsafe(ref destinationRef, (uint)(i + Vector128<TOutput>.Count));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOperator.cs (69)
129if (remainder >= (uint)Vector128<TInput>.Count) 166Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.Count)); 168if (remainder > (uint)(Vector128<TInput>.Count * 8)) 213while (remainder >= (uint)(Vector128<TInput>.Count * 8)) 217vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 0))); 218vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 1))); 219vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 2))); 220vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 3))); 222vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.Count * 0)); 223vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.Count * 1)); 224vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.Count * 2)); 225vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.Count * 3)); 229vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 4))); 230vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 5))); 231vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 6))); 232vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 7))); 234vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.Count * 4)); 235vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.Count * 5)); 236vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.Count * 6)); 237vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.Count * 7)); 242xPtr += (uint)(Vector128<TInput>.Count * 8); 243dPtr += (uint)(Vector128<TOutput>.Count * 8); 245remainder -= (uint)(Vector128<TInput>.Count * 8); 250while (remainder >= (uint)(Vector128<TInput>.Count * 8)) 254vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 0))); 255vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 1))); 256vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 2))); 257vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 3))); 259vector1.Store(dPtr + (uint)(Vector128<TOutput>.Count * 0)); 260vector2.Store(dPtr + (uint)(Vector128<TOutput>.Count * 1)); 261vector3.Store(dPtr + (uint)(Vector128<TOutput>.Count * 2)); 262vector4.Store(dPtr + (uint)(Vector128<TOutput>.Count * 3)); 266vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 4))); 267vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 5))); 268vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 6))); 269vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 7))); 271vector1.Store(dPtr + (uint)(Vector128<TOutput>.Count * 4)); 272vector2.Store(dPtr + (uint)(Vector128<TOutput>.Count * 5)); 273vector3.Store(dPtr + (uint)(Vector128<TOutput>.Count * 6)); 274vector4.Store(dPtr + (uint)(Vector128<TOutput>.Count * 7)); 279xPtr += (uint)(Vector128<TInput>.Count * 8); 280dPtr += (uint)(Vector128<TOutput>.Count * 8); 282remainder -= (uint)(Vector128<TInput>.Count * 8); 301remainder = (remainder + (uint)(Vector128<TInput>.Count - 1)) & (nuint)(-Vector128<TInput>.Count); 303switch (remainder / (uint)Vector128<TInput>.Count) 307Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 8))); 308vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.Count * 8)); 314Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 7))); 315vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.Count * 7)); 321Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 6))); 322vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.Count * 6)); 328Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 5))); 329vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.Count * 5)); 335Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 4))); 336vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.Count * 4)); 342Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 3))); 343vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.Count * 3)); 349Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 2))); 350vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.Count * 2)); 357end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<TInput>.Count); 896Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.Count)); 899end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<TOutput>.Count); 1040Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.Count)); 1043end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<TOutput>.Count); 1137Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.Count)); 1140end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<TOutput>.Count); 1217Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.Count)); 1220end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<TOutput>.Count);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryTwoToOneOperator.cs (5)
115twoVectorsFromEnd = x.Length - (Vector128<TInput>.Count * 2); 123Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<TInput>.Count))).StoreUnsafe(ref destinationRef, (uint)i); 125i += Vector128<TInput>.Count * 2; 132i = x.Length - (Vector128<TInput>.Count * 2); 136Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<TInput>.Count))).StoreUnsafe(ref destinationRef, (uint)i);
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (10)
135if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 145int oneVectorFromEnd = x.Length - Vector128<T>.Count; 154i += Vector128<T>.Count; 164Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count)) & remainderMask, 165Vector128.LoadUnsafe(ref yRef, (uint)(x.Length - Vector128<T>.Count)) & remainderMask, 285if (Vector128.IsHardwareAccelerated && x.Length >= Vector128<short>.Count) 296int oneVectorFromEnd = x.Length - Vector128<short>.Count; 306i += Vector128<short>.Count; 316Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<short>.Count)) & remainderMask); 318Vector128.LoadUnsafe(ref yRef, (uint)(x.Length - Vector128<short>.Count)) & remainderMask);
System\Numerics\Tensors\netcore\TensorPrimitives.Half.cs (1)
307source.Length >= Vector128<short>.Count;
System\Numerics\Tensors\netcore\TensorPrimitives.HammingDistance.cs (5)
75if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 149int oneVectorFromEnd = x.Length - Vector128<T>.Count; 158i += Vector128<T>.Count; 165Vector128<T> xVec = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count)); 166Vector128<T> yVec = Vector128.LoadUnsafe(ref yRef, (uint)(x.Length - Vector128<T>.Count));
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (5)
271if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 291int oneVectorFromEnd = x.Length - Vector128<T>.Count; 292int i = Vector128<T>.Count; 311i += Vector128<T>.Count; 317current = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count));
System.Private.CoreLib (412)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (10)
122Debug.Assert(source.Length >= (Vector128<TChar>.Count / 2)); 138nuint lengthSubVector128 = (nuint)source.Length - (nuint)(Vector128<TChar>.Count / 2); 171pos += (nuint)(Vector128<TChar>.Count / 2); 192if ((AdvSimd.Arm64.IsSupported || Ssse3.IsSupported || PackedSimd.IsSupported) && (source.Length >= (Vector128<byte>.Count / 2))) 209if ((AdvSimd.Arm64.IsSupported || Ssse3.IsSupported || PackedSimd.IsSupported) && (source.Length >= (Vector128<ushort>.Count / 2))) 280(utf8Source.Length >= Vector128<byte>.Count)) 292(source.Length >= (Vector128<ushort>.Count * 2))) 314elementsReadPerIteration = Vector128<byte>.Count; 319elementsReadPerIteration = Vector128<ushort>.Count * 2; 350Vector128<ushort> vec2 = Vector128.LoadUnsafe(ref srcRef, offset + (nuint)Vector128<ushort>.Count).AsUInt16();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (4)
319while (i <= source.Length - Vector128<T>.Count) 322i += Vector128<T>.Count; 351while (i >= Vector128<T>.Count) 353i -= Vector128<T>.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (8)
257while (valuesAsBytes.Length >= Vector128<byte>.Count * 2) 263Vector128<byte> upperVector = Vector128.Create(valuesAsBytes.Slice(Vector128<byte>.Count)); 270i += (uint)Vector128<byte>.Count * 2u; 271valuesAsBytes = valuesAsBytes.Slice(Vector128<byte>.Count * 2); 884else if (Vector128.IsHardwareAccelerated && ((uint)_bitLength >= Vector128<byte>.Count * 2u)) 893for (; (i + Vector128<byte>.Count * 2u) <= (uint)_bitLength; i += (uint)Vector128<byte>.Count * 2u) 906normalizedHigher.Store((byte*)destination + i + Vector128<byte>.Count);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (5)
163if (!Vector128.IsHardwareAccelerated || length < Vector128<ushort>.Count) 376searchSpaceMinusValueTailLength >= Vector128<ushort>.Count) 528nint searchSpaceMinusValueTailLengthAndVector = searchSpaceMinusValueTailLength - (nint)Vector128<ushort>.Count; 532Debug.Assert(offset + ch1ch2Distance + Vector128<ushort>.Count <= source.Length); 547offset += Vector128<ushort>.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.Utf8.cs (12)
107Debug.Assert(lengthA >= Vector128<byte>.Count); 108Debug.Assert(lengthB >= Vector128<byte>.Count); 112nuint lengthToExamine = lengthU - (nuint)Vector128<byte>.Count; 134i += (nuint)Vector128<byte>.Count; 164if (!Vector128.IsHardwareAccelerated || (lengthA < Vector128<byte>.Count) || (lengthB < Vector128<byte>.Count)) 417Debug.Assert(sourceLength >= Vector128<byte>.Count); 418Debug.Assert(prefixLength >= Vector128<byte>.Count); 422nuint lengthToExamine = lengthU - (nuint)Vector128<byte>.Count; 444i += (nuint)Vector128<byte>.Count; 474if (!Vector128.IsHardwareAccelerated || (sourceLength < Vector128<byte>.Count) || (prefixLength < Vector128<byte>.Count))
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.MinMax.cs (9)
240if (!Vector128.IsHardwareAccelerated || !Vector128<T>.IsSupported || span.Length < Vector128<T>.Count) 261data = data.Slice(Vector128<T>.Count); 263while (data.Length > Vector128<T>.Count) 266data = data.Slice(Vector128<T>.Count); 268best128 = TMinMax.Compare(best, Vector128.Create(span.Slice(span.Length - Vector128<T>.Count))); 318if (Vector128<T>.Count == 16) 329else if (Vector128<T>.Count == 8) 338else if (Vector128<T>.Count == 4) 345Debug.Assert(Vector128<T>.Count == 2);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (19)
480Debug.Assert(Vector<double>.Count == Vector128<double>.Count); 503Debug.Assert(Vector<double>.Count == Vector128<double>.Count); 611Debug.Assert(Vector<float>.Count == Vector128<float>.Count); 774Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 820/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" /> is less than <see cref="Vector128{T}.Count" />.</exception> 893Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 948Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 972Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 996Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1020Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1044Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1068Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1101Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1125Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1157Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1711Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1949Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 2991Debug.Assert(Vector<uint>.Count == Vector128<uint>.Count); 3017Debug.Assert(Vector<ulong>.Count == Vector128<ulong>.Count);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128_1.cs (4)
68for (int i = 0; i < Count; i++) 432for (int i = 0; i < Count; i++) 456for (int i = 1; i < Count; i++) 475static int ISimdVector<Vector128<T>, T>.ElementCount => Vector128<T>.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (38)
651for (int i = 0; i < Vector128<float>.Count; i++) 743/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.Count" />.</exception> 751if (destination.Length < Vector128<T>.Count) 764/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.Count" />.</exception> 778if ((destination.Length - startIndex) < Vector128<T>.Count) 790/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.Count" />.</exception> 795if (destination.Length < Vector128<T>.Count) 1017/// <returns>A new <see cref="Vector128{T}" /> with its elements set to the first <see cref="Vector128{T}.Count" /> elements from <paramref name="values" />.</returns> 1018/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" /> is less than <see cref="Vector128{T}.Count" />.</exception> 1026if (values.Length < Vector128<T>.Count) 1038/// <returns>A new <see cref="Vector128{T}" /> with its elements set to the first <see cref="Vector128{T}.Count" /> elements from <paramref name="values" />.</returns> 1039/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" />, starting from <paramref name="index" />, is less than <see cref="Vector128{T}.Count" />.</exception> 1047if ((index < 0) || ((values.Length - index) < Vector128<T>.Count)) 1058/// <returns>A new <see cref="Vector128{T}" /> with its elements set to the first <see cref="Vector128{T}.Count" /> elements from <paramref name="values" />.</returns> 1059/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" /> is less than <see cref="Vector128{T}.Count" />.</exception> 1064if (values.Length < Vector128<T>.Count) 1588for (int index = 0; index < Vector128<T>.Count; index++) 1600for (int index = 1; index < Vector128<T>.Count; index++) 1967if ((uint)(index) >= (uint)(Vector128<T>.Count)) 2894for (int i = 0; i < Vector128<TSource>.Count; i++) 2900for (int i = Vector128<TSource>.Count; i < Vector128<TResult>.Count; i++) 2902TResult value = TResult.CreateTruncating(upper.GetElementUnsafe(i - Vector128<TSource>.Count)); 2991for (int i = 0; i < Vector128<TSource>.Count; i++) 2997for (int i = Vector128<TSource>.Count; i < Vector128<TResult>.Count; i++) 2999TResult value = TResult.CreateSaturating(upper.GetElementUnsafe(i - Vector128<TSource>.Count)); 3418Debug.Assert(Vector128<T>.Count == Vector128<TIndex>.Count); 3421for (int index = 0; index < Vector128<T>.Count; index++) 3425if ((uint)selectedIndex < (uint)Vector128<T>.Count) 3949/// <returns><c>true</c> if <paramref name="vector" /> was successfully copied to <paramref name="destination" />; otherwise, <c>false</c> if the length of <paramref name="destination" /> is less than <see cref="Vector128{T}.Count" />.</returns> 3954if (destination.Length < Vector128<T>.Count) 4239if ((uint)(index) >= (uint)(Vector128<T>.Count)) 4352Debug.Assert((index >= 0) && (index < Vector128<T>.Count)); 4363return (result != Vector128<T>.Count) ? result : -1; 4377return (Vector128<T>.Count - 1) - AdvSimdFixupBitCount<T>(BitOperations.LeadingZeroCount(AdvSimdExtractBitMask(vector))); 4388Debug.Assert((index >= 0) && (index < Vector128<T>.Count));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.Numerics.cs (2)
103Debug.Assert(Vector<T>.Count >= Vector128<T>.Count); 175Debug.Assert(Vector<T>.Count >= Vector128<T>.Count);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128DebugView_1.cs (12)
21var items = new byte[Vector128<byte>.Count]; 31var items = new double[Vector128<double>.Count]; 41var items = new short[Vector128<short>.Count]; 51var items = new int[Vector128<int>.Count]; 61var items = new long[Vector128<long>.Count]; 71var items = new nint[Vector128<nint>.Count]; 81var items = new nuint[Vector128<nuint>.Count]; 91var items = new sbyte[Vector128<sbyte>.Count]; 101var items = new float[Vector128<float>.Count]; 111var items = new ushort[Vector128<ushort>.Count]; 121var items = new uint[Vector128<uint>.Count]; 131var items = new ulong[Vector128<ulong>.Count];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (5)
1038/// <returns>A new <see cref="Vector256{T}" /> with its elements set to the first <see cref="Vector128{T}.Count" /> elements from <paramref name="values" />.</returns> 1717T upperStart = Scalar<T>.Add(start, Scalar<T>.Multiply(Scalar<T>.Convert(Vector128<T>.Count), step)); 1987result |= vector._upper.ExtractMostSignificantBits() << Vector128<T>.Count; 4281return result + ((result >= 0) ? Vector128<T>.Count : 0); 4298return result + Vector128<T>.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (1)
1012/// <returns>A new <see cref="Vector64{T}" /> with its elements set to the first <see cref="Vector128{T}.Count" /> elements from <paramref name="values" />.</returns>
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (49)
212Debug.Assert(searchSpaceLength >= Vector128<short>.Count); 239Debug.Assert(searchSpaceLength >= Vector128<short>.Count); 294if (searchSpaceLength < Vector128<ushort>.Count) 313if (Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 370if (!Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 379ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - (2 * Vector128<short>.Count)); 384Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 392currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.Count); 399Debug.Assert(searchSpaceLength >= Vector128<short>.Count, "We expect that the input is long enough for us to load a whole vector."); 401ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<short>.Count); 428if (searchSpaceLength < Vector128<ushort>.Count) 445if (Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 501if (!Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 509ref short twoVectorsAfterStart = ref Unsafe.Add(ref searchSpace, 2 * Vector128<short>.Count); 513currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, 2 * Vector128<short>.Count); 516Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 529Debug.Assert(searchSpaceLength >= Vector128<short>.Count, "We expect that the input is long enough for us to load a whole vector."); 531ref short oneVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<short>.Count); 534? ref Unsafe.Subtract(ref currentSearchSpace, Vector128<short>.Count) 598if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 628Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128."); 630ref byte halfVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.Count); 652if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 658ref byte vectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.Count); 670currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<byte>.Count); 723if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 753Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128."); 755ref byte halfVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 758? ref Unsafe.Subtract(ref currentSearchSpace, Vector128<byte>.Count) 777if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 783ref byte vectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 787currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector128<byte>.Count); 869if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 900Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128."); 902ref byte halfVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.Count); 926if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 933ref byte vectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.Count); 945currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<byte>.Count); 997if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 1028Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128."); 1030ref byte halfVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 1033? ref Unsafe.Subtract(ref currentSearchSpace, Vector128<byte>.Count) 1054if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 1061ref byte vectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 1065currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector128<byte>.Count); 1266if (offsetInVector < Vector128<short>.Count) 1272return offsetInVector - Vector128<short>.Count + (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref secondVector) / (nuint)sizeof(T)); 1517if (offsetInVector >= Vector128<short>.Count) 1521offsetInVector -= Vector128<short>.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (4)
227Vector128<ushort> source1 = Vector128.LoadUnsafe(ref searchSpace, (nuint)Vector128<ushort>.Count); 303return searchSpaceLength < Vector128<short>.Count 521Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.Count); 699Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.Count);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticWithAsciiCharSearchValues.cs (4)
44if (IndexOfAnyAsciiSearcher.IsVectorizationSupported && span.Length >= Vector128<short>.Count && char.IsAscii(span[0])) 105if (IndexOfAnyAsciiSearcher.IsVectorizationSupported && span.Length >= Vector128<short>.Count && char.IsAscii(span[0])) 141if (IndexOfAnyAsciiSearcher.IsVectorizationSupported && span.Length >= Vector128<short>.Count && char.IsAscii(span[^1])) 194if (IndexOfAnyAsciiSearcher.IsVectorizationSupported && span.Length >= Vector128<short>.Count && char.IsAscii(span[^1]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasick.cs (2)
94if (remainingLength >= Vector128<ushort>.Count) 206if (remainingLength >= Vector128<ushort>.Count)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyHelper.cs (1)
226Vector128<ushort> source1 = Vector128.LoadUnsafe(ref source, (nuint)Vector128<ushort>.Count);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesPackedThreeChars.cs (8)
185else if ((Sse2.IsSupported || AdvSimd.Arm64.IsSupported) && searchSpaceMinusValueTailLength - Vector128<byte>.Count >= 0) 191ref char lastSearchSpace = ref Unsafe.Add(ref searchSpace, searchSpaceMinusValueTailLength - Vector128<byte>.Count); 195ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<byte>.Count); 196ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<byte>.Count + (int)(_ch2ByteOffset / sizeof(char))); 197ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<byte>.Count + (int)(_ch3ByteOffset / sizeof(char))); 208searchSpace = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 212if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpace, Vector128<byte>.Count))) 396Vector128<ushort> input1 = Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref searchSpace, byteOffset + (uint)Vector128<byte>.Count));
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (7)
82if (!Vector128.IsHardwareAccelerated || searchSpaceMinusValueTailLength < Vector128<ushort>.Count) 191ref char lastSearchSpace = ref Unsafe.Add(ref searchSpace, searchSpaceMinusValueTailLength - Vector128<ushort>.Count); 195ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<ushort>.Count); 196ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<ushort>.Count + (int)(_ch2ByteOffset / sizeof(char))); 197ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<ushort>.Count + (int)(_ch3ByteOffset / sizeof(char))); 208searchSpace = ref Unsafe.Add(ref searchSpace, Vector128<ushort>.Count); 212if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpace, Vector128<ushort>.Count)))
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (34)
31if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<byte>.Count) 201searchSpaceMinusValueTailLength - (nint)Vector128<byte>.Count; 207Debug.Assert(offset + ch1ch2Distance + Vector128<byte>.Count <= searchSpaceLength); 220offset += Vector128<byte>.Count; 267if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<byte>.Count) 395offset = searchSpaceMinusValueTailLength - Vector128<byte>.Count; 434offset -= Vector128<byte>.Count; 435if (offset == -Vector128<byte>.Count) 537offset += (nuint)Vector128<byte>.Count; 617offset += (nuint)Vector128<byte>.Count; 650offset += (nuint)Vector128<byte>.Count; 690offset += (nuint)Vector128<byte>.Count; 721offset += (nuint)Vector128<byte>.Count; 883else if (length >= (nuint)Vector128<byte>.Count) 886nuint lengthToExamine = length - (nuint)Vector128<byte>.Count; 898offset += (nuint)Vector128<byte>.Count; 1060if (lengthToExamine >= (nuint)Vector128<byte>.Count) 1062lengthToExamine -= (nuint)Vector128<byte>.Count; 1099if (lengthToExamine >= (nuint)Vector128<byte>.Count) 1101lengthToExamine -= (nuint)Vector128<byte>.Count; 1107offset += (nuint)Vector128<byte>.Count; 1156if (!Vector128.IsHardwareAccelerated || length < (nuint)Vector128<byte>.Count) 1202Debug.Assert(length >= (uint)Vector128<byte>.Count); 1205nuint lengthToExamine = length - (nuint)Vector128<byte>.Count; 1222i += (nuint)Vector128<byte>.Count; 1282=> (nuint)(uint)((length - (int)offset) & ~(Vector128<byte>.Count - 1)); 1295nint unaligned = (nint)searchSpace & (Vector128<byte>.Count - 1); 1296return (nuint)(uint)((Vector128<byte>.Count - unaligned) & (Vector128<byte>.Count - 1)); 1391else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<byte>.Count * 2) 1393nint lastOffset = remainder - Vector128<byte>.Count; 1417offset += Vector128<byte>.Count; 1418lastOffset -= Vector128<byte>.Count; 1421remainder = lastOffset + Vector128<byte>.Count - offset;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (27)
33if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<ushort>.Count) 214searchSpaceMinusValueTailLength - (nint)Vector128<ushort>.Count; 219Debug.Assert(offset + ch1ch2Distance + Vector128<ushort>.Count <= searchSpaceLength); 232offset += Vector128<ushort>.Count; 280if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<ushort>.Count) 416offset = searchSpaceMinusValueTailLength - Vector128<ushort>.Count; 456offset -= Vector128<ushort>.Count; 457if (offset == -Vector128<ushort>.Count) 586Debug.Assert(length - offset >= Vector128<ushort>.Count); 606offset += Vector128<ushort>.Count; 699Debug.Assert(lengthToExamine >= Vector128<ushort>.Count); 708offset += Vector128<ushort>.Count; 730Debug.Assert(length - offset >= Vector128<ushort>.Count); 750offset += Vector128<ushort>.Count; 787Debug.Assert(lengthToExamine >= Vector128<ushort>.Count); 796offset += Vector128<ushort>.Count; 818Debug.Assert(length - offset >= Vector128<ushort>.Count); 825Debug.Assert(lengthToExamine >= Vector128<ushort>.Count); 834offset += Vector128<ushort>.Count; 835lengthToExamine -= Vector128<ushort>.Count; 871=> (length - offset) & ~(Vector128<ushort>.Count - 1); 885return (nint)(uint)(-(int)searchSpace / ElementsPerByte) & (Vector128<ushort>.Count - 1); 973else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<ushort>.Count * 2) 975nint lastOffset = remainder - Vector128<ushort>.Count; 999offset += Vector128<ushort>.Count; 1000lastOffset -= Vector128<ushort>.Count; 1003remainder = (lastOffset + Vector128<ushort>.Count - offset);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (10)
155else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<int>.Count * 2) 157nint lastOffset = remainder - Vector128<int>.Count; 179offset += Vector128<int>.Count; 180lastOffset -= Vector128<int>.Count; 183remainder = lastOffset + Vector128<int>.Count - offset; 260else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<long>.Count * 2) 262nint lastOffset = remainder - Vector128<long>.Count; 284offset += Vector128<long>.Count; 285lastOffset -= Vector128<long>.Count; 288remainder = lastOffset + Vector128<long>.Count - offset;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Packed.cs (32)
114if (length < Vector128<short>.Count) 259if (!Avx2.IsSupported && length > 2 * Vector128<short>.Count) 267ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector128<short>.Count)); 272Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 281currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.Count); 289ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<short>.Count); 318if (length < Vector128<short>.Count) 460if (!Avx2.IsSupported && length > 2 * Vector128<short>.Count) 468ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector128<short>.Count)); 473Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 483currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.Count); 491ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<short>.Count); 522if (length < Vector128<short>.Count) 674if (!Avx2.IsSupported && length > 2 * Vector128<short>.Count) 682ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector128<short>.Count)); 687Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 697currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.Count); 705ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<short>.Count); 736if (length < Vector128<short>.Count) 892if (!Avx2.IsSupported && length > 2 * Vector128<short>.Count) 900ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector128<short>.Count)); 905Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 915currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.Count); 923ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<short>.Count); 954if (length < Vector128<short>.Count) 1087if (!Avx2.IsSupported && length > 2 * Vector128<short>.Count) 1095ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector128<short>.Count)); 1100Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 1110currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.Count); 1118ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<short>.Count); 1260if (offsetInVector >= Vector128<short>.Count) 1264offsetInVector -= Vector128<short>.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (49)
1477if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 1592ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<T>.Count)); 1600currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<T>.Count); 1609if ((uint)length % Vector128<T>.Count != 0) 1664if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 1811ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 1819currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 1828if ((uint)length % Vector128<TValue>.Count != 0) 1898if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2077ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 2086currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 2095if ((uint)length % Vector128<TValue>.Count != 0) 2139if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2318ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 2327currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 2336if ((uint)length % Vector128<TValue>.Count != 0) 2365if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2489ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 2499currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 2508if ((uint)length % Vector128<TValue>.Count != 0) 2538if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2665ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<TValue>.Count)); 2675currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 2684if ((uint)length % Vector128<TValue>.Count != 0) 2714if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2858if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3032nint offset = length - Vector128<TValue>.Count; 3041offset -= Vector128<TValue>.Count; 3075if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3247nint offset = length - Vector128<TValue>.Count; 3257offset -= Vector128<TValue>.Count; 3292if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3404nint offset = length - Vector128<TValue>.Count; 3413offset -= Vector128<TValue>.Count; 3456if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<T>.Count) 3472nuint lastVectorIndex = length - (uint)Vector128<T>.Count; 3484idx += (uint)Vector128<T>.Count; 3564if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3680nint offset = length - Vector128<TValue>.Count; 3691offset -= Vector128<TValue>.Count; 3889if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 3908ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<T>.Count)); 3919current = ref Unsafe.Add(ref current, Vector128<T>.Count); 4036if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 4054nint offset = length - Vector128<T>.Count; 4065offset -= Vector128<T>.Count; 4171if (Vector128.IsHardwareAccelerated && length >= Vector128<T>.Count) 4206ref T oneVectorAwayFromEnd = ref Unsafe.Subtract(ref end, Vector128<T>.Count); 4210current = ref Unsafe.Add(ref current, Vector128<T>.Count);
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (17)
1333else if (Vector128.IsHardwareAccelerated && length >= (uint)Vector128<ushort>.Count) 1335nuint adjust = (length - remainingLength) & ((uint)Vector128<ushort>.Count - 1); 2081if (Vector128.IsHardwareAccelerated && source.Length >= Vector128<ushort>.Count * 2) 2122Debug.Assert(sourceSpan.Length >= Vector128<ushort>.Count*2); 2332while ((uint)remaining.Length >= (uint)Vector128<ushort>.Count*2) 2335Vector128<ushort> vector2 = Vector128.Create(remaining.Slice(Vector128<ushort>.Count)); 2356sepListBuilder.Append(baseIndex + (int)bitPos + Vector128<ushort>.Count); 2363baseIndex += Vector128<ushort>.Count*2; 2364remaining = remaining.Slice(Vector128<ushort>.Count*2); 2369baseIndex += Vector128<ushort>.Count*2; 2370remaining = remaining.Slice(Vector128<ushort>.Count*2); 2374while ((uint)remaining.Length >= (uint)Vector128<ushort>.Count) 2391baseIndex += Vector128<ushort>.Count; 2392remaining = remaining.Slice(Vector128<ushort>.Count); 2399Vector128<ushort> vector = Vector128.Create(sourceSpanUInt16.Slice(sourceSpanUInt16.Length - Vector128<ushort>.Count)); 2401int finalIndex = sourceSpanUInt16.Length - Vector128<ushort>.Count; 2402uint mask = cmp.ExtractMostSignificantBits() & 0x5555 & ~((1u << (Vector128<byte>.Count - remaining.Length * sizeof(char))) - 1);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.cs (18)
52if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 109if (length <= 2 * Vector128<T>.Count) 113Vector128.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, Vector128<T>.Count))); 179if (length > 4 * Vector128<T>.Count) 184Vector128.LoadUnsafe(ref searchSpace, (nuint)Vector128<T>.Count) | 185Vector128.LoadUnsafe(ref searchSpace, 2 * (nuint)Vector128<T>.Count) | 186Vector128.LoadUnsafe(ref searchSpace, 3 * (nuint)Vector128<T>.Count))) 191nuint i = 4 * (nuint)Vector128<T>.Count; 196nuint misalignedElements = Unsafe.OpportunisticMisalignment(ref searchSpace, (uint)Vector128<byte>.Count) / (nuint)sizeof(T); 198Debug.Assert((int)i > 3 * Vector128<T>.Count); 200nuint finalStart = (nuint)length - 4 * (nuint)Vector128<T>.Count; 202for (; i < finalStart; i += 4 * (nuint)Vector128<T>.Count) 208Vector128.LoadUnsafe(ref current, (nuint)Vector128<T>.Count) | 209Vector128.LoadUnsafe(ref current, 2 * (nuint)Vector128<T>.Count) | 210Vector128.LoadUnsafe(ref current, 3 * (nuint)Vector128<T>.Count))) 224Vector128.LoadUnsafe(ref searchSpace, (nuint)Vector128<T>.Count) | 225Vector128.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, 2 * Vector128<T>.Count)) | 226Vector128.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, Vector128<T>.Count)));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (12)
52if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<TRight>.Count) 128ref TLeft oneVectorAwayFromLeftEnd = ref Unsafe.Add(ref currentLeftSearchSpace, length - (uint)Vector128<TRight>.Count); 130ref TRight oneVectorAwayFromRightEnd = ref Unsafe.Add(ref currentRightSearchSpace, length - (uint)Vector128<TRight>.Count); 147currentRightSearchSpace = ref Unsafe.Add(ref currentRightSearchSpace, (uint)Vector128<TRight>.Count); 148currentLeftSearchSpace = ref Unsafe.Add(ref currentLeftSearchSpace, (uint)Vector128<TRight>.Count); 153if (length % (uint)Vector128<TRight>.Count != 0) 206if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<TRight>.Count) 381ref TLeft oneVectorAwayFromLeftEnd = ref Unsafe.Add(ref currentLeftSearchSpace, length - (uint)Vector128<TRight>.Count); 383ref TRight oneVectorAwayFromRightEnd = ref Unsafe.Add(ref currentRightSearchSpace, length - (uint)Vector128<TRight>.Count); 419currentRightSearchSpace = ref Unsafe.Add(ref currentRightSearchSpace, (uint)Vector128<TRight>.Count); 420currentLeftSearchSpace = ref Unsafe.Add(ref currentLeftSearchSpace, (uint)Vector128<TRight>.Count); 425if (length % (uint)Vector128<TRight>.Count != 0)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (6)
216else if (Vector128.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector128<byte>.Count) 839else if (Vector128.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector128<ushort>.Count) 1354if (BitConverter.IsLittleEndian && Vector128.IsHardwareAccelerated && elementCount >= 2 * (uint)Vector128<byte>.Count) 1719uint SizeOfVector128 = (uint)Vector128<byte>.Count; 2078if (BitConverter.IsLittleEndian && Vector128.IsHardwareAccelerated && elementCount >= (uint)Vector128<byte>.Count) 2088else if (Vector128.IsHardwareAccelerated && (elementCount - currentOffset) >= (uint)Vector128<byte>.Count)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (3)
113if (inputLength >= Vector128<ushort>.Count) 120char* pHighestAddressWhereCanReadOneVector = pEndOfInputBuffer - Vector128<ushort>.Count; 249pInputBuffer += Vector128<ushort>.Count;
System.Runtime.Numerics (9)
System\Numerics\BigIntegerCalculator.ShiftRot.cs (7)
183while (Vector128.IsHardwareAccelerated && offset >= Vector128<nuint>.Count + 1) 185Vector128<nuint> current = Vector128.LoadUnsafe(ref start, (nuint)(offset - Vector128<nuint>.Count)) << shift; 186Vector128<nuint> carries = Vector128.LoadUnsafe(ref start, (nuint)(offset - (Vector128<nuint>.Count + 1))) >> back; 190Vector128.StoreUnsafe(newValue, ref start, (nuint)(offset - Vector128<nuint>.Count)); 191offset -= Vector128<nuint>.Count; 252while (Vector128.IsHardwareAccelerated && remaining.Length >= Vector128<nuint>.Count + 1) 260remaining = remaining.Slice(Vector128<nuint>.Count);
System\Numerics\NumericsHelpers.cs (2)
94while (Vector128.IsHardwareAccelerated && d.Length >= Vector128<nuint>.Count) 98d = d.Slice(Vector128<nuint>.Count);