src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.Utf8.cs (8)
145return EqualsIgnoreCaseUtf8_Scalar(ref Unsafe.Add(ref charA, i), (int)(lengthU - i), ref Unsafe.Add(ref charB, i), (int)(lengthU - i));
156ref Unsafe.Add(ref charA, i), lengthA - (int)i,
157ref Unsafe.Add(ref charB, i), lengthB - (int)i
455return StartsWithIgnoreCaseUtf8_Scalar(ref Unsafe.Add(ref source, i), (int)(lengthU - i), ref Unsafe.Add(ref prefix, i), (int)(lengthU - i));
466ref Unsafe.Add(ref source, i), sourceLength - (int)i,
467ref Unsafe.Add(ref prefix, i), prefixLength - (int)i
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (74)
1485if (Unsafe.Add(ref searchSpace, offset) == value
1486|| Unsafe.Add(ref searchSpace, offset + 1) == value
1487|| Unsafe.Add(ref searchSpace, offset + 2) == value
1488|| Unsafe.Add(ref searchSpace, offset + 3) == value
1489|| Unsafe.Add(ref searchSpace, offset + 4) == value
1490|| Unsafe.Add(ref searchSpace, offset + 5) == value
1491|| Unsafe.Add(ref searchSpace, offset + 6) == value
1492|| Unsafe.Add(ref searchSpace, offset + 7) == value)
1504if (Unsafe.Add(ref searchSpace, offset) == value
1505|| Unsafe.Add(ref searchSpace, offset + 1) == value
1506|| Unsafe.Add(ref searchSpace, offset + 2) == value
1507|| Unsafe.Add(ref searchSpace, offset + 3) == value)
1519if (Unsafe.Add(ref searchSpace, offset) == value)
1531ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector512<T>.Count));
1562ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector256<T>.Count));
1592ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<T>.Count));
1672if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset) == value))
1676if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset + 1) == value))
1680if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset + 2) == value))
1684if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset + 3) == value))
1688if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset + 4) == value))
1692if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset + 5) == value))
1696if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset + 6) == value))
1700if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset + 7) == value))
1712if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset) == value))
1716if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset + 1) == value))
1720if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset + 2) == value))
1724if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset + 3) == value))
1736if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset) == value))
1909ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
1966ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
1998lookUp = Unsafe.Add(ref searchSpace, offset);
2150ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
2207ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
2239lookUp = Unsafe.Add(ref searchSpace, offset);
2374ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
2406lookUp = Unsafe.Add(ref searchSpace, offset);
2547ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
2579lookUp = Unsafe.Add(ref searchSpace, offset);
2595ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector512<TValue>.Count));
2630ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector256<TValue>.Count));
2665ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<TValue>.Count));
2722if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset) == value))
2726if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset - 1) == value))
2730if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset - 2) == value))
2734if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset - 3) == value))
2738if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset - 4) == value))
2742if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset - 5) == value))
2746if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset - 6) == value))
2750if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset - 7) == value))
2762if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset) == value))
2766if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset - 1) == value))
2770if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset - 2) == value))
2774if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset - 3) == value))
2786if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset) == value))
2869ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
2926ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
2958lookUp = Unsafe.Add(ref searchSpace, offset);
3086ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
3143ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
3175lookUp = Unsafe.Add(ref searchSpace, offset);
3301ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
3333lookUp = Unsafe.Add(ref searchSpace, offset);
3440T original = Unsafe.Add(ref src, idx);
3441Unsafe.Add(ref dst, idx) = oldValue.Equals(original) ? newValue : original;
3448T original = Unsafe.Add(ref src, idx);
3449Unsafe.Add(ref dst, idx) = original is null ? newValue : original;
3460T original = Unsafe.Add(ref src, idx);
3461Unsafe.Add(ref dst, idx) = EqualityComparer<T>.Default.Equals(original, oldValue) ? newValue : original;
3573ref TValue current = ref Unsafe.Add(ref searchSpace, offset);
3605lookUp = Unsafe.Add(ref searchSpace, offset);
3908ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<T>.Count));
3937ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector256<T>.Count));
3966ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector512<T>.Count));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.cs (9)
70? (Unsafe.BitCast<T, byte>(Unsafe.Add(ref searchSpace, j)) > 127)
71: (Unsafe.BitCast<T, char>(Unsafe.Add(ref searchSpace, j)) > 127))
90Unsafe.ReadUnaligned<ulong>(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref searchSpace, i))) |
91Unsafe.ReadUnaligned<ulong>(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref searchSpace, i + elementsPerUlong)))))
102Unsafe.ReadUnaligned<ulong>(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref searchSpace, i))) |
152ref T current = ref Unsafe.Add(ref searchSpace, i);
164searchSpace = ref Unsafe.Add(ref searchSpace, finalStart);
204ref T current = ref Unsafe.Add(ref searchSpace, i);
216searchSpace = ref Unsafe.Add(ref searchSpace, finalStart);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (24)
56uint valueA = uint.CreateTruncating(Unsafe.Add(ref left, i));
57uint valueB = uint.CreateTruncating(Unsafe.Add(ref right, i));
73ref TRight oneVectorAwayFromRightEnd = ref Unsafe.Add(ref currentRightSearchSpace, length - (uint)Vector512<TLeft>.Count);
91ref TLeft oneVectorAwayFromLeftEnd = ref Unsafe.Add(ref left, length - (uint)Vector512<TLeft>.Count);
103ref TRight oneVectorAwayFromRightEnd = ref Unsafe.Add(ref currentRightSearchSpace, length - (uint)Vector256<TLeft>.Count);
121ref TLeft oneVectorAwayFromLeftEnd = ref Unsafe.Add(ref left, length - (uint)Vector256<TLeft>.Count);
128ref TLeft oneVectorAwayFromLeftEnd = ref Unsafe.Add(ref currentLeftSearchSpace, length - (uint)Vector128<TRight>.Count);
130ref TRight oneVectorAwayFromRightEnd = ref Unsafe.Add(ref currentRightSearchSpace, length - (uint)Vector128<TRight>.Count);
147currentRightSearchSpace = ref Unsafe.Add(ref currentRightSearchSpace, (uint)Vector128<TRight>.Count);
148currentLeftSearchSpace = ref Unsafe.Add(ref currentLeftSearchSpace, (uint)Vector128<TRight>.Count);
210uint valueA = uint.CreateTruncating(Unsafe.Add(ref left, i));
211uint valueB = uint.CreateTruncating(Unsafe.Add(ref right, i));
238ref TLeft oneVectorAwayFromLeftEnd = ref Unsafe.Add(ref currentLeftSearchSpace, length - (uint)Vector512<TRight>.Count);
240ref TRight oneVectorAwayFromRightEnd = ref Unsafe.Add(ref currentRightSearchSpace, length - (uint)Vector512<TRight>.Count);
274currentRightSearchSpace = ref Unsafe.Add(ref currentRightSearchSpace, (uint)Vector512<TRight>.Count);
275currentLeftSearchSpace = ref Unsafe.Add(ref currentLeftSearchSpace, (uint)Vector512<TRight>.Count);
309ref TLeft oneVectorAwayFromLeftEnd = ref Unsafe.Add(ref currentLeftSearchSpace, length - (uint)Vector256<TRight>.Count);
311ref TRight oneVectorAwayFromRightEnd = ref Unsafe.Add(ref currentRightSearchSpace, length - (uint)Vector256<TRight>.Count);
346currentRightSearchSpace = ref Unsafe.Add(ref currentRightSearchSpace, (uint)Vector256<TRight>.Count);
347currentLeftSearchSpace = ref Unsafe.Add(ref currentLeftSearchSpace, (uint)Vector256<TRight>.Count);
381ref TLeft oneVectorAwayFromLeftEnd = ref Unsafe.Add(ref currentLeftSearchSpace, length - (uint)Vector128<TRight>.Count);
383ref TRight oneVectorAwayFromRightEnd = ref Unsafe.Add(ref currentRightSearchSpace, length - (uint)Vector128<TRight>.Count);
419currentRightSearchSpace = ref Unsafe.Add(ref currentRightSearchSpace, (uint)Vector128<TRight>.Count);
420currentLeftSearchSpace = ref Unsafe.Add(ref currentLeftSearchSpace, (uint)Vector128<TRight>.Count);