1320 references to Count
GenerateDocumentationAndConfigFiles (24)
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.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\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 (48)
System\IO\Hashing\Crc32.Vectorized.cs (12)
23&& source.Length >= Vector128<byte>.Count * (System.Runtime.Intrinsics.Arm.Crc32.IsSupported ? 8 : 1); 49if (length >= Vector128<byte>.Count * 8) 56srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count * 4); 57length -= Vector128<byte>.Count * 4; 77srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count * 4); 78length -= Vector128<byte>.Count * 4; 79} while (length >= Vector128<byte>.Count * 4); 95srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count); 96length -= Vector128<byte>.Count; 100while (length >= Vector128<byte>.Count) 105srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count); 106length -= Vector128<byte>.Count;
System\IO\Hashing\Crc64.Vectorized.cs (12)
37private static bool CanBeVectorized(ReadOnlySpan<byte> source) => VectorHelper.IsSupported && source.Length >= Vector128<byte>.Count; 62if (length >= Vector128<byte>.Count * 16) // At least 256 bytes 74srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count * 8); 75length -= Vector128<byte>.Count * 8; 107srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count * 8); 108length -= Vector128<byte>.Count * 8; 109} while (length >= Vector128<byte>.Count * 8); 132srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count); 133length -= Vector128<byte>.Count; 137while (length >= Vector128<byte>.Count) 142srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count); 143length -= Vector128<byte>.Count;
System\IO\Hashing\XxHashShared.cs (24)
494for (int i = 0; i < SecretLengthBytes; i += Vector128<byte>.Count) 553Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 554Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 555Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 564source += Vector128<byte>.Count; 566secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 568source += Vector128<byte>.Count; 570secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 572source += Vector128<byte>.Count; 574secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 576source += Vector128<byte>.Count; 584acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 585acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 586acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 591Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 592Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 593Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 638for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 643accumulators += Vector128<ulong>.Count; 644secret += Vector128<byte>.Count; 645source += Vector128<byte>.Count; 731for (int i = 0; i < AccumulatorCount / Vector128<ulong>.Count; i++) 736accumulators += Vector128<ulong>.Count; 737secret += Vector128<byte>.Count;
System.Linq (5)
System\Linq\MaxMin.cs (5)
40if (!Vector128.IsHardwareAccelerated || !Vector128<T>.IsSupported || span.Length < Vector128<T>.Count) 54ref T lastVectorStart = ref Unsafe.Add(ref current, span.Length - Vector128<T>.Count); 57current = ref Unsafe.Add(ref current, Vector128<T>.Count); 62current = ref Unsafe.Add(ref current, Vector128<T>.Count); 67for (int i = 1; i < Vector128<T>.Count; i++)
System.Numerics.Tensors (767)
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)
158oneVectorFromEnd = x.Length - Vector128<T>.Count; 169i += Vector128<T>.Count; 175TAnyAll.ShouldEarlyExit(TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count))))) 298int vectorFromEnd = x.Length - Vector128<T>.Count; 305i += Vector128<T>.Count; 312i = x.Length - Vector128<T>.Count; 412int vectorsFromEnd = x.Length - (Vector128<T>.Count * sizeof(T)); 419i += Vector128<T>.Count * sizeof(T); 426i = x.Length - (Vector128<T>.Count * sizeof(T)); 437TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt16()); 537int vectorsFromEnd = x.Length - (Vector128<T>.Count * sizeof(T)); 544i += Vector128<T>.Count * sizeof(T); 551i = x.Length - (Vector128<T>.Count * sizeof(T)); 563TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt32()), 565TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector128<T>.Count)))).AsUInt32(), 566TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector128<T>.Count)))).AsUInt32())); 686int vectorsFromEnd = x.Length - (Vector128<T>.Count * sizeof(T)); 693i += Vector128<T>.Count * sizeof(T); 700i = x.Length - (Vector128<T>.Count * sizeof(T)); 713TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt64()), 715TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector128<T>.Count)))).AsUInt64(), 716TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector128<T>.Count)))).AsUInt64())), 719TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (4 * Vector128<T>.Count)))).AsUInt64(), 720TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (5 * Vector128<T>.Count)))).AsUInt64()), 722TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (6 * Vector128<T>.Count)))).AsUInt64(), 723TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (7 * Vector128<T>.Count)))).AsUInt64())));
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.IndexOfMax.cs (6)
330if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 355Vector128<T> increment = CreateVector128T(Vector128<T>.Count); 372int oneVectorFromEnd = x.Length - Vector128<T>.Count; 373int i = Vector128<T>.Count; 393i += Vector128<T>.Count; 399current = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count));
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (5)
538if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 558int oneVectorFromEnd = x.Length - Vector128<T>.Count; 559int i = Vector128<T>.Count; 578i += Vector128<T>.Count; 584current = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count));
System.Private.CoreLib (402)
src\libraries\Common\src\System\HexConverter.cs (10)
120Debug.Assert(source.Length >= (Vector128<TChar>.Count / 2)); 136nuint lengthSubVector128 = (nuint)source.Length - (nuint)(Vector128<TChar>.Count / 2); 169pos += (nuint)(Vector128<TChar>.Count / 2); 190if ((AdvSimd.Arm64.IsSupported || Ssse3.IsSupported) && (source.Length >= (Vector128<byte>.Count / 2))) 207if ((AdvSimd.Arm64.IsSupported || Ssse3.IsSupported) && (source.Length >= (Vector128<ushort>.Count / 2))) 285(utf8Source.Length >= Vector128<byte>.Count)) 297(source.Length >= (Vector128<ushort>.Count * 2))) 319elementsReadPerIteration = Vector128<byte>.Count; 324elementsReadPerIteration = Vector128<ushort>.Count * 2; 355Vector128<ushort> vec2 = Vector128.LoadUnsafe(ref srcRef, offset + (nuint)Vector128<ushort>.Count).AsUInt16();
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\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (1)
405utf16HighVector.Store(dest + Vector128<ushort>.Count);
src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (13)
196for (; i <= (uint)values.Length - Vector128<byte>.Count * 2u; i += (uint)Vector128<byte>.Count * 2u) 202Vector128<byte> upperVector = Vector128.LoadUnsafe(ref value, i + (uint)Vector128<byte>.Count); 788else if (Ssse3.IsSupported && ((uint)_bitLength >= Vector128<byte>.Count * 2u)) 797for (; (i + Vector128<byte>.Count * 2u) <= (uint)_bitLength; i += (uint)Vector128<byte>.Count * 2u) 810Sse2.Store((byte*)destination + i + Vector128<byte>.Count, normalizedHigher); 814else if (PackedSimd.IsSupported && ((uint)_bitLength >= Vector128<byte>.Count * 2u)) 823for (; (i + Vector128<byte>.Count * 2u) <= (uint)_bitLength; i += (uint)Vector128<byte>.Count * 2u) 836PackedSimd.Store((byte*)destination + i + Vector128<byte>.Count, normalizedHigher); 847for (; (i + Vector128<byte>.Count * 2u) <= (uint)_bitLength; i += (uint)Vector128<byte>.Count * 2u)
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (5)
162if (!Vector128.IsHardwareAccelerated || length < Vector128<ushort>.Count) 375searchSpaceMinusValueTailLength >= Vector128<ushort>.Count) 527nint searchSpaceMinusValueTailLengthAndVector = searchSpaceMinusValueTailLength - (nint)Vector128<ushort>.Count; 531Debug.Assert(offset + ch1ch2Distance + Vector128<ushort>.Count <= source.Length); 546offset += Vector128<ushort>.Count;
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\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (9)
484Debug.Assert(Vector<double>.Count == Vector128<double>.Count); 507Debug.Assert(Vector<double>.Count == Vector128<double>.Count); 615Debug.Assert(Vector<float>.Count == Vector128<float>.Count); 782Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 828/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" /> is less than <see cref="Vector128{T}.Count" />.</exception> 1439Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1685Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 2736Debug.Assert(Vector<uint>.Count == Vector128<uint>.Count); 2762Debug.Assert(Vector<ulong>.Count == Vector128<ulong>.Count);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (50)
653for (int i = 0; i < Vector128<float>.Count; i++) 749/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.Count" />.</exception> 757if (destination.Length < Vector128<T>.Count) 770/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.Count" />.</exception> 784if ((destination.Length - startIndex) < Vector128<T>.Count) 796/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.Count" />.</exception> 801if (destination.Length < Vector128<T>.Count) 976/// <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> 977/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" /> is less than <see cref="Vector128{T}.Count" />.</exception> 985if (values.Length < Vector128<T>.Count) 997/// <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> 998/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" />, starting from <paramref name="index" />, is less than <see cref="Vector128{T}.Count" />.</exception> 1006if ((index < 0) || ((values.Length - index) < 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> 1023if (values.Length < Vector128<T>.Count) 1769if ((uint)(index) >= (uint)(Vector128<T>.Count)) 2708for (int i = 0; i < Vector128<TSource>.Count; i++) 2714for (int i = Vector128<TSource>.Count; i < Vector128<TResult>.Count; i++) 2716TResult value = TResult.CreateTruncating(upper.GetElementUnsafe(i - Vector128<TSource>.Count)); 2805for (int i = 0; i < Vector128<TSource>.Count; i++) 2811for (int i = Vector128<TSource>.Count; i < Vector128<TResult>.Count; i++) 2813TResult value = TResult.CreateSaturating(upper.GetElementUnsafe(i - Vector128<TSource>.Count)); 3325for (int index = 0; index < Vector128<byte>.Count; index++) 3330if (selectedIndex < Vector128<byte>.Count) 3370for (int index = 0; index < Vector128<sbyte>.Count; index++) 3375if (selectedIndex < Vector128<sbyte>.Count) 3447for (int index = 0; index < Vector128<short>.Count; index++) 3452if (selectedIndex < Vector128<short>.Count) 3472for (int index = 0; index < Vector128<ushort>.Count; index++) 3477if (selectedIndex < Vector128<ushort>.Count) 3535for (int index = 0; index < Vector128<int>.Count; index++) 3540if (selectedIndex < Vector128<int>.Count) 3560for (int index = 0; index < Vector128<uint>.Count; index++) 3565if (selectedIndex < Vector128<uint>.Count) 3584for (int index = 0; index < Vector128<float>.Count; index++) 3589if (selectedIndex < Vector128<float>.Count) 3666for (int index = 0; index < Vector128<long>.Count; index++) 3671if (selectedIndex < (uint)Vector128<long>.Count) 3691for (int index = 0; index < Vector128<ulong>.Count; index++) 3696if (selectedIndex < (uint)Vector128<ulong>.Count) 3715for (int index = 0; index < Vector128<double>.Count; index++) 3720if (selectedIndex < (uint)Vector128<double>.Count) 4111/// <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> 4116if (destination.Length < Vector128<T>.Count) 4401if ((uint)(index) >= (uint)(Vector128<T>.Count)) 4457Debug.Assert((index >= 0) && (index < Vector128<T>.Count)); 4465Debug.Assert((index >= 0) && (index < Vector128<T>.Count));
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\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\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\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (2)
1004/// <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> 1773result |= vector._upper.ExtractMostSignificantBits() << Vector128<T>.Count;
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (1)
977/// <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\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (49)
211Debug.Assert(searchSpaceLength >= Vector128<short>.Count); 238Debug.Assert(searchSpaceLength >= Vector128<short>.Count); 293if (searchSpaceLength < Vector128<ushort>.Count) 312if (Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 369if (!Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 378ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - (2 * Vector128<short>.Count)); 383Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 391currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.Count); 398Debug.Assert(searchSpaceLength >= Vector128<short>.Count, "We expect that the input is long enough for us to load a whole vector."); 400ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<short>.Count); 427if (searchSpaceLength < Vector128<ushort>.Count) 444if (Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 500if (!Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 508ref short twoVectorsAfterStart = ref Unsafe.Add(ref searchSpace, 2 * Vector128<short>.Count); 512currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, 2 * Vector128<short>.Count); 515Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 528Debug.Assert(searchSpaceLength >= Vector128<short>.Count, "We expect that the input is long enough for us to load a whole vector."); 530ref short oneVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<short>.Count); 533? ref Unsafe.Subtract(ref currentSearchSpace, Vector128<short>.Count) 597if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 627Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128."); 629ref byte halfVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.Count); 651if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 657ref byte vectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.Count); 669currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<byte>.Count); 722if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 752Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128."); 754ref byte halfVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 757? ref Unsafe.Subtract(ref currentSearchSpace, Vector128<byte>.Count) 776if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 782ref byte vectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 786currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector128<byte>.Count); 868if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 899Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128."); 901ref byte halfVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.Count); 925if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 932ref byte vectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.Count); 944currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<byte>.Count); 996if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 1027Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128."); 1029ref byte halfVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 1032? ref Unsafe.Subtract(ref currentSearchSpace, Vector128<byte>.Count) 1053if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 1060ref byte vectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 1064currentSearchSpace = 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)); 1495if (offsetInVector >= Vector128<short>.Count) 1499offsetInVector -= Vector128<short>.Count;
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (4)
226Vector128<ushort> source1 = Vector128.LoadUnsafe(ref searchSpace, (nuint)Vector128<ushort>.Count); 297return searchSpaceLength < Vector128<short>.Count 514Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.Count); 691Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.Count);
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\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasick.cs (2)
94if (remainingLength >= Vector128<ushort>.Count) 206if (remainingLength >= Vector128<ushort>.Count)
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyHelper.cs (1)
222Vector128<ushort> source1 = Vector128.LoadUnsafe(ref source, (nuint)Vector128<ushort>.Count);
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\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\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\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (27)
32if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<ushort>.Count) 213searchSpaceMinusValueTailLength - (nint)Vector128<ushort>.Count; 218Debug.Assert(offset + ch1ch2Distance + Vector128<ushort>.Count <= searchSpaceLength); 231offset += Vector128<ushort>.Count; 279if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<ushort>.Count) 415offset = searchSpaceMinusValueTailLength - Vector128<ushort>.Count; 455offset -= Vector128<ushort>.Count; 456if (offset == -Vector128<ushort>.Count) 585Debug.Assert(length - offset >= Vector128<ushort>.Count); 605offset += Vector128<ushort>.Count; 698Debug.Assert(lengthToExamine >= Vector128<ushort>.Count); 707offset += Vector128<ushort>.Count; 729Debug.Assert(length - offset >= Vector128<ushort>.Count); 749offset += Vector128<ushort>.Count; 786Debug.Assert(lengthToExamine >= Vector128<ushort>.Count); 795offset += Vector128<ushort>.Count; 817Debug.Assert(length - offset >= Vector128<ushort>.Count); 824Debug.Assert(lengthToExamine >= Vector128<ushort>.Count); 833offset += Vector128<ushort>.Count; 834lengthToExamine -= Vector128<ushort>.Count; 870=> (length - offset) & ~(Vector128<ushort>.Count - 1); 884return (nint)(uint)(-(int)searchSpace / ElementsPerByte) & (Vector128<ushort>.Count - 1); 972else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<ushort>.Count * 2) 974nint lastOffset = remainder - Vector128<ushort>.Count; 998offset += Vector128<ushort>.Count; 999lastOffset -= Vector128<ushort>.Count; 1002remainder = (lastOffset + Vector128<ushort>.Count - offset);
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\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\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (49)
1321if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 1433ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<T>.Count)); 1441currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<T>.Count); 1450if ((uint)length % Vector128<T>.Count != 0) 1501if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 1624ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 1632currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 1641if ((uint)length % Vector128<TValue>.Count != 0) 1707if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 1852ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 1861currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 1870if ((uint)length % Vector128<TValue>.Count != 0) 1914if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2059ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 2068currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 2077if ((uint)length % Vector128<TValue>.Count != 0) 2106if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2219ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 2229currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 2238if ((uint)length % Vector128<TValue>.Count != 0) 2268if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2385ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<TValue>.Count)); 2395currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 2404if ((uint)length % Vector128<TValue>.Count != 0) 2434if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2554if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2694nint offset = length - Vector128<TValue>.Count; 2703offset -= Vector128<TValue>.Count; 2739if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2879nint offset = length - Vector128<TValue>.Count; 2889offset -= Vector128<TValue>.Count; 2925if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3029nint offset = length - Vector128<TValue>.Count; 3039offset -= Vector128<TValue>.Count; 3084if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<T>.Count) 3100nuint lastVectorIndex = length - (uint)Vector128<T>.Count; 3112idx += (uint)Vector128<T>.Count; 3192if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3292nint offset = length - Vector128<TValue>.Count; 3303offset -= Vector128<TValue>.Count; 3501if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 3520ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<T>.Count)); 3531current = ref Unsafe.Add(ref current, Vector128<T>.Count); 3648if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 3666nint offset = length - Vector128<T>.Count; 3677offset -= Vector128<T>.Count; 3783if (Vector128.IsHardwareAccelerated && length >= Vector128<T>.Count) 3818ref T oneVectorAwayFromEnd = ref Unsafe.Subtract(ref end, Vector128<T>.Count); 3822current = ref Unsafe.Add(ref current, Vector128<T>.Count);
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (6)
1314else if (Vector128.IsHardwareAccelerated && length >= (uint)Vector128<ushort>.Count) 1316nuint adjust = (length - remainingLength) & ((uint)Vector128<ushort>.Count - 1); 1997if (Vector128.IsHardwareAccelerated && source.Length >= Vector128<ushort>.Count * 2) 2038Debug.Assert(sourceSpan.Length >= Vector128<ushort>.Count); 2127offset += (nuint)Vector128<ushort>.Count; 2128} while (offset <= lengthToExamine - (nuint)Vector128<ushort>.Count);
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\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (10)
52if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<TLeft>.Count) 130ref TRight oneVectorAwayFromRightEnd = ref Unsafe.Add(ref currentRightSearchSpace, length - (uint)Vector128<TRight>.Count); 147currentRightSearchSpace = ref Unsafe.Add(ref currentRightSearchSpace, (uint)Vector128<TRight>.Count); 153if (length % (uint)Vector128<TRight>.Count != 0) 206if (!Vector128.IsHardwareAccelerated || 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); 425if (length % (uint)Vector128<TRight>.Count != 0) 471public static nuint Count128 => (uint)Vector128<T>.Count; 511public static nuint Count256 => (uint)Vector128<byte>.Count;
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (6)
215else if (Vector128.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector128<byte>.Count) 835else if (Vector128.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector128<ushort>.Count) 1350if (BitConverter.IsLittleEndian && Vector128.IsHardwareAccelerated && elementCount >= 2 * (uint)Vector128<byte>.Count) 1714uint SizeOfVector128 = (uint)Vector128<byte>.Count; 2073if (BitConverter.IsLittleEndian && Vector128.IsHardwareAccelerated && elementCount >= (uint)Vector128<byte>.Count) 2083else if (Vector128.IsHardwareAccelerated && (elementCount - currentOffset) >= (uint)Vector128<byte>.Count)
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (10)
68if (inputLength >= Vector128<ushort>.Count) 74char* pHighestAddressWhereCanReadOneVector = pEndOfInputBuffer - Vector128<ushort>.Count; 81pInputBuffer += Vector128<ushort>.Count; // eagerly bump this now in preparation for next loop, will adjust later if necessary 258pInputBuffer -= Vector128<ushort>.Count; 263if (inputLength >= Vector128<ushort>.Count) 270char* pHighestAddressWhereCanReadOneVector = pEndOfInputBuffer - Vector128<ushort>.Count; 299for (int i = 0; i < Vector128<nuint>.Count; i++) 342for (int i = 0; i < Vector128<ushort>.Count - 1; i++) 351if (highSurrogateChars[Vector128<ushort>.Count - 1] != 0) 376pInputBuffer += Vector128<ushort>.Count;
System.Runtime.Numerics (2)
System\Numerics\NumericsHelpers.cs (2)
143while (Vector128.IsHardwareAccelerated && d.Length - offset >= Vector128<uint>.Count) 147offset += Vector128<uint>.Count;
Test.Utilities (24)
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;