1665 references to Add
GenerateDocumentationAndConfigFiles (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
http2cat (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
IIS.FunctionalTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
IIS.LongTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
IIS.NewHandler.FunctionalTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
IIS.NewShim.FunctionalTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
IISExpress.FunctionalTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
Metrics (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
Metrics.Legacy (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
Microsoft.AspNetCore.OutputCaching (6)
FormatterBinaryReader.cs (3)
40return Unsafe.Add(ref _root, _offset++); 143var s = Encoding.UTF8.GetString(MemoryMarshal.CreateReadOnlySpan(ref Unsafe.Add(ref _root, _offset), bytes)); 170var result = MemoryMarshal.CreateReadOnlySpan(ref Unsafe.Add(ref _root, _offset), count);
FormatterBinaryWriter.cs (3)
39return MemoryMarshal.CreateSpan(ref Unsafe.Add(ref root, offset), length - offset); 68Unsafe.Add(ref root, offset++) = value; 137Unsafe.Add(ref root, offset++) = value;
Microsoft.AspNetCore.Routing (1)
Matching\ILEmitTrieFactory.cs (1)
740/// <see cref="Unsafe.Add{T}(ref T, int)"/> - Add[ref byte]
Microsoft.AspNetCore.Server.HttpSys (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
172ref Unsafe.Add(ref MemoryMarshal.GetReference(buffer), i)),
Microsoft.CodeAnalysis.Analyzers (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
Microsoft.CodeAnalysis.AnalyzerUtilities (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
Microsoft.CodeAnalysis.BannedApiAnalyzers (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
Microsoft.CodeAnalysis.CodeStyle (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
Microsoft.CodeAnalysis.PublicApiAnalyzers (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
Microsoft.CodeAnalysis.ResxSourceGenerator (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
Microsoft.CodeAnalysis.Workspaces (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
Roslyn.Diagnostics.Analyzers (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
System.IO.Hashing (10)
System\IO\Hashing\Crc32.Arm.cs (2)
26Unsafe.ReadUnaligned<ulong>(ref Unsafe.Add(ref ptr, i))); 54Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref ptr, i)));
System\IO\Hashing\Crc32.Vectorized.cs (4)
52srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count * 4); 73srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count * 4); 91srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count); 101srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count);
System\IO\Hashing\Crc64.Vectorized.cs (4)
70srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count * 8); 103srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count * 8); 128srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count); 138srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.Count);
System.Linq (12)
System\Linq\MaxMin.cs (9)
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); 78ref T lastVectorStart = ref Unsafe.Add(ref current, span.Length - Vector256<T>.Count); 81current = ref Unsafe.Add(ref current, Vector256<T>.Count); 86current = ref Unsafe.Add(ref current, Vector256<T>.Count); 102ref T lastVectorStart = ref Unsafe.Add(ref current, span.Length - Vector512<T>.Count); 105current = ref Unsafe.Add(ref current, Vector512<T>.Count); 110current = ref Unsafe.Add(ref current, Vector512<T>.Count);
System\Linq\Range.cs (3)
83ref T end = ref Unsafe.Add(ref pos, destination.Length); 98pos = ref Unsafe.Add(ref pos, Vector<T>.Count); 108pos = ref Unsafe.Add(ref pos, 1);
System.Numerics.Tensors (490)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IAggregationOperator.cs (66)
822result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 14))); 826result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 13))); 830result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 12))); 834result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 11))); 838result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 10))); 842result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 9))); 846result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 8))); 850result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 7))); 854result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 6))); 858result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 5))); 862result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 4))); 866result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 3))); 870result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 2))); 874result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 1))); 969result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 6))); 973result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 5))); 977result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 4))); 981result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 3))); 985result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 2))); 989result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 1))); 1067result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 2))); 1073result = TAggregationOperator.Invoke(result, transform.Invoke(Unsafe.Add(ref xRef, 1))); 2024result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 14), Unsafe.Add(ref yRef, 14))); 2028result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 13), Unsafe.Add(ref yRef, 13))); 2032result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 12), Unsafe.Add(ref yRef, 12))); 2036result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 11), Unsafe.Add(ref yRef, 11))); 2040result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 10), Unsafe.Add(ref yRef, 10))); 2044result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 9), Unsafe.Add(ref yRef, 9))); 2048result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 8), Unsafe.Add(ref yRef, 8))); 2052result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 7), Unsafe.Add(ref yRef, 7))); 2056result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 6), Unsafe.Add(ref yRef, 6))); 2060result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 5), Unsafe.Add(ref yRef, 5))); 2064result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 4), Unsafe.Add(ref yRef, 4))); 2068result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 3), Unsafe.Add(ref yRef, 3))); 2072result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 2), Unsafe.Add(ref yRef, 2))); 2076result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 1), Unsafe.Add(ref yRef, 1))); 2177result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 6), Unsafe.Add(ref yRef, 6))); 2181result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 5), Unsafe.Add(ref yRef, 5))); 2185result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 4), Unsafe.Add(ref yRef, 4))); 2189result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 3), Unsafe.Add(ref yRef, 3))); 2193result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 2), Unsafe.Add(ref yRef, 2))); 2197result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 1), Unsafe.Add(ref yRef, 1))); 2281result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 2282Unsafe.Add(ref yRef, 2))); 2288result = TAggregationOperator.Invoke(result, TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 2289Unsafe.Add(ref yRef, 1)));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBinaryOperator.cs (110)
1012Unsafe.Add(ref dRef, 14) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 14), 1013Unsafe.Add(ref yRef, 14)); 1017Unsafe.Add(ref dRef, 13) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 13), 1018Unsafe.Add(ref yRef, 13)); 1022Unsafe.Add(ref dRef, 12) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 12), 1023Unsafe.Add(ref yRef, 12)); 1027Unsafe.Add(ref dRef, 11) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 11), 1028Unsafe.Add(ref yRef, 11)); 1032Unsafe.Add(ref dRef, 10) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 10), 1033Unsafe.Add(ref yRef, 10)); 1037Unsafe.Add(ref dRef, 9) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 9), 1038Unsafe.Add(ref yRef, 9)); 1042Unsafe.Add(ref dRef, 8) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 8), 1043Unsafe.Add(ref yRef, 8)); 1047Unsafe.Add(ref dRef, 7) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 7), 1048Unsafe.Add(ref yRef, 7)); 1052Unsafe.Add(ref dRef, 6) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 6), 1053Unsafe.Add(ref yRef, 6)); 1057Unsafe.Add(ref dRef, 5) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 5), 1058Unsafe.Add(ref yRef, 5)); 1062Unsafe.Add(ref dRef, 4) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 4), 1063Unsafe.Add(ref yRef, 4)); 1067Unsafe.Add(ref dRef, 3) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 3), 1068Unsafe.Add(ref yRef, 3)); 1072Unsafe.Add(ref dRef, 2) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 1073Unsafe.Add(ref yRef, 2)); 1077Unsafe.Add(ref dRef, 1) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 1078Unsafe.Add(ref yRef, 1)); 1176Unsafe.Add(ref dRef, 6) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 6), 1177Unsafe.Add(ref yRef, 6)); 1181Unsafe.Add(ref dRef, 5) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 5), 1182Unsafe.Add(ref yRef, 5)); 1186Unsafe.Add(ref dRef, 4) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 4), 1187Unsafe.Add(ref yRef, 4)); 1191Unsafe.Add(ref dRef, 3) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 3), 1192Unsafe.Add(ref yRef, 3)); 1196Unsafe.Add(ref dRef, 2) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 1197Unsafe.Add(ref yRef, 2)); 1201Unsafe.Add(ref dRef, 1) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 1202Unsafe.Add(ref yRef, 1)); 1283Unsafe.Add(ref dRef, 2) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 1284Unsafe.Add(ref yRef, 2)); 1290Unsafe.Add(ref dRef, 1) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 1291Unsafe.Add(ref yRef, 1)); 2336Unsafe.Add(ref dRef, 14) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 14)), 2341Unsafe.Add(ref dRef, 13) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 13)), 2346Unsafe.Add(ref dRef, 12) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 12)), 2351Unsafe.Add(ref dRef, 11) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 11)), 2356Unsafe.Add(ref dRef, 10) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 10)), 2361Unsafe.Add(ref dRef, 9) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 9)), 2366Unsafe.Add(ref dRef, 8) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 8)), 2371Unsafe.Add(ref dRef, 7) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 7)), 2376Unsafe.Add(ref dRef, 6) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 6)), 2381Unsafe.Add(ref dRef, 5) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 5)), 2386Unsafe.Add(ref dRef, 4) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 4)), 2391Unsafe.Add(ref dRef, 3) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 3)), 2396Unsafe.Add(ref dRef, 2) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 2)), 2401Unsafe.Add(ref dRef, 1) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 1)), 2504Unsafe.Add(ref dRef, 6) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 6)), 2509Unsafe.Add(ref dRef, 5) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 5)), 2514Unsafe.Add(ref dRef, 4) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 4)), 2519Unsafe.Add(ref dRef, 3) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 3)), 2524Unsafe.Add(ref dRef, 2) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 2)), 2529Unsafe.Add(ref dRef, 1) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 1)), 2615Unsafe.Add(ref dRef, 2) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 2)), 2622Unsafe.Add(ref dRef, 1) = TBinaryOperator.Invoke(TTransformOperator.Invoke(Unsafe.Add(ref xRef, 1)),
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBooleanUnaryOperator.cs (9)
187if (TAnyAll.ShouldEarlyExit(TOperator.Invoke(Unsafe.Add(ref xRef, i)))) 330Unsafe.Add(ref destinationRef, i) = TOperator.Invoke(Unsafe.Add(ref xRef, i)); 447Unsafe.Add(ref destinationRef, i) = TOperator.Invoke(Unsafe.Add(ref xRef, i)); 576Unsafe.Add(ref destinationRef, i) = TOperator.Invoke(Unsafe.Add(ref xRef, i)); 733Unsafe.Add(ref destinationRef, i) = TOperator.Invoke(Unsafe.Add(ref xRef, i));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IStatefulUnaryOperator.cs (44)
878Unsafe.Add(ref dRef, 14) = op.Invoke(Unsafe.Add(ref xRef, 14)); 882Unsafe.Add(ref dRef, 13) = op.Invoke(Unsafe.Add(ref xRef, 13)); 886Unsafe.Add(ref dRef, 12) = op.Invoke(Unsafe.Add(ref xRef, 12)); 890Unsafe.Add(ref dRef, 11) = op.Invoke(Unsafe.Add(ref xRef, 11)); 894Unsafe.Add(ref dRef, 10) = op.Invoke(Unsafe.Add(ref xRef, 10)); 898Unsafe.Add(ref dRef, 9) = op.Invoke(Unsafe.Add(ref xRef, 9)); 902Unsafe.Add(ref dRef, 8) = op.Invoke(Unsafe.Add(ref xRef, 8)); 906Unsafe.Add(ref dRef, 7) = op.Invoke(Unsafe.Add(ref xRef, 7)); 910Unsafe.Add(ref dRef, 6) = op.Invoke(Unsafe.Add(ref xRef, 6)); 914Unsafe.Add(ref dRef, 5) = op.Invoke(Unsafe.Add(ref xRef, 5)); 918Unsafe.Add(ref dRef, 4) = op.Invoke(Unsafe.Add(ref xRef, 4)); 922Unsafe.Add(ref dRef, 3) = op.Invoke(Unsafe.Add(ref xRef, 3)); 926Unsafe.Add(ref dRef, 2) = op.Invoke(Unsafe.Add(ref xRef, 2)); 930Unsafe.Add(ref dRef, 1) = op.Invoke(Unsafe.Add(ref xRef, 1)); 1022Unsafe.Add(ref dRef, 6) = op.Invoke(Unsafe.Add(ref xRef, 6)); 1026Unsafe.Add(ref dRef, 5) = op.Invoke(Unsafe.Add(ref xRef, 5)); 1030Unsafe.Add(ref dRef, 4) = op.Invoke(Unsafe.Add(ref xRef, 4)); 1034Unsafe.Add(ref dRef, 3) = op.Invoke(Unsafe.Add(ref xRef, 3)); 1038Unsafe.Add(ref dRef, 2) = op.Invoke(Unsafe.Add(ref xRef, 2)); 1042Unsafe.Add(ref dRef, 1) = op.Invoke(Unsafe.Add(ref xRef, 1)); 1117Unsafe.Add(ref dRef, 2) = op.Invoke(Unsafe.Add(ref xRef, 2)); 1123Unsafe.Add(ref dRef, 1) = op.Invoke(Unsafe.Add(ref xRef, 1));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.ITernaryOperator.cs (198)
1099Unsafe.Add(ref dRef, 14) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 14), 1100Unsafe.Add(ref yRef, 14), 1101Unsafe.Add(ref zRef, 14)); 1105Unsafe.Add(ref dRef, 13) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 13), 1106Unsafe.Add(ref yRef, 13), 1107Unsafe.Add(ref zRef, 13)); 1111Unsafe.Add(ref dRef, 12) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 12), 1112Unsafe.Add(ref yRef, 12), 1113Unsafe.Add(ref zRef, 12)); 1117Unsafe.Add(ref dRef, 11) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 11), 1118Unsafe.Add(ref yRef, 11), 1119Unsafe.Add(ref zRef, 11)); 1123Unsafe.Add(ref dRef, 10) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 10), 1124Unsafe.Add(ref yRef, 10), 1125Unsafe.Add(ref zRef, 10)); 1129Unsafe.Add(ref dRef, 9) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 9), 1130Unsafe.Add(ref yRef, 9), 1131Unsafe.Add(ref zRef, 9)); 1135Unsafe.Add(ref dRef, 8) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 8), 1136Unsafe.Add(ref yRef, 8), 1137Unsafe.Add(ref zRef, 8)); 1141Unsafe.Add(ref dRef, 7) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 7), 1142Unsafe.Add(ref yRef, 7), 1143Unsafe.Add(ref zRef, 7)); 1147Unsafe.Add(ref dRef, 6) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 6), 1148Unsafe.Add(ref yRef, 6), 1149Unsafe.Add(ref zRef, 6)); 1153Unsafe.Add(ref dRef, 5) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 5), 1154Unsafe.Add(ref yRef, 5), 1155Unsafe.Add(ref zRef, 5)); 1159Unsafe.Add(ref dRef, 4) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 4), 1160Unsafe.Add(ref yRef, 4), 1161Unsafe.Add(ref zRef, 4)); 1165Unsafe.Add(ref dRef, 3) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 3), 1166Unsafe.Add(ref yRef, 3), 1167Unsafe.Add(ref zRef, 3)); 1171Unsafe.Add(ref dRef, 2) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 1172Unsafe.Add(ref yRef, 2), 1173Unsafe.Add(ref zRef, 2)); 1177Unsafe.Add(ref dRef, 1) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 1178Unsafe.Add(ref yRef, 1), 1179Unsafe.Add(ref zRef, 1)); 1283Unsafe.Add(ref dRef, 6) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 6), 1284Unsafe.Add(ref yRef, 6), 1285Unsafe.Add(ref zRef, 6)); 1289Unsafe.Add(ref dRef, 5) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 5), 1290Unsafe.Add(ref yRef, 5), 1291Unsafe.Add(ref zRef, 5)); 1295Unsafe.Add(ref dRef, 4) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 4), 1296Unsafe.Add(ref yRef, 4), 1297Unsafe.Add(ref zRef, 4)); 1301Unsafe.Add(ref dRef, 3) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 3), 1302Unsafe.Add(ref yRef, 3), 1303Unsafe.Add(ref zRef, 3)); 1307Unsafe.Add(ref dRef, 2) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 1308Unsafe.Add(ref yRef, 2), 1309Unsafe.Add(ref zRef, 2)); 1313Unsafe.Add(ref dRef, 1) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 1314Unsafe.Add(ref yRef, 1), 1315Unsafe.Add(ref zRef, 1)); 1402Unsafe.Add(ref dRef, 2) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 1403Unsafe.Add(ref yRef, 2), 1404Unsafe.Add(ref zRef, 2)); 1410Unsafe.Add(ref dRef, 1) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 1411Unsafe.Add(ref yRef, 1), 1412Unsafe.Add(ref zRef, 1)); 2566Unsafe.Add(ref dRef, 14) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 14), 2567Unsafe.Add(ref yRef, 14), 2572Unsafe.Add(ref dRef, 13) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 13), 2573Unsafe.Add(ref yRef, 13), 2578Unsafe.Add(ref dRef, 12) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 12), 2579Unsafe.Add(ref yRef, 12), 2584Unsafe.Add(ref dRef, 11) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 11), 2585Unsafe.Add(ref yRef, 11), 2590Unsafe.Add(ref dRef, 10) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 10), 2591Unsafe.Add(ref yRef, 10), 2596Unsafe.Add(ref dRef, 9) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 9), 2597Unsafe.Add(ref yRef, 9), 2602Unsafe.Add(ref dRef, 8) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 8), 2603Unsafe.Add(ref yRef, 8), 2608Unsafe.Add(ref dRef, 7) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 7), 2609Unsafe.Add(ref yRef, 7), 2614Unsafe.Add(ref dRef, 6) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 6), 2615Unsafe.Add(ref yRef, 6), 2620Unsafe.Add(ref dRef, 5) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 5), 2621Unsafe.Add(ref yRef, 5), 2626Unsafe.Add(ref dRef, 4) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 4), 2627Unsafe.Add(ref yRef, 4), 2632Unsafe.Add(ref dRef, 3) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 3), 2633Unsafe.Add(ref yRef, 3), 2638Unsafe.Add(ref dRef, 2) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 2639Unsafe.Add(ref yRef, 2), 2644Unsafe.Add(ref dRef, 1) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 2645Unsafe.Add(ref yRef, 1), 2754Unsafe.Add(ref dRef, 6) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 6), 2755Unsafe.Add(ref yRef, 6), 2760Unsafe.Add(ref dRef, 5) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 5), 2761Unsafe.Add(ref yRef, 5), 2766Unsafe.Add(ref dRef, 4) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 4), 2767Unsafe.Add(ref yRef, 4), 2772Unsafe.Add(ref dRef, 3) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 3), 2773Unsafe.Add(ref yRef, 3), 2778Unsafe.Add(ref dRef, 2) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 2779Unsafe.Add(ref yRef, 2), 2784Unsafe.Add(ref dRef, 1) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 2785Unsafe.Add(ref yRef, 1), 2877Unsafe.Add(ref dRef, 2) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 2878Unsafe.Add(ref yRef, 2), 2885Unsafe.Add(ref dRef, 1) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 2886Unsafe.Add(ref yRef, 1), 4039Unsafe.Add(ref dRef, 14) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 14), 4045Unsafe.Add(ref dRef, 13) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 13), 4051Unsafe.Add(ref dRef, 12) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 12), 4057Unsafe.Add(ref dRef, 11) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 11), 4063Unsafe.Add(ref dRef, 10) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 10), 4069Unsafe.Add(ref dRef, 9) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 9), 4075Unsafe.Add(ref dRef, 8) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 8), 4081Unsafe.Add(ref dRef, 7) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 7), 4087Unsafe.Add(ref dRef, 6) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 6), 4093Unsafe.Add(ref dRef, 5) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 5), 4099Unsafe.Add(ref dRef, 4) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 4), 4105Unsafe.Add(ref dRef, 3) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 3), 4111Unsafe.Add(ref dRef, 2) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 4117Unsafe.Add(ref dRef, 1) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 4229Unsafe.Add(ref dRef, 6) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 6), 4235Unsafe.Add(ref dRef, 5) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 5), 4241Unsafe.Add(ref dRef, 4) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 4), 4247Unsafe.Add(ref dRef, 3) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 3), 4253Unsafe.Add(ref dRef, 2) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 4259Unsafe.Add(ref dRef, 1) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 1), 4354Unsafe.Add(ref dRef, 2) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 2), 4362Unsafe.Add(ref dRef, 1) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, 1),
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryInputBinaryOutput.cs (10)
163(T first, T second) = TUnaryOperator.Invoke(Unsafe.Add(ref sourceRef, i)); 164Unsafe.Add(ref destination1Ref, i) = first; 165Unsafe.Add(ref destination2Ref, i) = second; 352(T first, T second) = TOperator.Invoke(Unsafe.Add(ref xRef, i), Unsafe.Add(ref yRef, i)); 353Unsafe.Add(ref destination1Ref, i) = first; 354Unsafe.Add(ref destination2Ref, i) = second; 539(T first, T second) = TOperator.Invoke(Unsafe.Add(ref xRef, i), y); 540Unsafe.Add(ref destination1Ref, i) = first; 541Unsafe.Add(ref destination2Ref, i) = second;
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToFourOperator.cs (2)
157Unsafe.Add(ref destinationRef, i) = TUnaryOperator.Invoke(Unsafe.Add(ref sourceRef, i));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToTwoOperator.cs (2)
145Unsafe.Add(ref destinationRef, i) = TUnaryOperator.Invoke(Unsafe.Add(ref sourceRef, i));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOperator.cs (44)
918Unsafe.Add(ref dRef, 14) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 14)); 922Unsafe.Add(ref dRef, 13) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 13)); 926Unsafe.Add(ref dRef, 12) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 12)); 930Unsafe.Add(ref dRef, 11) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 11)); 934Unsafe.Add(ref dRef, 10) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 10)); 938Unsafe.Add(ref dRef, 9) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 9)); 942Unsafe.Add(ref dRef, 8) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 8)); 946Unsafe.Add(ref dRef, 7) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 7)); 950Unsafe.Add(ref dRef, 6) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 6)); 954Unsafe.Add(ref dRef, 5) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 5)); 958Unsafe.Add(ref dRef, 4) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 4)); 962Unsafe.Add(ref dRef, 3) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 3)); 966Unsafe.Add(ref dRef, 2) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 2)); 970Unsafe.Add(ref dRef, 1) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 1)); 1062Unsafe.Add(ref dRef, 6) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 6)); 1066Unsafe.Add(ref dRef, 5) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 5)); 1070Unsafe.Add(ref dRef, 4) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 4)); 1074Unsafe.Add(ref dRef, 3) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 3)); 1078Unsafe.Add(ref dRef, 2) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 2)); 1082Unsafe.Add(ref dRef, 1) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 1)); 1157Unsafe.Add(ref dRef, 2) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 2)); 1163Unsafe.Add(ref dRef, 1) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, 1));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryTwoToOneOperator.cs (2)
145Unsafe.Add(ref destinationRef, i) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, i));
System\Numerics\Tensors\netcore\Tensor.cs (1)
1640ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref tensor.AsTensorSpan()._reference, tensor._start), tensor._values.Length - tensor._start);
System\Numerics\Tensors\netcore\Tensor_1.cs (2)
137public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _start), in _shape); 149public TensorSpan<T> AsTensorSpan() => new TensorSpan<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _start), in _shape);
System.Private.CoreLib (758)
src\libraries\System.Private.CoreLib\src\System\Array.cs (29)
538ref object? srcData = ref Unsafe.Add(ref Unsafe.As<byte, object?>(ref MemoryMarshal.GetArrayDataReference(sourceArray)), sourceIndex); 543object? obj = Unsafe.Add(ref srcData, i); 584ref object? destData = ref Unsafe.Add(ref Unsafe.As<byte, object?>(ref MemoryMarshal.GetArrayDataReference(destinationArray)), destinationIndex); 593Unsafe.Add(ref destData, i) = obj; 606ref object? srcData = ref Unsafe.Add(ref Unsafe.As<byte, object?>(ref MemoryMarshal.GetArrayDataReference(sourceArray)), sourceIndex); 607ref object? destData = ref Unsafe.Add(ref Unsafe.As<byte, object?>(ref MemoryMarshal.GetArrayDataReference(destinationArray)), destinationIndex); 611object? obj = Unsafe.Add(ref srcData, i); 619Unsafe.Add(ref destData, i) = CastHelpers.ChkCastAny(pDestMT, obj); 696lowerBound = Unsafe.Add(ref Unsafe.As<byte, int>(ref p), rank); 697p = ref Unsafe.Add(ref p, 2 * sizeof(int) * rank); // skip the bounds 726rawIndex -= Unsafe.Add(ref bounds, 1); 745int index = indices[i] - Unsafe.Add(ref bounds, indices.Length + i); 746int length = Unsafe.Add(ref bounds, i); 773return Unsafe.Add(ref this.GetMultiDimensionalArrayBounds(), dimension); 787return Unsafe.Add(ref bounds, dimension) 788+ (SupportsNonZeroLowerBound ? Unsafe.Add(ref bounds, rank + dimension) : 0) 803return Unsafe.Add(ref this.GetMultiDimensionalArrayBounds(), rank + dimension); 1902ref Unsafe.Add(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 1910ref Unsafe.Add(ref Unsafe.As<T, short>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 1918ref Unsafe.Add(ref Unsafe.As<T, int>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 1926ref Unsafe.Add(ref Unsafe.As<T, long>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 2147ref Unsafe.Add(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 2157ref Unsafe.Add(ref Unsafe.As<T, short>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 2167ref Unsafe.Add(ref Unsafe.As<T, int>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 2177ref Unsafe.Add(ref Unsafe.As<T, long>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 2297SpanHelpers.Reverse(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index), (nuint)length); 2547var span = new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index), length); 2571var spanKeys = new Span<TKey>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(keys), index), length); 2572var spanItems = new Span<TValue>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(items), index), length);
src\libraries\System.Private.CoreLib\src\System\Buffer.cs (2)
85return Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index); 96Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index) = value;
src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (4)
328Unsafe.Add(ref destRef, i) = TReverser.Reverse(Unsafe.Add(ref sourceRef, i)); 361Unsafe.Add(ref destRef, i) = TReverser.Reverse(Unsafe.Add(ref sourceRef, i));
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (1)
408Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(arrays), count) = array; // arrays[count] = array, but avoiding stelemref
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (9)
384int i0 = Unsafe.Add(ref decodingMap, (int)t0); 385int i1 = Unsafe.Add(ref decodingMap, (int)t1); 394int i2 = Unsafe.Add(ref decodingMap, (int)t2); 395int i3 = Unsafe.Add(ref decodingMap, (int)t3); 412int i2 = Unsafe.Add(ref decodingMap, (int)t2); 1396int i0 = Unsafe.Add(ref decodingMap, (int)t0); 1397int i1 = Unsafe.Add(ref decodingMap, (int)t1); 1398int i2 = Unsafe.Add(ref decodingMap, (int)t2); 1399int i3 = Unsafe.Add(ref decodingMap, (int)t3);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (4)
779int i0 = Unsafe.Add(ref decodingMap, (int)t0); 780int i1 = Unsafe.Add(ref decodingMap, (int)t1); 781int i2 = Unsafe.Add(ref decodingMap, (int)t2); 782int i3 = Unsafe.Add(ref decodingMap, (int)t3);
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
322result = Unsafe.Add(ref MemoryMarshal.GetReference(source), source.Length - sizeof(byte));
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1239sourceRef = ref Unsafe.Add(ref sourceRef, source.Length - sizeof(char));
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (12)
464ref T lastRef = ref Unsafe.Add(ref zeroRef, keys.Length - 1); 465ref T middleRef = ref Unsafe.Add(ref zeroRef, (keys.Length - 1) >> 1); 471ref T nextToLastRef = ref Unsafe.Add(ref zeroRef, keys.Length - 2); 481while (Unsafe.IsAddressLessThan(ref leftRef, ref nextToLastRef) && (leftRef = ref Unsafe.Add(ref leftRef, 1)) == null) ; 482while (Unsafe.IsAddressGreaterThan(ref rightRef, ref zeroRef) && (rightRef = ref Unsafe.Add(ref rightRef, -1)) != null) ; 486while (Unsafe.IsAddressLessThan(ref leftRef, ref nextToLastRef) && GreaterThan(ref pivot, ref leftRef = ref Unsafe.Add(ref leftRef, 1))) ; 487while (Unsafe.IsAddressGreaterThan(ref rightRef, ref zeroRef) && LessThan(ref pivot, ref rightRef = ref Unsafe.Add(ref rightRef, -1))) ; 549T t = Unsafe.Add(ref MemoryMarshal.GetReference(keys), i + 1); 552while (j >= 0 && (t == null || LessThan(ref t, ref Unsafe.Add(ref MemoryMarshal.GetReference(keys), j)))) 554Unsafe.Add(ref MemoryMarshal.GetReference(keys), j + 1) = Unsafe.Add(ref MemoryMarshal.GetReference(keys), j); 558Unsafe.Add(ref MemoryMarshal.GetReference(keys), j + 1) = t!;
src\libraries\System.Private.CoreLib\src\System\Convert.Base64.cs (24)
64int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 67WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 82int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 83int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 84int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 85int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 89i0 = Unsafe.Add(ref decodingMap, i0); 90i1 = Unsafe.Add(ref decodingMap, i1); 99i2 = Unsafe.Add(ref decodingMap, i2); 100i3 = Unsafe.Add(ref decodingMap, i3); 111WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 116i2 = Unsafe.Add(ref decodingMap, i2); 126Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 127Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 136Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 161int i1 = Unsafe.Add(ref encodedChars, 1); 162int i2 = Unsafe.Add(ref encodedChars, 2); 163int i3 = Unsafe.Add(ref encodedChars, 3); 168i0 = Unsafe.Add(ref decodingMap, i0); 169i1 = Unsafe.Add(ref decodingMap, i1); 170i2 = Unsafe.Add(ref decodingMap, i2); 171i3 = Unsafe.Add(ref decodingMap, i3); 188Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 189Unsafe.Add(ref destination, 2) = (byte)value;
src\libraries\System.Private.CoreLib\src\System\Convert.cs (5)
2495dest = ref Unsafe.Add(ref dest, charLengthRequired); 2496src = ref Unsafe.Add(ref src, charLengthRequired); 2501ref byte srcBeginningPlus31 = ref Unsafe.Add(ref srcBeginning, 31); 2517ref byte srcBeginningPlus15 = ref Unsafe.Add(ref srcBeginning, 15); 2531ref byte srcBeginningPlus3 = ref Unsafe.Add(ref srcBeginning, 3);
src\libraries\System.Private.CoreLib\src\System\Globalization\InvariantModeCasing.cs (5)
172char charB = Unsafe.Add(ref source, 1); 201charA = ref Unsafe.Add(ref charA, codePointLengthA); 202charB = ref Unsafe.Add(ref charB, codePointLengthB); 213charA = ref Unsafe.Add(ref charA, codePointLengthA); 214charB = ref Unsafe.Add(ref charB, codePointLengthB);
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (4)
33charA = ref Unsafe.Add(ref charA, 1); 34charB = ref Unsafe.Add(ref charB, 1); 377valueCharU = Unsafe.Add(ref valueRef, valueTailLength); 419ref Unsafe.Add(ref valueRef, 1), valueTailLength))
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.Utf8.cs (4)
38charA = ref Unsafe.Add(ref charA, 1); 39charB = ref Unsafe.Add(ref charB, 1); 348source = ref Unsafe.Add(ref source, 1); 349prefix = ref Unsafe.Add(ref prefix, 1);
src\libraries\System.Private.CoreLib\src\System\Globalization\OrdinalCasing.Icu.cs (11)
204if (!char.IsHighSurrogate(a) || index >= lengthA - 1 || !char.IsLowSurrogate(lowSurrogateA = Unsafe.Add(ref charA, 1))) 206if (!char.IsHighSurrogate(b) || index >= lengthB - 1 || !char.IsLowSurrogate(Unsafe.Add(ref charB, 1))) 215charA = ref Unsafe.Add(ref charA, 1); 216charB = ref Unsafe.Add(ref charB, 1); 226charA = ref Unsafe.Add(ref charA, 1); 227charB = ref Unsafe.Add(ref charB, 1); 247if (!char.IsHighSurrogate(b) || index >= lengthB - 1 || !char.IsLowSurrogate(lowSurrogateB = Unsafe.Add(ref charB, 1))) 266charA = ref Unsafe.Add(ref charA, 2); 267charB = ref Unsafe.Add(ref charB, 2); 277charA = ref Unsafe.Add(ref charA, 2); 278charB = ref Unsafe.Add(ref charB, 2);
src\libraries\System.Private.CoreLib\src\System\Guid.cs (10)
795Unsafe.Add(ref result._d, i) = (byte)byteVal; 1067return r ^ Unsafe.Add(ref r, 1) ^ Unsafe.Add(ref r, 2) ^ Unsafe.Add(ref r, 3); 1090&& Unsafe.Add(ref rA, 1) == Unsafe.Add(ref rB, 1) 1091&& Unsafe.Add(ref rA, 2) == Unsafe.Add(ref rB, 2) 1092&& Unsafe.Add(ref rA, 3) == Unsafe.Add(ref rB, 3);
src\libraries\System.Private.CoreLib\src\System\HashCode.cs (10)
321ref byte end = ref Unsafe.Add(ref pos, value.Length); 342pos = ref Unsafe.Add(ref pos, sizeof(int)); 347pos = ref Unsafe.Add(ref pos, sizeof(int)); 352pos = ref Unsafe.Add(ref pos, sizeof(int)); 365uint v2 = Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref pos, sizeof(int) * 1)); 367uint v3 = Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref pos, sizeof(int) * 2)); 369uint v4 = Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref pos, sizeof(int) * 3)); 373pos = ref Unsafe.Add(ref pos, sizeof(int) * 4); 381pos = ref Unsafe.Add(ref pos, sizeof(int)); 388pos = ref Unsafe.Add(ref pos, 1);
src\libraries\System.Private.CoreLib\src\System\Int128.cs (3)
800sourceRef = ref Unsafe.Add(ref sourceRef, source.Length - Size); 819result |= Unsafe.Add(ref sourceRef, i); 901result |= Unsafe.Add(ref sourceRef, i);
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
348sourceRef = ref Unsafe.Add(ref sourceRef, source.Length - sizeof(short));
src\libraries\System.Private.CoreLib\src\System\Int32.cs (3)
368sourceRef = ref Unsafe.Add(ref sourceRef, source.Length - sizeof(int)); 387result |= Unsafe.Add(ref sourceRef, i); 469result |= Unsafe.Add(ref sourceRef, i);
src\libraries\System.Private.CoreLib\src\System\Int64.cs (3)
365sourceRef = ref Unsafe.Add(ref sourceRef, source.Length - sizeof(long)); 384result |= Unsafe.Add(ref sourceRef, i); 466result |= Unsafe.Add(ref sourceRef, i);
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (3)
370sourceRef = ref Unsafe.Add(ref sourceRef, source.Length - sizeof(nint_t)); 389result |= Unsafe.Add(ref sourceRef, i); 471result |= Unsafe.Add(ref sourceRef, i);
src\libraries\System.Private.CoreLib\src\System\Marvin.cs (1)
116uint partialResult = Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref Unsafe.AddByteOffset(ref data, (nuint)count & 7), -4));
src\libraries\System.Private.CoreLib\src\System\Memory.cs (1)
402ref char stringData = ref Unsafe.Add(ref s.GetRawStringData(), _index);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (56)
1213Unsafe.Add(ref valuesRef, 1), 1214Unsafe.Add(ref valuesRef, 2), 1215Unsafe.Add(ref valuesRef, 3), 1216Unsafe.Add(ref valuesRef, 4), 1226Unsafe.Add(ref valuesRef, 1), 1227Unsafe.Add(ref valuesRef, 2), 1228Unsafe.Add(ref valuesRef, 3), 1229Unsafe.Add(ref valuesRef, 4), 1793Unsafe.Add(ref valuesRef, 1), 1794Unsafe.Add(ref valuesRef, 2), 1795Unsafe.Add(ref valuesRef, 3), 1796Unsafe.Add(ref valuesRef, 4), 1806Unsafe.Add(ref valuesRef, 1), 1807Unsafe.Add(ref valuesRef, 2), 1808Unsafe.Add(ref valuesRef, 3), 1809Unsafe.Add(ref valuesRef, 4), 2865Unsafe.Add(ref valueRef, 1), 2872Unsafe.Add(ref valueRef, 1), 2873Unsafe.Add(ref valueRef, 2), 2880Unsafe.Add(ref valueRef, 1), 2881Unsafe.Add(ref valueRef, 2), 2882Unsafe.Add(ref valueRef, 3), 2889Unsafe.Add(ref valueRef, 1), 2890Unsafe.Add(ref valueRef, 2), 2891Unsafe.Add(ref valueRef, 3), 2892Unsafe.Add(ref valueRef, 4), 2908Unsafe.Add(ref valueRef, 1), 2913Unsafe.Add(ref valueRef, 1), 2914Unsafe.Add(ref valueRef, 2), 2919Unsafe.Add(ref valueRef, 1), 2920Unsafe.Add(ref valueRef, 2), 2921Unsafe.Add(ref valueRef, 3), 2926Unsafe.Add(ref valueRef, 1), 2927Unsafe.Add(ref valueRef, 2), 2928Unsafe.Add(ref valueRef, 3), 2929Unsafe.Add(ref valueRef, 4), 3287Unsafe.Add(ref valueRef, 1), 3294Unsafe.Add(ref valueRef, 1), 3295Unsafe.Add(ref valueRef, 2), 3302Unsafe.Add(ref valueRef, 1), 3303Unsafe.Add(ref valueRef, 2), 3304Unsafe.Add(ref valueRef, 3), 3311Unsafe.Add(ref valueRef, 1), 3312Unsafe.Add(ref valueRef, 2), 3313Unsafe.Add(ref valueRef, 3), 3314Unsafe.Add(ref valueRef, 4), 3330Unsafe.Add(ref valueRef, 1), 3335Unsafe.Add(ref valueRef, 1), 3336Unsafe.Add(ref valueRef, 2), 3341Unsafe.Add(ref valueRef, 1), 3342Unsafe.Add(ref valueRef, 2), 3343Unsafe.Add(ref valueRef, 3), 3348Unsafe.Add(ref valueRef, 1), 3349Unsafe.Add(ref valueRef, 2), 3350Unsafe.Add(ref valueRef, 3), 3351Unsafe.Add(ref valueRef, 4),
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Globalization.cs (1)
325ref Unsafe.Add(ref MemoryMarshal.GetReference(span), span.Length - value.Length),
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix3x2.cs (4)
180return Unsafe.Add(ref Unsafe.AsRef(in AsROImpl()).X, row); 222Unsafe.Add(ref AsImpl().X, row) = value; 281return Unsafe.Add(ref Unsafe.AsRef(in M11), (row * ColumnCount) + column); 323Unsafe.Add(ref M11, (row * ColumnCount) + column) = value;
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.cs (4)
259return Unsafe.Add(ref Unsafe.AsRef(in impl.X), row); 309Unsafe.Add(ref Unsafe.AsRef(in impl.X), row) = value; 375return Unsafe.Add(ref Unsafe.AsRef(in M11), (row * ColumnCount) + column); 425Unsafe.Add(ref Unsafe.AsRef(in M11), (row * ColumnCount) + column) = value;
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (2)
3486return Unsafe.Add(ref address, index); 3494Unsafe.Add(ref address, index) = value;
src\libraries\System.Private.CoreLib\src\System\ReadOnlyMemory.cs (1)
317ref char stringData = ref Unsafe.Add(ref s.GetRawStringData(), _index);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CastCache.cs (3)
123return ref Unsafe.Add(ref tableData, 1); 129return ref Unsafe.As<int, uint>(ref Unsafe.Add(ref tableData, 2)); 136return ref Unsafe.Add(ref Unsafe.As<int, CastCacheEntry>(ref tableData), index + 1);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\GenericCache.cs (1)
138return ref Unsafe.Add(ref Unsafe.As<byte, Entry>(ref Unsafe.As<RawArrayData>(table).Data), index + 1);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (1)
64ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), offset),
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (2)
4372return Unsafe.Add(ref address, index); 4380Unsafe.Add(ref address, index) = value;
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (2)
4334return Unsafe.Add(ref address, index); 4342Unsafe.Add(ref address, index) = value;
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (2)
4311return Unsafe.Add(ref address, index); 4319Unsafe.Add(ref address, index) = value;
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (2)
4268return Unsafe.Add(ref address, index); 4276Unsafe.Add(ref address, index) = value;
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
348result = (sbyte)Unsafe.Add(ref MemoryMarshal.GetReference(source), source.Length - sizeof(sbyte));
src\libraries\System.Private.CoreLib\src\System\SearchValues\BitmapCharSearchValues.cs (3)
73ref char searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 85cur = ref Unsafe.Add(ref cur, 1); 98char c = Unsafe.Add(ref searchSpace, searchSpaceLength);
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (42)
295ref short searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 305currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 1); 325ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - (2 * Vector256<short>.Count)); 338currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector256<short>.Count); 347ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector256<short>.Count); 378ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - (2 * Vector128<short>.Count)); 391currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.Count); 400ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<short>.Count); 431char c = (char)Unsafe.Add(ref searchSpace, i); 441ref short currentSearchSpace = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 457ref short twoVectorsAfterStart = ref Unsafe.Add(ref searchSpace, 2 * Vector256<short>.Count); 479ref short oneVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector256<short>.Count); 508ref short twoVectorsAfterStart = ref Unsafe.Add(ref searchSpace, 2 * Vector128<short>.Count); 530ref short oneVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<short>.Count); 580ref byte searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 590currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 1); 608ref byte vectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector256<byte>.Count); 620currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector256<byte>.Count); 629ref byte halfVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, 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); 678ref byte halfVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - sizeof(ulong)); 709byte b = Unsafe.Add(ref searchSpace, i); 719ref byte currentSearchSpace = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 733ref byte vectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector256<byte>.Count); 754ref byte halfVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 782ref byte vectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 803ref byte halfVectorAfterStart = ref Unsafe.Add(ref searchSpace, sizeof(ulong)); 851ref byte searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 861currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 1); 880ref byte vectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector256<byte>.Count); 892currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector256<byte>.Count); 901ref byte halfVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, 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); 953ref byte halfVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - sizeof(ulong)); 983byte b = Unsafe.Add(ref searchSpace, i); 993ref byte currentSearchSpace = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 1008ref byte vectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector256<byte>.Count); 1029ref byte halfVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 1060ref byte vectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.Count); 1081ref byte halfVectorAfterStart = ref Unsafe.Add(ref searchSpace, sizeof(ulong));
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (24)
426ref char searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 441Vector512<byte> result = ContainsMask64CharsAvx512(charMap512, ref cur, ref Unsafe.Add(ref cur, Vector512<ushort>.Count)); 451cur = ref Unsafe.Add(ref cur, 64); 510ref char searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 537cur = ref Unsafe.Add(ref cur, 32); 577cur = ref Unsafe.Add(ref cur, 16); 601ref char cur = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 611ref char lastStartVector = ref Unsafe.Add(ref searchSpace, 64); 619Vector512<byte> result = ContainsMask64CharsAvx512(charMap512, ref cur, ref Unsafe.Add(ref cur, Vector512<ushort>.Count)); 688ref char cur = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 700ref char lastStartVectorAvx2 = ref Unsafe.Add(ref searchSpace, 32); 735cur = ref Unsafe.Add(ref searchSpace, 16); 742ref char lastStartVector = ref Unsafe.Add(ref searchSpace, 16); 787if (state.ConfirmProbabilisticMatch<TUseFastContains>(Unsafe.Add(ref cur, index))) 815if (state.ConfirmProbabilisticMatch<TUseFastContains>(Unsafe.Add(ref cur, index))) 836if (state.ConfirmProbabilisticMatch<TUseFastContains>(Unsafe.Add(ref cur, index))) 864if (state.ConfirmProbabilisticMatch<TUseFastContains>(Unsafe.Add(ref cur, index))) 885if (state.ConfirmProbabilisticMatch<TUseFastContains>(Unsafe.Add(ref cur, index))) 917if (state.ConfirmProbabilisticMatch<TUseFastContains>(Unsafe.Add(ref cur, index))) 936if (state.ConfirmProbabilisticMatch<TUseFastContains>(Unsafe.Add(ref cur, index))) 968if (state.ConfirmProbabilisticMatch<TUseFastContains>(Unsafe.Add(ref cur, index))) 983ref char searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 994cur = ref Unsafe.Add(ref cur, 1); 1006char c = Unsafe.Add(ref searchSpace, i);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMapState.cs (5)
234ref char searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); 252cur = ref Unsafe.Add(ref cur, 1); 265cur = ref Unsafe.Add(ref cur, 1); 286char c = Unsafe.Add(ref searchSpace, searchSpaceLength); 297char c = Unsafe.Add(ref searchSpace, searchSpaceLength);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\AsciiStringSearchValuesTeddyBase.cs (27)
203ref char lastSearchSpaceStart = ref Unsafe.Add(ref searchSpace, span.Length - CharsPerIterationVector128); 205searchSpace = ref Unsafe.Add(ref searchSpace, MatchStartOffsetN2); 223searchSpace = ref Unsafe.Add(ref searchSpace, CharsPerIterationVector128); 227if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpaceStart, CharsPerIterationVector128))) 255ref char lastSearchSpaceStart = ref Unsafe.Add(ref searchSpace, span.Length - CharsPerIterationAvx2); 257searchSpace = ref Unsafe.Add(ref searchSpace, MatchStartOffsetN2); 275searchSpace = ref Unsafe.Add(ref searchSpace, CharsPerIterationAvx2); 279if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpaceStart, CharsPerIterationAvx2))) 307ref char lastSearchSpaceStart = ref Unsafe.Add(ref searchSpace, span.Length - CharsPerIterationAvx512); 309searchSpace = ref Unsafe.Add(ref searchSpace, MatchStartOffsetN2); 327searchSpace = ref Unsafe.Add(ref searchSpace, CharsPerIterationAvx512); 331if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpaceStart, CharsPerIterationAvx512))) 362ref char lastSearchSpaceStart = ref Unsafe.Add(ref searchSpace, span.Length - CharsPerIterationVector128); 364searchSpace = ref Unsafe.Add(ref searchSpace, MatchStartOffsetN3); 397searchSpace = ref Unsafe.Add(ref searchSpace, CharsPerIterationVector128); 401if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpaceStart, CharsPerIterationVector128))) 432ref char lastSearchSpaceStart = ref Unsafe.Add(ref searchSpace, span.Length - CharsPerIterationAvx2); 434searchSpace = ref Unsafe.Add(ref searchSpace, MatchStartOffsetN3); 454searchSpace = ref Unsafe.Add(ref searchSpace, CharsPerIterationAvx2); 458if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpaceStart, CharsPerIterationAvx2))) 487ref char lastSearchSpaceStart = ref Unsafe.Add(ref searchSpace, span.Length - CharsPerIterationAvx512); 489searchSpace = ref Unsafe.Add(ref searchSpace, MatchStartOffsetN3); 509searchSpace = ref Unsafe.Add(ref searchSpace, CharsPerIterationAvx512); 513if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpaceStart, CharsPerIterationAvx512))) 546ref char matchRef = ref Unsafe.Add(ref searchSpace, matchOffset - matchStartOffset); 593ref char matchRef = ref Unsafe.Add(ref searchSpace, matchOffset - matchStartOffset); 638ref char matchRef = ref Unsafe.Add(ref searchSpace, matchOffset - matchStartOffset);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasick.cs (5)
100ref Unsafe.As<char, short>(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), i)), 123char c = TCaseSensitivity.TransformInput(Unsafe.Add(ref MemoryMarshal.GetReference(span), i)); 209ref Unsafe.As<char, short>(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), i)), 242c = Unsafe.Add(ref MemoryMarshal.GetReference(span), i); 247char.IsLowSurrogate(lowSurrogate = Unsafe.Add(ref MemoryMarshal.GetReference(span), i + 1)))
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\RabinKarp.cs (1)
155current = ref Unsafe.Add(ref current, 1);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (6)
115searchSpace = ref Unsafe.Add(ref searchSpace, Vector512<ushort>.Count); 119if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpace, Vector512<ushort>.Count))) 162searchSpace = ref Unsafe.Add(ref searchSpace, Vector256<ushort>.Count); 166if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpace, Vector256<ushort>.Count))) 209searchSpace = ref Unsafe.Add(ref searchSpace, Vector128<ushort>.Count); 213if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpace, Vector128<ushort>.Count)))
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.BinarySearch.cs (1)
40int c = comparable.CompareTo(Unsafe.Add(ref spanStart, i));
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (20)
36ref byte valueTail = ref Unsafe.Add(ref value, 1); 70byte ch2Val = Unsafe.Add(ref value, valueTailLength); 131byte ch2Val = Unsafe.Add(ref value, valueTailLength); 192byte ch2Val = Unsafe.Add(ref value, valueTailLength); 195ch2Val = Unsafe.Add(ref value, --ch1ch2Distance); 272ref byte valueTail = ref Unsafe.Add(ref value, 1); 288ref Unsafe.Add(ref searchSpace, relativeIndex + 1), 305byte ch2Val = Unsafe.Add(ref value, valueTailLength); 308ch2Val = Unsafe.Add(ref value, --ch1ch2Distance); 328ref Unsafe.Add(ref searchSpace, offset + highestSetBitIndex), 352byte ch2Val = Unsafe.Add(ref value, valueTailLength); 355ch2Val = Unsafe.Add(ref value, --ch1ch2Distance); 375ref Unsafe.Add(ref searchSpace, offset + highestSetBitIndex), 399byte ch2Val = Unsafe.Add(ref value, valueTailLength); 402ch2Val = Unsafe.Add(ref value, --ch1ch2Distance); 424ref Unsafe.Add(ref searchSpace, offset + highestSetBitIndex), 1171if (Unsafe.Add(ref first, 1) != Unsafe.Add(ref second, 1)) 1176if (i > 2 && Unsafe.Add(ref first, 2) != Unsafe.Add(ref second, 2))
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.ByteMemOps.cs (24)
71Unsafe.WriteUnaligned(ref Unsafe.Add(ref dest, 16), Unsafe.ReadUnaligned<Block16>(ref Unsafe.Add(ref src, 16))); 84Unsafe.WriteUnaligned(ref Unsafe.Add(ref dest, 32), Unsafe.ReadUnaligned<Block16>(ref Unsafe.Add(ref src, 32))); 99Unsafe.WriteUnaligned(ref Unsafe.Add(ref destEnd, -16), Unsafe.ReadUnaligned<Block16>(ref Unsafe.Add(ref srcEnd, -16))); 118Unsafe.WriteUnaligned(ref Unsafe.Add(ref destEnd, -8), Unsafe.ReadUnaligned<long>(ref Unsafe.Add(ref srcEnd, -8))); 133Unsafe.WriteUnaligned(ref Unsafe.Add(ref destEnd, -4), Unsafe.ReadUnaligned<int>(ref Unsafe.Add(ref srcEnd, -4))); 144Unsafe.WriteUnaligned(ref Unsafe.Add(ref destEnd, -2), Unsafe.ReadUnaligned<short>(ref Unsafe.Add(ref srcEnd, -2))); 205dest = ref Unsafe.Add(ref dest, 64); 206src = ref Unsafe.Add(ref src, 64); 215Unsafe.WriteUnaligned(ref Unsafe.Add(ref destEnd, -16), Unsafe.ReadUnaligned<Block16>(ref Unsafe.Add(ref srcEnd, -16))); 275Unsafe.WriteUnaligned<Block16>(ref Unsafe.Add(ref dest, 16), default); 288Unsafe.WriteUnaligned<Block16>(ref Unsafe.Add(ref dest, 32), default); 303Unsafe.WriteUnaligned<Block16>(ref Unsafe.Add(ref destEnd, -16), default); 322Unsafe.WriteUnaligned<long>(ref Unsafe.Add(ref destEnd, -8), 0); 337Unsafe.WriteUnaligned<int>(ref Unsafe.Add(ref destEnd, -4), 0); 348Unsafe.WriteUnaligned<short>(ref Unsafe.Add(ref destEnd, -2), 0); 404dest = ref Unsafe.Add(ref dest, 64); 413Unsafe.WriteUnaligned<Block16>(ref Unsafe.Add(ref destEnd, -16), default);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (15)
37ref byte valueTail = ref Unsafe.As<char, byte>(ref Unsafe.Add(ref value, 1)); 75ushort ch2Val = Unsafe.Add(ref value, valueTailLength); 142ushort ch2Val = Unsafe.Add(ref value, valueTailLength); 204ushort ch2Val = Unsafe.Add(ref value, valueTailLength); 284ref byte valueTail = ref Unsafe.As<char, byte>(ref Unsafe.Add(ref value, 1)); 300ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, relativeIndex + 1)), 319char ch2Val = Unsafe.Add(ref value, valueTailLength); 322ch2Val = Unsafe.Add(ref value, --ch1ch2Distance); 346ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)), 369char ch2Val = Unsafe.Add(ref value, valueTailLength); 372ch2Val = Unsafe.Add(ref value, --ch1ch2Distance); 396ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)), 419char ch2Val = Unsafe.Add(ref value, valueTailLength); 422ch2Val = Unsafe.Add(ref value, --ch1ch2Distance); 446ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)),
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (15)
23Unsafe.Add(ref Unsafe.Add(ref ip, (nint)pointerSizeLength), -1) = default; 24Unsafe.Add(ref Unsafe.Add(ref ip, (nint)pointerSizeLength), -2) = default; 25Unsafe.Add(ref Unsafe.Add(ref ip, (nint)pointerSizeLength), -3) = default; 26Unsafe.Add(ref Unsafe.Add(ref ip, (nint)pointerSizeLength), -4) = default; 27Unsafe.Add(ref Unsafe.Add(ref ip, (nint)pointerSizeLength), -5) = default; 28Unsafe.Add(ref Unsafe.Add(ref ip, (nint)pointerSizeLength), -6) = default; 29Unsafe.Add(ref Unsafe.Add(ref ip, (nint)pointerSizeLength), -7) = default; 30Unsafe.Add(ref Unsafe.Add(ref ip, (nint)pointerSizeLength), -8) = default; 69Unsafe.Add(ref ip, 2) = default; 70Unsafe.Add(ref ip, 3) = default; 71Unsafe.Add(ref Unsafe.Add(ref ip, (nint)pointerSizeLength), -3) = default; 72Unsafe.Add(ref Unsafe.Add(ref ip, (nint)pointerSizeLength), -2) = default; 78Unsafe.Add(ref ip, 1) = default; 79Unsafe.Add(ref Unsafe.Add(ref ip, (nint)pointerSizeLength), -1) = default; 342first = ref Unsafe.Add(ref first, 1);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Packed.cs (58)
123Unsafe.Add(ref searchSpace, 1) == value || 124Unsafe.Add(ref searchSpace, 2) == value || 125Unsafe.Add(ref searchSpace, 3) == value) 160ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector512<short>.Count)); 173currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector512<short>.Count); 181ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector512<short>.Count); 209ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector256<short>.Count)); 223currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector256<short>.Count); 231ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector256<short>.Count); 267ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * 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); 327if (TNegator.NegateIfNeeded(TTransform.TransformInput(Unsafe.Add(ref searchSpace, 1)) == value)) return 1; 328if (TNegator.NegateIfNeeded(TTransform.TransformInput(Unsafe.Add(ref searchSpace, 2)) == value)) return 2; 329if (TNegator.NegateIfNeeded(TTransform.TransformInput(Unsafe.Add(ref searchSpace, 3)) == value)) return 3; 359ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector512<short>.Count)); 372currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector512<short>.Count); 380ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector512<short>.Count); 408ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector256<short>.Count)); 423currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector256<short>.Count); 431ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector256<short>.Count); 468ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * 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); 533lookUp = TTransform.TransformInput(Unsafe.Add(ref searchSpace, 1)); 535lookUp = TTransform.TransformInput(Unsafe.Add(ref searchSpace, 2)); 537lookUp = TTransform.TransformInput(Unsafe.Add(ref searchSpace, 3)); 569ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector512<short>.Count)); 583currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector512<short>.Count); 591ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector512<short>.Count); 621ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector256<short>.Count)); 636currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector256<short>.Count); 644ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector256<short>.Count); 682ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * 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); 747lookUp = Unsafe.Add(ref searchSpace, 1); 749lookUp = Unsafe.Add(ref searchSpace, 2); 751lookUp = Unsafe.Add(ref searchSpace, 3); 785ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector512<short>.Count)); 799currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector512<short>.Count); 807ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector512<short>.Count); 838ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector256<short>.Count)); 853currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector256<short>.Count); 861ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector256<short>.Count); 900ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * 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); 960uint current = (uint)Unsafe.Add(ref searchSpace, i); 984ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector512<short>.Count)); 997currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector512<short>.Count); 1005ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector512<short>.Count); 1034ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector256<short>.Count)); 1049currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector256<short>.Count); 1057ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector256<short>.Count); 1095ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * 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);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (194)
200ref T valueTail = ref Unsafe.Add(ref value, 1); 212int relativeIndex = IndexOf(ref Unsafe.Add(ref searchSpace, index), valueHead, remainingSearchSpaceLength); 218if (SequenceEqual(ref Unsafe.Add(ref searchSpace, index + 1), ref valueTail, valueTailLength)) 400lookUp = Unsafe.Add(ref searchSpace, index); 403lookUp = Unsafe.Add(ref searchSpace, index + 1); 406lookUp = Unsafe.Add(ref searchSpace, index + 2); 409lookUp = Unsafe.Add(ref searchSpace, index + 3); 412lookUp = Unsafe.Add(ref searchSpace, index + 4); 415lookUp = Unsafe.Add(ref searchSpace, index + 5); 418lookUp = Unsafe.Add(ref searchSpace, index + 6); 421lookUp = Unsafe.Add(ref searchSpace, index + 7); 430lookUp = Unsafe.Add(ref searchSpace, index); 433lookUp = Unsafe.Add(ref searchSpace, index + 1); 436lookUp = Unsafe.Add(ref searchSpace, index + 2); 439lookUp = Unsafe.Add(ref searchSpace, index + 3); 448lookUp = Unsafe.Add(ref searchSpace, index); 459lookUp = Unsafe.Add(ref searchSpace, index); 506lookUp = Unsafe.Add(ref searchSpace, index); 509lookUp = Unsafe.Add(ref searchSpace, index + 1); 512lookUp = Unsafe.Add(ref searchSpace, index + 2); 515lookUp = Unsafe.Add(ref searchSpace, index + 3); 518lookUp = Unsafe.Add(ref searchSpace, index + 4); 521lookUp = Unsafe.Add(ref searchSpace, index + 5); 524lookUp = Unsafe.Add(ref searchSpace, index + 6); 527lookUp = Unsafe.Add(ref searchSpace, index + 7); 536lookUp = Unsafe.Add(ref searchSpace, index); 539lookUp = Unsafe.Add(ref searchSpace, index + 1); 542lookUp = Unsafe.Add(ref searchSpace, index + 2); 545lookUp = Unsafe.Add(ref searchSpace, index + 3); 554lookUp = Unsafe.Add(ref searchSpace, index); 565lookUp = Unsafe.Add(ref searchSpace, index); 626T candidate = Unsafe.Add(ref searchSpace, i); 629if (Unsafe.Add(ref value, j)!.Equals(candidate)) 643T candidate = Unsafe.Add(ref searchSpace, i); 648if (candidate.Equals(Unsafe.Add(ref value, j))) 658if (Unsafe.Add(ref value, j) is null) 687ref T valueTail = ref Unsafe.Add(ref value, 1); 702if (SequenceEqual(ref Unsafe.Add(ref searchSpace, relativeIndex + 1), ref valueTail, valueTailLength)) 722if (value.Equals(Unsafe.Add(ref searchSpace, length + 7))) 724if (value.Equals(Unsafe.Add(ref searchSpace, length + 6))) 726if (value.Equals(Unsafe.Add(ref searchSpace, length + 5))) 728if (value.Equals(Unsafe.Add(ref searchSpace, length + 4))) 730if (value.Equals(Unsafe.Add(ref searchSpace, length + 3))) 732if (value.Equals(Unsafe.Add(ref searchSpace, length + 2))) 734if (value.Equals(Unsafe.Add(ref searchSpace, length + 1))) 736if (value.Equals(Unsafe.Add(ref searchSpace, length))) 744if (value.Equals(Unsafe.Add(ref searchSpace, length + 3))) 746if (value.Equals(Unsafe.Add(ref searchSpace, length + 2))) 748if (value.Equals(Unsafe.Add(ref searchSpace, length + 1))) 750if (value.Equals(Unsafe.Add(ref searchSpace, length))) 758if (value.Equals(Unsafe.Add(ref searchSpace, length))) 766if ((object?)Unsafe.Add(ref searchSpace, length) is null) 806lookUp = Unsafe.Add(ref searchSpace, length + 7); 809lookUp = Unsafe.Add(ref searchSpace, length + 6); 812lookUp = Unsafe.Add(ref searchSpace, length + 5); 815lookUp = Unsafe.Add(ref searchSpace, length + 4); 818lookUp = Unsafe.Add(ref searchSpace, length + 3); 821lookUp = Unsafe.Add(ref searchSpace, length + 2); 824lookUp = Unsafe.Add(ref searchSpace, length + 1); 827lookUp = Unsafe.Add(ref searchSpace, length); 836lookUp = Unsafe.Add(ref searchSpace, length + 3); 839lookUp = Unsafe.Add(ref searchSpace, length + 2); 842lookUp = Unsafe.Add(ref searchSpace, length + 1); 845lookUp = Unsafe.Add(ref searchSpace, length); 854lookUp = Unsafe.Add(ref searchSpace, length); 863lookUp = Unsafe.Add(ref searchSpace, length); 911lookUp = Unsafe.Add(ref searchSpace, length + 7); 914lookUp = Unsafe.Add(ref searchSpace, length + 6); 917lookUp = Unsafe.Add(ref searchSpace, length + 5); 920lookUp = Unsafe.Add(ref searchSpace, length + 4); 923lookUp = Unsafe.Add(ref searchSpace, length + 3); 926lookUp = Unsafe.Add(ref searchSpace, length + 2); 929lookUp = Unsafe.Add(ref searchSpace, length + 1); 932lookUp = Unsafe.Add(ref searchSpace, length); 941lookUp = Unsafe.Add(ref searchSpace, length + 3); 944lookUp = Unsafe.Add(ref searchSpace, length + 2); 947lookUp = Unsafe.Add(ref searchSpace, length + 1); 950lookUp = Unsafe.Add(ref searchSpace, length); 959lookUp = Unsafe.Add(ref searchSpace, length); 968lookUp = Unsafe.Add(ref searchSpace, length); 1018T candidate = Unsafe.Add(ref searchSpace, i); 1021if (Unsafe.Add(ref value, j)!.Equals(candidate)) 1032T candidate = Unsafe.Add(ref searchSpace, i); 1037if (candidate.Equals(Unsafe.Add(ref value, j))) 1047if (Unsafe.Add(ref value, j) is null) 1065if (!EqualityComparer<T>.Default.Equals(Unsafe.Add(ref searchSpace, i), value0)) 1080if (!EqualityComparer<T>.Default.Equals(Unsafe.Add(ref searchSpace, i), value0)) 1095ref T current = ref Unsafe.Add(ref searchSpace, i); 1111ref T current = ref Unsafe.Add(ref searchSpace, i); 1127ref T current = ref Unsafe.Add(ref searchSpace, i); 1145ref T current = ref Unsafe.Add(ref searchSpace, i); 1163ref T current = ref Unsafe.Add(ref searchSpace, i); 1182ref T current = ref Unsafe.Add(ref searchSpace, i); 1297T lookUp = Unsafe.Add(ref second, i); 1298int result = (Unsafe.Add(ref first, i)?.CompareTo(lookUp) ?? (((object?)lookUp is null) ? 0 : -1)); 1384currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector512<T>.Count); 1411currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector256<T>.Count); 1441currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<T>.Count); 1563ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector512<TValue>.Count); 1575currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector512<TValue>.Count); 1594ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector256<TValue>.Count); 1602currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector256<TValue>.Count); 1624ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 1632currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 1721lookUp = Unsafe.Add(ref current, 1); 1723lookUp = Unsafe.Add(ref current, 2); 1725lookUp = Unsafe.Add(ref current, 3); 1727lookUp = Unsafe.Add(ref current, 4); 1729lookUp = Unsafe.Add(ref current, 5); 1731lookUp = Unsafe.Add(ref current, 6); 1733lookUp = Unsafe.Add(ref current, 7); 1747lookUp = Unsafe.Add(ref current, 1); 1749lookUp = Unsafe.Add(ref current, 2); 1751lookUp = Unsafe.Add(ref current, 3); 1788ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector512<TValue>.Count); 1797currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector512<TValue>.Count); 1820ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector256<TValue>.Count); 1829currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector256<TValue>.Count); 1852ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 1861currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 1928lookUp = Unsafe.Add(ref current, 1); 1930lookUp = Unsafe.Add(ref current, 2); 1932lookUp = Unsafe.Add(ref current, 3); 1934lookUp = Unsafe.Add(ref current, 4); 1936lookUp = Unsafe.Add(ref current, 5); 1938lookUp = Unsafe.Add(ref current, 6); 1940lookUp = Unsafe.Add(ref current, 7); 1954lookUp = Unsafe.Add(ref current, 1); 1956lookUp = Unsafe.Add(ref current, 2); 1958lookUp = Unsafe.Add(ref current, 3); 1995ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector512<TValue>.Count); 2004currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector512<TValue>.Count); 2027ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector256<TValue>.Count); 2036currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector256<TValue>.Count); 2059ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 2068currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 2118lookUp = Unsafe.Add(ref current, 1); 2120lookUp = Unsafe.Add(ref current, 2); 2122lookUp = Unsafe.Add(ref current, 3); 2151ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector512<TValue>.Count); 2161currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector512<TValue>.Count); 2185ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector256<TValue>.Count); 2195currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector256<TValue>.Count); 2219ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count); 2229currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 2280lookUp = Unsafe.Add(ref current, 1); 2282lookUp = Unsafe.Add(ref current, 2); 2284lookUp = Unsafe.Add(ref current, 3); 2325currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector512<TValue>.Count); 2360currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector256<TValue>.Count); 2395currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.Count); 2568lookUp = Unsafe.Add(ref current, -1); 2570lookUp = Unsafe.Add(ref current, -2); 2572lookUp = Unsafe.Add(ref current, -3); 2574lookUp = Unsafe.Add(ref current, -4); 2576lookUp = Unsafe.Add(ref current, -5); 2578lookUp = Unsafe.Add(ref current, -6); 2580lookUp = Unsafe.Add(ref current, -7); 2594lookUp = Unsafe.Add(ref current, -1); 2596lookUp = Unsafe.Add(ref current, -2); 2598lookUp = Unsafe.Add(ref current, -3); 2753lookUp = Unsafe.Add(ref current, -1); 2755lookUp = Unsafe.Add(ref current, -2); 2757lookUp = Unsafe.Add(ref current, -3); 2759lookUp = Unsafe.Add(ref current, -4); 2761lookUp = Unsafe.Add(ref current, -5); 2763lookUp = Unsafe.Add(ref current, -6); 2765lookUp = Unsafe.Add(ref current, -7); 2779lookUp = Unsafe.Add(ref current, -1); 2781lookUp = Unsafe.Add(ref current, -2); 2783lookUp = Unsafe.Add(ref current, -3); 2937lookUp = Unsafe.Add(ref current, -1); 2939lookUp = Unsafe.Add(ref current, -2); 2941lookUp = Unsafe.Add(ref current, -3); 3204lookUp = Unsafe.Add(ref current, -1); 3206lookUp = Unsafe.Add(ref current, -2); 3208lookUp = Unsafe.Add(ref current, -3); 3443ref T current = ref Unsafe.Add(ref searchSpace, i); 3458ref T current = ref Unsafe.Add(ref searchSpace, i); 3506ref T current = ref Unsafe.Add(ref searchSpace, i); 3531current = ref Unsafe.Add(ref current, Vector128<T>.Count); 3560current = ref Unsafe.Add(ref current, Vector256<T>.Count); 3589current = ref Unsafe.Add(ref current, Vector256<T>.Count); 3609ref T current = ref Unsafe.Add(ref searchSpace, i); 3624ref T current = ref Unsafe.Add(ref searchSpace, i); 3653ref T current = ref Unsafe.Add(ref searchSpace, i); 3749ref T end = ref Unsafe.Add(ref current, length); 3759current = ref Unsafe.Add(ref current, 1); 3771current = ref Unsafe.Add(ref current, 1); 3781ref T end = ref Unsafe.Add(ref current, length); 3792current = ref Unsafe.Add(ref current, Vector512<T>.Count); 3807current = ref Unsafe.Add(ref current, Vector256<T>.Count); 3822current = ref Unsafe.Add(ref current, Vector128<T>.Count); 3840current = ref Unsafe.Add(ref current, 1);
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (3)
421return Ordinal.CompareStringIgnoreCase(ref Unsafe.Add(ref strA.GetRawStringData(), indexA), lengthA, ref Unsafe.Add(ref strB.GetRawStringData(), indexB), lengthB); 570Ordinal.EqualsIgnoreCase(ref Unsafe.Add(ref GetRawStringData(), Length - value.Length),
src\libraries\System.Private.CoreLib\src\System\String.cs (5)
112source: ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(value), startIndex)); 427destination: ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(destination), destinationIndex), 428source: ref Unsafe.Add(ref _firstChar, sourceIndex), 497source: ref Unsafe.Add(ref _firstChar, startIndex), 573Unsafe.Add(ref result._firstChar, 1) = c2;
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (12)
63destination: ref Unsafe.Add(ref dest._firstChar, destPos), 713Buffer.Memmove(ref Unsafe.Add(ref result._firstChar, startIndex), ref value._firstChar, (nuint)insertLength); 714Buffer.Memmove(ref Unsafe.Add(ref result._firstChar, startIndex + insertLength), ref Unsafe.Add(ref _firstChar, startIndex), (nuint)(oldLength - startIndex)); 1101ref char dest = ref Unsafe.Add(ref result._firstChar, copiedLength); 1138Buffer.Memmove(ref Unsafe.Add(ref result._firstChar, count), ref _firstChar, (nuint)oldLength); 1156new Span<char>(ref Unsafe.Add(ref result._firstChar, oldLength), count).Fill(paddingChar); 1177Buffer.Memmove(ref Unsafe.Add(ref result._firstChar, startIndex), ref Unsafe.Add(ref _firstChar, startIndex + count), (nuint)(newLength - startIndex)); 1357int pos = PackedSpanHelpers.IndexOf(ref Unsafe.Add(ref _firstChar, i), c, Length - i); 1370int pos = SpanHelpers.NonPackedIndexOfChar(ref Unsafe.Add(ref _firstChar, i), c, Length - i); 1386int pos = SpanHelpers.IndexOf(ref Unsafe.Add(ref _firstChar, i), Length - i, ref oldValue._firstChar, oldValue.Length);
src\libraries\System.Private.CoreLib\src\System\String.Searching.cs (4)
98int result = SpanHelpers.IndexOfChar(ref Unsafe.Add(ref _firstChar, startIndex), value, count); 138int result = new ReadOnlySpan<char>(ref Unsafe.Add(ref _firstChar, startIndex), count).IndexOfAny(anyOf); 295int result = SpanHelpers.LastIndexOfValueType(ref Unsafe.As<char, short>(ref Unsafe.Add(ref _firstChar, startSearchAt)), (short)value, count); 343int result = new ReadOnlySpan<char>(ref Unsafe.Add(ref _firstChar, startSearchAt), count).LastIndexOfAny(anyOf);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.cs (3)
63Unsafe.ReadUnaligned<uint>(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref searchSpace, length - sizeof(uint))))); 103Unsafe.ReadUnaligned<ulong>(ref Unsafe.Subtract(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref searchSpace, length)), sizeof(ulong)))); 106ref T searchSpaceEnd = ref Unsafe.Add(ref searchSpace, length);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (4)
83currentRightSearchSpace = ref Unsafe.Add(ref currentRightSearchSpace, Vector512<TLeft>.Count); 84currentLeftSearchSpace = ref Unsafe.Add(ref currentLeftSearchSpace, Vector512<TLeft>.Count); 113currentRightSearchSpace = ref Unsafe.Add(ref currentRightSearchSpace, Vector256<TLeft>.Count); 114currentLeftSearchSpace = ref Unsafe.Add(ref currentLeftSearchSpace, Vector256<TLeft>.Count);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (14)
1295Unsafe.Add(ref outputBuffer, 1) = (byte)value; 1297Unsafe.Add(ref outputBuffer, 2) = (byte)value; 1299Unsafe.Add(ref outputBuffer, 3) = (byte)value; 1303Unsafe.Add(ref outputBuffer, 3) = (byte)value; 1305Unsafe.Add(ref outputBuffer, 2) = (byte)value; 1307Unsafe.Add(ref outputBuffer, 1) = (byte)value; 1327Unsafe.Add(ref outputBuffer, 1) = (byte)(value >> 16); 1331Unsafe.Add(ref outputBuffer, 1) = (byte)value; 2297Unsafe.Add(ref outputBuffer, 1) = (char)(byte)value; 2299Unsafe.Add(ref outputBuffer, 2) = (char)(byte)value; 2301Unsafe.Add(ref outputBuffer, 3) = (char)value; 2305Unsafe.Add(ref outputBuffer, 3) = (char)(byte)value; 2307Unsafe.Add(ref outputBuffer, 2) = (char)(byte)value; 2309Unsafe.Add(ref outputBuffer, 1) = (char)(byte)value;
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.Helpers.cs (8)
68Unsafe.Add(ref outputBuffer, 1) = (byte)value; 70Unsafe.Add(ref outputBuffer, 2) = (byte)value; 72Unsafe.Add(ref outputBuffer, 3) = (byte)value; 76Unsafe.Add(ref outputBuffer, 3) = (byte)value; 78Unsafe.Add(ref outputBuffer, 2) = (byte)value; 80Unsafe.Add(ref outputBuffer, 1) = (byte)value; 100Unsafe.Add(ref outputBuffer, 1) = (byte)(value >> 16); 104Unsafe.Add(ref outputBuffer, 1) = (byte)value;
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (7)
340ref Unsafe.Add(ref result.GetRawStringData(), chunkOffset), 787Append(ref Unsafe.Add(ref value.GetRawStringData(), startIndex), count); 2277ref char destination = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(chunkChars), chunkLength); 2283Unsafe.Add(ref destination, 1) = Unsafe.Add(ref value, 1); 2324new ReadOnlySpan<char>(ref Unsafe.Add(ref value, firstLength), restLength).CopyTo(m_ChunkChars); 2491value = ref Unsafe.Add(ref value, lengthToCopy);
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Helpers.cs (9)
737Unsafe.WriteUnaligned(ref Unsafe.Add(ref outputBuffer, 4), (ushort)(((value >> 22) & 0x3Fu) + ((value >> 8) & 0x3F00u) + 0x8080u)); // = [ 10XXXXXX 10YYYYYY ] 744Unsafe.Add(ref outputBuffer, 5) = (byte)((value & 0x3Fu) | 0x80u); 745Unsafe.Add(ref outputBuffer, 4) = (byte)(((value >>= 6) & 0x3Fu) | 0x80u); 746Unsafe.Add(ref outputBuffer, 3) = (byte)(((value >>= 6) & 0x0Fu) | 0xE0u); 747Unsafe.Add(ref outputBuffer, 2) = (byte)(((value >>= 4) & 0x3Fu) | 0x80u); 748Unsafe.Add(ref outputBuffer, 1) = (byte)(((value >>= 6) & 0x3Fu) | 0x80u); 771Unsafe.Add(ref outputBuffer, 2) = (byte)((value & 0x3Fu) | ~0x7Fu); // [ 10xxxxxx ] 778Unsafe.Add(ref outputBuffer, 2) = (byte)(((value >>= 16) & 0x3Fu) | 0x80u); 779Unsafe.Add(ref outputBuffer, 1) = (byte)(((value >>= 6) & 0x3Fu) | 0x80u);
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (3)
851sourceRef = ref Unsafe.Add(ref sourceRef, source.Length - Size); 870result |= Unsafe.Add(ref sourceRef, i); 926UInt128 part = Unsafe.Add(ref sourceRef, i);
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
322sourceRef = ref Unsafe.Add(ref sourceRef, source.Length - sizeof(ushort));
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (3)
343sourceRef = ref Unsafe.Add(ref sourceRef, source.Length - sizeof(uint)); 362result |= Unsafe.Add(ref sourceRef, i); 418uint part = Unsafe.Add(ref sourceRef, i);
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (3)
342sourceRef = ref Unsafe.Add(ref sourceRef, source.Length - sizeof(ulong)); 361result |= Unsafe.Add(ref sourceRef, i); 417ulong part = Unsafe.Add(ref sourceRef, i);
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (3)
346sourceRef = ref Unsafe.Add(ref sourceRef, source.Length - sizeof(nuint_t)); 365result |= Unsafe.Add(ref sourceRef, i); 421nuint part = Unsafe.Add(ref sourceRef, i);
src\System\Runtime\CompilerServices\StaticsHelpers.cs (2)
183object? threadStaticObjectNonCollectible = Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(t_ThreadStatics->NonCollectibleTlsArrayData), indexOffset - ThreadLocalData.NUMBER_OF_TLSOFFSETS_NOT_USED_IN_NONCOLLECTIBLE_ARRAY); 192return ref Unsafe.Add(ref Unsafe.AsRef<byte>(t_ThreadStatics), indexOffset);
src\System\RuntimeType.BoxCache.cs (1)
85source = ref Unsafe.Add(ref source, _nullableValueOffset);
System.Private.DataContractSerialization (3)
System\Xml\XmlBinaryWriter.cs (3)
110ref byte bytePtr = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(buffer), offset); 113Unsafe.WriteUnaligned<T>(ref Unsafe.Add(ref bytePtr, 1), value); 125ref byte bytePtr = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(buffer), offset);
System.Private.Xml (1)
System\Xml\XmlCharType.cs (1)
186private static uint GetCharProperties(char ch) => Unsafe.Add(ref MemoryMarshal.GetReference(CharProperties), ch);
System.Runtime.Numerics (35)
System\Number.BigInteger.cs (1)
1238ref TChar lastWholeBlockStart = ref Unsafe.Add(ref MemoryMarshal.GetReference(input), input.Length - TParser.DigitsPerBlock);
System\Numerics\BigInteger.cs (7)
3680ref byte address = ref Unsafe.Add(ref startAddress, (bits.Length - 1) * sizeof(uint)); 3701ref byte address = ref Unsafe.Add(ref startAddress, byteCount - sizeof(uint)); 3748Debug.Assert(Unsafe.AreSame(ref startAddress, ref Unsafe.Add(ref address, sizeof(uint)))); 3793address = ref Unsafe.Add(ref address, sizeof(uint)); 3802ref byte lastAddress = ref Unsafe.Add(ref address, byteCount - sizeof(uint)); 3818address = ref Unsafe.Add(ref address, sizeof(uint)); 3835address = ref Unsafe.Add(ref address, sizeof(uint));
System\Numerics\BigIntegerCalculator.AddSub.cs (16)
49carry += Unsafe.Add(ref leftPtr, i); 50carry += Unsafe.Add(ref rightPtr, i); 51Unsafe.Add(ref resultPtr, i) = unchecked((uint)carry); 76long digit = (Unsafe.Add(ref leftPtr, i) + carry) + right[i]; 77Unsafe.Add(ref leftPtr, i) = unchecked((uint)digit); 122carry += Unsafe.Add(ref leftPtr, i); 123carry -= Unsafe.Add(ref rightPtr, i); 124Unsafe.Add(ref resultPtr, i) = unchecked((uint)carry); 152long digit = (Unsafe.Add(ref leftPtr, i) + carry) - right[i]; 153Unsafe.Add(ref leftPtr, i) = unchecked((uint)digit); 182Unsafe.Add(ref resultPtr, i) = unchecked((uint)carry); 186Unsafe.Add(ref resultPtr, left.Length) = unchecked((uint)carry); 193Unsafe.Add(ref resultPtr, i) = unchecked((uint)carry); 205Unsafe.Add(ref resultPtr, left.Length) = unchecked((uint)carry); 229Unsafe.Add(ref resultPtr, i) = unchecked((uint)carry); 238Unsafe.Add(ref resultPtr, i) = unchecked((uint)carry);
System\Numerics\BigIntegerCalculator.SquMul.cs (11)
57ulong digit1 = Unsafe.Add(ref resultPtr, i + j) + carry; 59Unsafe.Add(ref resultPtr, i + j) = unchecked((uint)(digit1 + (digit2 << 1))); 63Unsafe.Add(ref resultPtr, i + i) = unchecked((uint)digits); 64Unsafe.Add(ref resultPtr, i + i + 1) = (uint)(digits >> 32); 352ref uint elementPtr = ref Unsafe.Add(ref resultPtr, i + j); 357Unsafe.Add(ref resultPtr, i + left.Length) = (uint)carry; 384long digit = (Unsafe.Add(ref corePtr, i) + carry) - Unsafe.Add(ref leftPtr, i) - right[i]; 385Unsafe.Add(ref corePtr, i) = unchecked((uint)digit); 391long digit = (Unsafe.Add(ref corePtr, i) + carry) - left[i]; 392Unsafe.Add(ref corePtr, i) = unchecked((uint)digit);
System.Text.Json (1)
src\libraries\System.Private.CoreLib\src\System\Marvin.cs (1)
116uint partialResult = Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref Unsafe.AddByteOffset(ref data, (nuint)count & 7), -4));
Test.Utilities (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);
Text.Analyzers (24)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (24)
48Unsafe.Add(ref destination, 1) = (byte)(value >> 8); 49Unsafe.Add(ref destination, 2) = (byte)value; 56int i1 = Unsafe.Add(ref encodedChars, 1); 57int i2 = Unsafe.Add(ref encodedChars, 2); 58int i3 = Unsafe.Add(ref encodedChars, 3); 63i0 = Unsafe.Add(ref decodingMap, i0); 64i1 = Unsafe.Add(ref decodingMap, i1); 65i2 = Unsafe.Add(ref decodingMap, i2); 66i3 = Unsafe.Add(ref decodingMap, i3); 227int result = Decode(ref Unsafe.Add(ref srcChars, sourceIndex), ref decodingMap); 230WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); 245int i0 = Unsafe.Add(ref srcChars, srcLength - 4); 246int i1 = Unsafe.Add(ref srcChars, srcLength - 3); 247int i2 = Unsafe.Add(ref srcChars, srcLength - 2); 248int i3 = Unsafe.Add(ref srcChars, srcLength - 1); 252i0 = Unsafe.Add(ref decodingMap, i0); 253i1 = Unsafe.Add(ref decodingMap, i1); 262i2 = Unsafe.Add(ref decodingMap, i2); 263i3 = Unsafe.Add(ref decodingMap, i3); 274WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); 279i2 = Unsafe.Add(ref decodingMap, i2); 289Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); 290Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); 299Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16);