649 instantiations of Span
aspire-tray (3)
GenerateDocumentationAndConfigFiles (8)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (8)
173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes));
260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length));
275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize));
314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex);
390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes));
391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
ILCompiler.Compiler (8)
ILCompiler.ReadyToRun (13)
parent\parent\Common\JitInterface\CorInfoImpl.cs (5)
2302str.AsSpan(startIndex, Math.Min(size, result)).CopyTo(new Span<char>(buffer, size));
2319OperationStatus status = Utf8.FromUtf16(utf16, new Span<byte>(buffer, checked((int)(bufferSize - 1))), out _, out written);
2735new Span<byte>(gcPtrs, (int)((size + PointerSize - 1) / PointerSize)).Clear();
4447Span<AllocMemChunk> chunks = new Span<AllocMemChunk>(args.chunks, checked((int)args.chunksCount));
5356rvaData.Slice(valueOffset, bufferSize).CopyTo(new Span<byte>(buffer, bufferSize));
ILCompiler.RyuJit (12)
parent\parent\Common\JitInterface\CorInfoImpl.cs (5)
2302str.AsSpan(startIndex, Math.Min(size, result)).CopyTo(new Span<char>(buffer, size));
2319OperationStatus status = Utf8.FromUtf16(utf16, new Span<byte>(buffer, checked((int)(bufferSize - 1))), out _, out written);
2735new Span<byte>(gcPtrs, (int)((size + PointerSize - 1) / PointerSize)).Clear();
4447Span<AllocMemChunk> chunks = new Span<AllocMemChunk>(args.chunks, checked((int)args.chunksCount));
5356rvaData.Slice(valueOffset, bufferSize).CopyTo(new Span<byte>(buffer, bufferSize));
libmscordaccore_universal (2)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.Http.Connections.Common (1)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.Razor.Utilities.Shared (8)
Utilities\Hashing\XxHashShared.cs (8)
172DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes));
259source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length));
274source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize));
313source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
326source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
330Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex);
389new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes));
390new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.AspNetCore.Server.HttpSys (10)
Microsoft.AspNetCore.Server.IIS (7)
Microsoft.AspNetCore.Server.Kestrel.Core (5)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (3)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (3)
Microsoft.AspNetCore.SignalR.Common (2)
Microsoft.AspNetCore.SignalR.Protocols.Json (2)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (2)
Microsoft.AspNetCore.WebUtilities (3)
Microsoft.Build (2)
Microsoft.Build.Framework (1)
Microsoft.Build.Tasks.Core (2)
Microsoft.CodeAnalysis (8)
Hashing\XxHashShared.cs (8)
173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes));
260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length));
275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize));
314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex);
390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes));
391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CodeAnalysis.Analyzers (8)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (8)
173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes));
260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length));
275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize));
314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex);
390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes));
391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CodeAnalysis.AnalyzerUtilities (8)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (8)
173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes));
260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length));
275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize));
314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex);
390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes));
391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CodeAnalysis.CodeStyle (8)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (8)
173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes));
260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length));
275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize));
314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex);
390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes));
391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CodeAnalysis.ResxSourceGenerator (8)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (8)
173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes));
260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length));
275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize));
314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex);
390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes));
391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CodeAnalysis.Workspaces (9)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (8)
173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes));
260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length));
275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize));
314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex);
390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes));
391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CSharp (2)
Microsoft.Diagnostics.DataContractReader (1)
Microsoft.Diagnostics.DataContractReader.Contracts (2)
Microsoft.Diagnostics.DataContractReader.Legacy (30)
Dbi\DacDbiImpl.cs (21)
512blob.AsSpan().CopyTo(new Span<byte>(pBuffer, blobLength));
1013contextBuffer.AsSpan().CopyTo(new Span<byte>((void*)pOriginalContext, (int)cbSizeContext));
1772byte[] contextBuf = new Span<byte>(contextBuffer.pContextBytes, (int)expectedContextSize).ToArray();
1831seedContext.AsSpan().CopyTo(new Span<byte>(contextBuffer.pContextBytes, (int)expectedContextSize));
1848new Span<byte>(pLocal, (int)expectedContextSize).Clear();
1929context.AsSpan().CopyTo(new Span<byte>(contextBuffer.pContextBytes, (int)expectedContextSize));
2068ctx.FillFromBuffer(new Span<byte>(contextBuffer.pContextBytes, (int)ctx.Size));
2254context.AsSpan().CopyTo(new Span<byte>(contextBuffer.pContextBytes, context.Length));
2628givenCtx.FillFromBuffer(new Span<byte>(contextBuffer.pContextBytes, (int)expectedContextSize));
2668context.AsSpan().CopyTo(new Span<byte>(contextBuffer.pContextBytes, (int)expectedContextSize));
6692ctx.FillFromBuffer(new Span<byte>(contextBuffer.pContextBytes, (int)ctx.Size));
6730ctx1.FillFromBuffer(new Span<byte>(contextBuffer1.pContextBytes, (int)ctx1.Size));
6731ctx2.FillFromBuffer(new Span<byte>(contextBuffer2.pContextBytes, (int)ctx2.Size));
6775srcCtx.FillFromBuffer(new Span<byte>(sourceContext.pContextBytes, (int)Math.Min(sourceContext.contextSize, srcCtx.Size)));
6777dstCtx.FillFromBuffer(new Span<byte>(destinationContext.pContextBytes, (int)Math.Min(destinationContext.contextSize, dstCtx.Size)));
6797dstCtx.GetBytes()[..destinationSize].CopyTo(new Span<byte>(destinationContext.pContextBytes, destinationSize));
6839Span<byte> bufSpan = new Span<byte>(contextBuffer.pContextBytes, (int)ctx.Size);
6891ctx.FillFromBuffer(new Span<byte>(contextBuffer.pContextBytes, (int)ctx.Size));
6973new Span<byte>(pAvailable, (int)regCount).Clear();
7067Span<byte> buf = new Span<byte>(contextBuffer.pContextBytes, (int)ctx.Size);
7085valueBytes.CopyTo(MemoryMarshal.AsBytes(new Span<double>(ref value)));
Microsoft.DotNet.Cli.CoreUtils (2)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Caching.Memory (1)
Microsoft.Extensions.Logging.Console (1)
Microsoft.ML.CpuMath.PerformanceTests (22)
Microsoft.ML.ImageAnalytics (1)
Microsoft.ML.TensorFlow (2)
Microsoft.ML.Tokenizers (1)
Microsoft.ML.Transforms (3)
Microsoft.Private.Windows.Core (18)
Microsoft.TestPlatform.AdapterUtilities (8)
Microsoft.VisualStudio.TestPlatform.ObjectModel (8)
PresentationCore (1)
PresentationFramework (4)
Roslyn.Diagnostics.Analyzers (8)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (8)
173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes));
260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length));
275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize));
314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex);
390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes));
391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
sdk-tasks (2)
System.Collections.Immutable (4)
System.ComponentModel.TypeConverter (1)
System.Console (3)
System.Data.Common (1)
System.Data.OleDb (2)
System.Diagnostics.DiagnosticSource (1)
System.Diagnostics.Process (5)
System.Formats.Asn1 (5)
System.Formats.Cbor (1)
System.Formats.Tar (1)
System.IO.Compression (10)
System.IO.Compression.Brotli (4)
System.IO.Hashing (8)
System\IO\Hashing\XxHashShared.cs (8)
169DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes));
252source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length));
267source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize));
306source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
319source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
323Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex);
382new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes));
383new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
System.IO.Packaging (1)
System.IO.Pipelines (1)
System.IO.Pipes (2)
System.Linq (1)
System.Linq.AsyncEnumerable (2)
System.Memory (2)
System.Net.Http (4)
System.Net.Http.WinHttpHandler (1)
System.Net.Mail (1)
System.Net.NameResolution (1)
System.Net.Ping (2)
System.Net.Primitives (4)
System.Net.Quic (10)
System.Net.Requests (1)
System.Net.Security (10)
System.Net.ServerSentEvents (1)
System.Net.Sockets (9)
System\Net\Sockets\SocketAsyncContext.Unix.cs (2)
359bool completed = SocketPal.TryCompleteReceiveFrom(context._socket, new Span<byte>(BufferPtr, Length), null, Flags, SocketAddress.Span, out int socketAddressLen, out BytesTransferred, out ReceivedFlags, out ErrorCode);
416bool completed = SocketPal.TryCompleteReceiveMessageFrom(context._socket, new Span<byte>(BufferPtr, Length), null, Flags, SocketAddress!, out int socketAddressLen, IsIPv4, IsIPv6, out BytesTransferred, out ReceivedFlags, out IPPacketInformation, out ErrorCode);
System\Net\Sockets\SocketPal.Unix.cs (6)
781if (SysReceive(socket, SocketFlags.None, new Span<byte>(&buffer, 0), out Interop.Error receiveErr) < 0)
818received = SysReceive(socket, flags | SocketFlags.Peek, new Span<byte>(&oneBytePeekBuffer, 1), out errno);
894received = SysReceive(socket, flags | SocketFlags.Peek, new Span<byte>(&oneBytePeekBuffer, 1), socketAddress, out receivedSocketAddressLength, out receivedFlags, out errno);
1322bool completed = TryCompleteReceive(handle, new Span<byte>(buffer, offset, count), socketFlags, out bytesTransferred, out errorCode);
1352if (!TryCompleteReceiveMessageFrom(handle, new Span<byte>(buffer, offset, count), null, socketFlags, socketAddress.Buffer, out socketAddressLen, isIPv4, isIPv6, out bytesTransferred, out socketFlags, out ipPacketInformation, out errorCode))
1397bool completed = TryCompleteReceiveFrom(handle, new Span<byte>(buffer, offset, count), socketFlags, socketAddress.Span, out socketAddressLen, out bytesTransferred, out socketFlags, out errorCode);
System.Net.WebSockets (4)
System.Private.CoreLib (167)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Array.cs (8)
1523new Span<T>(array).Fill(value);
1554new Span<T>(ref first, count).Fill(value);
2551var span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(array), array.Length);
2600var span = new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index), length);
2624var spanKeys = new Span<TKey>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(keys), index), length);
2625var spanItems = new Span<TValue>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(items), index), length);
2642var span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(array), array.Length);
3109new Span<T>(ref Unsafe.As<byte, T>(ref MemoryMarshal.GetArrayDataReference(array)), array.Length).Slice(adjustedIndex, length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (7)
993TryFormatS(dateTime, new Span<char>(ref str.GetRawStringData(), str.Length), out int charsWritten);
1000TryFormatInvariantG(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out int charsWritten);
1019TryFormatInvariantG(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out int charsWritten);
1045TryFormatR(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out charsWritten);
1052TryFormatS(dateTime, new Span<char>(ref str.GetRawStringData(), str.Length), out charsWritten);
1059TryFormatu(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out charsWritten);
1079TryFormatInvariantG(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out charsWritten);
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (9)
39return new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), (nint)(uint)start /* force zero-extension */), array.Length - start);
63return new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), (nint)(uint)actualIndex /* force zero-extension */), array.Length - actualIndex);
87return new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), (nint)(uint)start /* force zero-extension */), length);
3729return new Span<T>(array);
3747return new Span<T>(array, start, length);
3756return new Span<T>(segment.Array, segment.Offset, segment.Count);
3776return new Span<T>(segment.Array, segment.Offset + start, segment.Count - start);
3812return new Span<T>(segment.Array, segment.Offset + start, length);
3824return new Span<T>(segment.Array, segment.Offset + start, length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.DecimalIeee754.DiyFp128InvHyper.cs (4)
41DiyFp128AddSub(tmp, DiyFp128One, UxAdd, new Span<DiyFp128>(ref one)); // x^2 + 1
50DiyFp128AddSub(tmp, DiyFp128One, UxAdd, new Span<DiyFp128>(ref one)); // sqrt(x^2 + 1) + 1
56DiyFp128AddSub(tmp, x, UxAdd, new Span<DiyFp128>(ref one)); // sqrt(x^2 + 1) + x
91DiyFp128AddSub(root, x, UxAdd, new Span<DiyFp128>(ref sum)); // sqrt(x^2 - 1) + x
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.DecimalIeee754.DiyFp128Pow.cs (7)
219DiyFp128AddSub(tmp[1], tmp[0], UxSub, new Span<DiyFp128>(ref single)); tmp[0] = single;
220DiyFp128AddSub(tmp[0], tmp[2], UxSub, new Span<DiyFp128>(ref single)); tmp[0] = single;
225DiyFp128AddSub(tmp[0], tmp[1], UxSub, new Span<DiyFp128>(ref single)); z = single;
228DiyFp128AddSub(z, log2Lo, UxAdd, new Span<DiyFp128>(ref single)); log2Lo = single;
285DiyFp128AddSub(h, tmp[1], UxSub, new Span<DiyFp128>(ref single)); h = single;
286DiyFp128AddSub(h, tmp[0], UxAdd, new Span<DiyFp128>(ref single)); h = single;
291DiyFp128AddSub(tmp[0], h, UxAdd, new Span<DiyFp128>(ref single)); h = single;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (9)
231new Span<T>(source, startIndex, length).CopyTo(new Span<T>((void*)destination, length));
284new Span<T>((void*)source, length).CopyTo(new Span<T>(destination, startIndex, length));
1059s.CopyTo(new Span<char>((char*)ptr, s.Length));
1077int nbWritten = Encoding.UTF8.GetBytes(s, new Span<byte>(pbMem, nb));
1100s.CopyTo(new Span<char>((char*)ptr, s.Length));
1118int nbWritten = Encoding.UTF8.GetBytes(s, new Span<byte>(pbMem, nb));
1331s.CopyTo(new Span<char>((char*)bstr, s.Length)); // AllocBSTR already included the null terminator
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (9)
317Span<char> resultSpan = new Span<char>(ref result._firstChar, result.Length);
334Span<char> resultSpan = new Span<char>(ref result._firstChar, result.Length);
356Span<char> resultSpan = new Span<char>(ref result._firstChar, result.Length);
381Span<char> resultSpan = new Span<char>(ref result._firstChar, result.Length);
1090Span<char> resultSpan = new Span<char>(ref result._firstChar, result.Length);
1158new Span<char>(ref result._firstChar, count).Fill(paddingChar);
1177new Span<char>(ref Unsafe.Add(ref result._firstChar, oldLength), count).Fill(paddingChar);
1441Span<char> dstSpan = new Span<char>(ref dst._firstChar, dst.Length);
2658Span<char> resultSpan = new Span<char>(ref result.GetRawStringData(), Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (4)
374CopyTo(startIndex, new Span<char>(ref result.GetRawStringData(), result.Length), result.Length);
877value.CopyTo(startIndex, new Span<char>(m_ChunkChars, m_ChunkLength, length), length);
906CopyTo(sourceIndex, new Span<char>(destination).Slice(destinationIndex), count);
2607get => new Span<char>(m_ChunkChars, m_ChunkLength, m_ChunkChars.Length - m_ChunkLength);
System.Private.DataContractSerialization (3)
System.Private.Windows.Core (45)
Windows\Win32\System\Variant\VARIANT.cs (35)
292new Span<sbyte>(psa->pvData, array.Length)
296new Span<byte>(psa->pvData, array.Length)
300new Span<short>(psa->pvData, array.Length)
304new Span<ushort>(psa->pvData, array.Length)
309new Span<int>(psa->pvData, array.Length)
315new Span<uint>(psa->pvData, array.Length)
319new Span<long>(psa->pvData, array.Length)
323new Span<ulong>(psa->pvData, array.Length)
327new Span<float>(psa->pvData, array.Length)
331new Span<double>(psa->pvData, array.Length)
336Span<VARIANT_BOOL> data = new(psa->pvData, array.Length);
348Span<DECIMAL> data = new(psa->pvData, array.Length);
360Span<long> data = new(psa->pvData, array.Length);
372Span<double> data = new(psa->pvData, array.Length);
384Span<IntPtr> data = new(psa->pvData, array.Length);
397Span<IntPtr> data = new(psa->pvData, array.Length);
409Span<VARIANT> data = new(psa->pvData, array.Length);
759return new Span<sbyte>(ca.pElems, (int)ca.cElems).ToArray();
761return new Span<byte>(ca.pElems, (int)ca.cElems).ToArray();
763return new Span<short>(ca.pElems, (int)ca.cElems).ToArray();
765return new Span<ushort>(ca.pElems, (int)ca.cElems).ToArray();
768Span<VARIANT_BOOL> data = new(ca.pElems, (int)ca.cElems);
780return new Span<int>(ca.pElems, (int)ca.cElems).ToArray();
784return new Span<uint>(ca.pElems, (int)ca.cElems).ToArray();
786return new Span<long>(ca.pElems, (int)ca.cElems).ToArray();
788return new Span<ulong>(ca.pElems, (int)ca.cElems).ToArray();
790return new Span<float>(ca.pElems, (int)ca.cElems).ToArray();
792return new Span<double>(ca.pElems, (int)ca.cElems).ToArray();
795Span<long> data = new(ca.pElems, (int)ca.cElems);
807Span<double> data = new(ca.pElems, (int)ca.cElems);
819var data = new Span<FILETIME>(ca.pElems, (int)ca.cElems);
830return new Span<Guid>(ca.pElems, (int)ca.cElems).ToArray();
834Span<IntPtr> data = new(ca.pElems, (int)ca.cElems);
846Span<IntPtr> data = new(ca.pElems, (int)ca.cElems);
858Span<VARIANT> data = new(ca.pElems, (int)ca.cElems);
System.Private.Windows.GdiPlus (2)
System.Private.Xml (1)
System.Reflection.Metadata (3)
System.Runtime.InteropServices.JavaScript (4)
System.Security.Cryptography (25)
System\Security\Cryptography\CryptoStream.cs (5)
362CryptographicOperations.ZeroMemory(new Span<byte>(_inputBuffer, 0, _inputBufferIndex));
396CryptographicOperations.ZeroMemory(new Span<byte>(tempOutputBuffer, 0, numOutputBytes));
417CryptographicOperations.ZeroMemory(new Span<byte>(tempInputBuffer, 0, numWholeBlocksInBytes));
611CryptographicOperations.ZeroMemory(new Span<byte>(tempOutputBuffer, 0, numOutputBytes));
617CryptographicOperations.ZeroMemory(new Span<byte>(tempOutputBuffer, 0, numOutputBytes));
System.Security.Cryptography.Cose (1)
System.Security.Cryptography.Pkcs (6)
System.Security.Cryptography.ProtectedData (1)
System.ServiceProcess.ServiceController (1)
System.Text.Encoding.CodePages (1)
System.Text.Encodings.Web (1)
System.Text.Json (6)
System.Windows.Forms (5)
System.Windows.Forms.Design (1)
System.Windows.Forms.Primitives (6)
9279 references to Span
aspire (9)
aspire-tray (5)
Aspire.Dashboard (6)
Aspire.Hosting (15)
Aspire.Hosting.Azure (1)
Aspire.Hosting.Azure.EntraId (1)
Aspire.Hosting.DevTunnels.Tests (1)
Aspire.Hosting.Docker (1)
Aspire.Hosting.Native.Server (5)
Aspire.Hosting.TestUtilities (1)
Aspire.Playground.Tests (3)
Aspire.TerminalHost (1)
Aspire.Tray.Tests (5)
cdac-build-tool (1)
CreateLayout (2)
dotnet-aot (12)
GenerateDocumentationAndConfigFiles (55)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (19)
315int nanLeft = SegmentedArraySortUtils.MoveNansToFront(keys, default(Span<byte>));
673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j)
711private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer)
781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer)
871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
944private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
962private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
975private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit)
1020private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1079private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1096private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n)
1121private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1233public static int MoveNansToFront<TKey, TValue>(SegmentedArraySegment<TKey> keys, Span<TValue> values) where TKey : notnull
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry_Metrics.cs (6)
50Span<KeyValuePair<string, object?>> tags = [tag];
56Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
62Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
96Span<KeyValuePair<string, object?>> tags = [tag];
102Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
108Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
786Name: nameof(Span<>),
ILCompiler.Compiler (164)
ILCompiler.MetadataTransform (1)
ILCompiler.ReadyToRun (143)
ILCompiler.RyuJit (4)
ILCompiler.TypeSystem (19)
illink (6)
ILLink.RoslynAnalyzer (16)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (9)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
228Span<char> result = (bytes.Length > 16) ?
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
Microsoft.AspNetCore.Antiforgery (22)
Microsoft.AspNetCore.App.Analyzers (8)
Microsoft.AspNetCore.Authentication (5)
Microsoft.AspNetCore.Authentication.Certificate (2)
Microsoft.AspNetCore.Components (26)
src\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (11)
18public static int DecodeRequestLine(ReadOnlySpan<byte> source, Span<byte> destination, bool isFormEncoding)
42public static int DecodeInPlace(Span<byte> buffer, bool isFormEncoding)
96private static bool DecodeCore(ref int sourceIndex, ref int destinationIndex, Span<byte> buffer, bool isFormEncoding)
234private static void Copy<T>(int begin, int end, ref int writer, Span<T> buffer)
262private static int UnescapePercentEncoding(ref int scan, Span<byte> buffer, bool isFormEncoding)
301private static int ReadHex(ref int scan, Span<byte> buffer)
355/// Form Encoding is not supported compared to the <see cref="DecodeRequestLine(ReadOnlySpan{byte}, Span{byte}, bool)" />
358public static int DecodeRequestLine(ReadOnlySpan<char> source, Span<char> destination)
374/// Form Encoding is not supported compared to the <see cref="DecodeInPlace(Span{byte}, bool)" />
377public static int DecodeInPlace(Span<char> buffer)
434private static bool DecodeCore(ref int sourceIndex, ref int destinationIndex, Span<char> buffer)
Microsoft.AspNetCore.Components.Endpoints (23)
Microsoft.AspNetCore.Components.Forms (3)
Microsoft.AspNetCore.Components.QuickGrid (2)
Microsoft.AspNetCore.Components.Server (88)
src\aspnetcore\src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackWriter.cs (65)
89Span<byte> span = this.writer.GetSpan(1);
133Span<byte> span = this.writer.GetSpan(1);
139Span<byte> span = this.writer.GetSpan(3);
146Span<byte> span = this.writer.GetSpan(5);
173Span<byte> span = this.writer.GetSpan(1);
179Span<byte> span = this.writer.GetSpan(3);
186Span<byte> span = this.writer.GetSpan(5);
201Span<byte> span = this.writer.GetSpan(1);
217Span<byte> span = this.writer.GetSpan(2);
235Span<byte> span = this.writer.GetSpan(1);
247Span<byte> span = this.writer.GetSpan(2);
261Span<byte> span = this.writer.GetSpan(1);
267Span<byte> span = this.writer.GetSpan(2);
284Span<byte> span = this.writer.GetSpan(3);
310Span<byte> span = this.writer.GetSpan(1);
316Span<byte> span = this.writer.GetSpan(2);
334Span<byte> span = this.writer.GetSpan(3);
353Span<byte> span = this.writer.GetSpan(1);
359Span<byte> span = this.writer.GetSpan(2);
366Span<byte> span = this.writer.GetSpan(3);
383Span<byte> span = this.writer.GetSpan(5);
412Span<byte> span = this.writer.GetSpan(1);
418Span<byte> span = this.writer.GetSpan(2);
425Span<byte> span = this.writer.GetSpan(3);
443Span<byte> span = this.writer.GetSpan(5);
464Span<byte> span = this.writer.GetSpan(1);
470Span<byte> span = this.writer.GetSpan(2);
477Span<byte> span = this.writer.GetSpan(3);
484Span<byte> span = this.writer.GetSpan(5);
501Span<byte> span = this.writer.GetSpan(9);
531Span<byte> span = this.writer.GetSpan(1);
537Span<byte> span = this.writer.GetSpan(2);
544Span<byte> span = this.writer.GetSpan(3);
551Span<byte> span = this.writer.GetSpan(5);
569Span<byte> span = this.writer.GetSpan(9);
581Span<byte> span = this.writer.GetSpan(1);
598Span<byte> span = this.writer.GetSpan(5);
610Span<byte> span = this.writer.GetSpan(9);
682Span<byte> span = this.writer.GetSpan(6);
691Span<byte> span = this.writer.GetSpan(10);
701Span<byte> span = this.writer.GetSpan(15);
746var span = this.writer.GetSpan(length);
765var span = this.writer.GetSpan(length);
800Span<byte> span = this.writer.GetSpan(size);
810Span<byte> span = this.writer.GetSpan(size);
820Span<byte> span = this.writer.GetSpan(size);
841Span<byte> span = this.writer.GetSpan(length);
858Span<byte> span = this.writer.GetSpan(length);
882Span<byte> span = this.writer.GetSpan(byteCount + 1);
888Span<byte> span = this.writer.GetSpan(byteCount + 2);
895Span<byte> span = this.writer.GetSpan(byteCount + 3);
902Span<byte> span = this.writer.GetSpan(byteCount + 5);
974Span<byte> span = this.writer.GetSpan(2);
1067public Span<byte> GetSpan(int length) => this.writer.GetSpan(length);
1082Span<byte> span = this.writer.GetSpan(2);
1093Span<byte> span = this.writer.GetSpan(4);
1104Span<byte> span = this.writer.GetSpan(8);
1129private static void WriteBigEndian(short value, Span<byte> span) => WriteBigEndian(unchecked((ushort)value), span);
1131private static void WriteBigEndian(int value, Span<byte> span) => WriteBigEndian(unchecked((uint)value), span);
1133private static void WriteBigEndian(long value, Span<byte> span) => WriteBigEndian(unchecked((ulong)value), span);
1135private static void WriteBigEndian(ushort value, Span<byte> span)
1154private static void WriteBigEndian(uint value, Span<byte> span)
1177private static void WriteBigEndian(ulong value, Span<byte> span)
1193private static unsafe void WriteBigEndian(float value, Span<byte> span) => WriteBigEndian(*(int*)&value, span);
1195private static unsafe void WriteBigEndian(double value, Span<byte> span) => WriteBigEndian(*(long*)&value, span);
Microsoft.AspNetCore.Components.Web (3)
Microsoft.AspNetCore.Components.WebAssembly (21)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JSImports.g.cs (16)
44global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __culturesToLoad_native];
93global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native];
232global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native];
281global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native];
327global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native];
373global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native];
419global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native];
469global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __fileName_native];
693global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native];
739global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native];
831global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native];
881global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __id_native];
931global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __id_native];
981global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __id_native];
1031global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __id_native];
1086global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __assemblyToLoad_native];
Microsoft.AspNetCore.Components.WebView (5)
Microsoft.AspNetCore.DataProtection (65)
Microsoft.AspNetCore.DataProtection.Abstractions (8)
Microsoft.AspNetCore.DataProtection.Extensions (7)
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (6)
Microsoft.AspNetCore.Diagnostics.Middleware (4)
Microsoft.AspNetCore.Diagnostics.Middleware.PerformanceTests (6)
Microsoft.AspNetCore.Http (4)
Microsoft.AspNetCore.Http.Abstractions (18)
src\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (11)
18public static int DecodeRequestLine(ReadOnlySpan<byte> source, Span<byte> destination, bool isFormEncoding)
42public static int DecodeInPlace(Span<byte> buffer, bool isFormEncoding)
96private static bool DecodeCore(ref int sourceIndex, ref int destinationIndex, Span<byte> buffer, bool isFormEncoding)
234private static void Copy<T>(int begin, int end, ref int writer, Span<T> buffer)
262private static int UnescapePercentEncoding(ref int scan, Span<byte> buffer, bool isFormEncoding)
301private static int ReadHex(ref int scan, Span<byte> buffer)
355/// Form Encoding is not supported compared to the <see cref="DecodeRequestLine(ReadOnlySpan{byte}, Span{byte}, bool)" />
358public static int DecodeRequestLine(ReadOnlySpan<char> source, Span<char> destination)
374/// Form Encoding is not supported compared to the <see cref="DecodeInPlace(Span{byte}, bool)" />
377public static int DecodeInPlace(Span<char> buffer)
434private static bool DecodeCore(ref int sourceIndex, ref int destinationIndex, Span<char> buffer)
Microsoft.AspNetCore.Http.Connections (7)
Microsoft.AspNetCore.Http.Connections.Client (2)
Microsoft.AspNetCore.Http.Connections.Common (3)
Microsoft.AspNetCore.Http.Extensions (13)
Microsoft.AspNetCore.HttpLogging (15)
Microsoft.AspNetCore.Identity (3)
Microsoft.AspNetCore.Localization (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.OpenApi (5)
Microsoft.AspNetCore.OutputCaching (6)
Microsoft.AspNetCore.Razor.Runtime (1)
Microsoft.AspNetCore.Razor.Utilities.Shared (47)
Microsoft.AspNetCore.ResponseCaching (1)
Microsoft.AspNetCore.Rewrite (1)
Microsoft.AspNetCore.Routing (14)
Microsoft.AspNetCore.Server.HttpSys (56)
Microsoft.AspNetCore.Server.IIS (41)
Microsoft.AspNetCore.Server.Kestrel.Core (154)
Internal\Http3\QPackHeaderWriter.cs (6)
12public static bool BeginEncodeHeaders(Http3HeadersEnumerator enumerator, Span<byte> buffer, ref int totalHeaderSize, out int length)
27public static bool BeginEncodeHeaders(int statusCode, Http3HeadersEnumerator headersEnumerator, Span<byte> buffer, ref int totalHeaderSize, out int length)
50public static bool Encode(Http3HeadersEnumerator headersEnumerator, Span<byte> buffer, ref int totalHeaderSize, out int length)
55private static bool Encode(Http3HeadersEnumerator headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, ref int totalHeaderSize, out int length)
104private static bool EncodeHeader(Span<byte> buffer, int staticTableId, string name, string value, Encoding? valueEncoding, out int headerLength)
111private static int EncodeStatusCode(int statusCode, Span<byte> buffer)
src\aspnetcore\src\Servers\Kestrel\shared\HPackHeaderWriter.cs (7)
32public static HeaderWriteResult BeginEncodeHeaders(int statusCode, DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, out int length)
63public static HeaderWriteResult BeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, out int length) =>
69public static HeaderWriteResult RetryBeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, out int length) =>
75private static HeaderWriteResult BeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, bool iterateBeforeFirstElement, out int length)
98public static HeaderWriteResult ContinueEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, out int length)
103private static bool EncodeStatusHeader(int statusCode, DynamicHPackEncoder hpackEncoder, Span<byte> buffer, out int length)
118private static HeaderWriteResult EncodeHeadersCore(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, bool canRequestLargerBuffer, out int length)
src\aspnetcore\src\Shared\Hpack\DynamicHPackEncoder.cs (3)
54public bool EnsureDynamicTableSizeUpdate(Span<byte> buffer, out int length)
68public bool EncodeHeader(Span<byte> buffer, int staticTableIndex, HeaderEncodingHint encodingHint, string name, string value,
117private bool EncodeDynamicHeader(Span<byte> buffer, int staticTableIndex, string name, string value,
src\aspnetcore\src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (22)
25public static bool EncodeIndexedHeaderField(int index, Span<byte> destination, out int bytesWritten)
45public static bool EncodeStatusHeader(int statusCode, Span<byte> destination, out int bytesWritten)
77public static bool EncodeLiteralHeaderFieldWithoutIndexing(int index, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
109public static bool EncodeLiteralHeaderFieldNeverIndexing(int index, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
141public static bool EncodeLiteralHeaderFieldIndexing(int index, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
176public static bool EncodeLiteralHeaderFieldWithoutIndexing(int index, Span<byte> destination, out int bytesWritten)
208public static bool EncodeLiteralHeaderFieldIndexingNewName(string name, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
229public static bool EncodeLiteralHeaderFieldWithoutIndexingNewName(string name, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
250public static bool EncodeLiteralHeaderFieldNeverIndexingNewName(string name, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
270private static bool EncodeLiteralHeaderNewNameCore(byte mask, string name, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
288public static bool EncodeLiteralHeaderFieldWithoutIndexingNewName(string name, ReadOnlySpan<string> values, byte[] separator, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
324public static bool EncodeLiteralHeaderFieldWithoutIndexingNewName(string name, Span<byte> destination, out int bytesWritten)
358private static bool EncodeLiteralHeaderName(string value, Span<byte> destination, out int bytesWritten)
395private static void EncodeValueStringPart(string value, Span<byte> destination)
410public static bool EncodeStringLiteral(ReadOnlySpan<byte> value, Span<byte> destination, out int bytesWritten)
444public static bool EncodeStringLiteral(string value, Span<byte> destination, out int bytesWritten)
449public static bool EncodeStringLiteral(string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
494public static bool EncodeDynamicTableSizeUpdate(int value, Span<byte> destination, out int bytesWritten)
513public static bool EncodeStringLiterals(ReadOnlySpan<string> values, byte[]? separator, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
601Span<byte> span = stackalloc byte[256];
613Span<byte> span = stackalloc byte[256];
622Span<byte> span =
src\aspnetcore\src\Shared\runtime\Http3\QPack\QPackEncoder.cs (18)
23public static bool EncodeStaticIndexedHeaderField(int index, Span<byte> destination, out int bytesWritten)
39Span<byte> buffer = stackalloc byte[IntegerEncoder.MaxInt32EncodedLength];
61public static bool EncodeLiteralHeaderFieldWithStaticNameReference(int index, string value, Span<byte> destination, out int bytesWritten)
66public static bool EncodeLiteralHeaderFieldWithStaticNameReference(int index, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
89/// Encodes just the name part of a Literal Header Field With Static Name Reference. Must call <see cref="EncodeValueString(string, Encoding?, Span{byte}, out int)"/> after to encode the header's value.
93Span<byte> temp = stackalloc byte[IntegerEncoder.MaxInt32EncodedLength];
104Span<byte> temp = value.Length < 256 ? stackalloc byte[256 + IntegerEncoder.MaxInt32EncodedLength * 2] : new byte[value.Length + IntegerEncoder.MaxInt32EncodedLength * 2];
125public static bool EncodeLiteralHeaderFieldWithoutNameReference(string name, string value, Span<byte> destination, out int bytesWritten)
130public static bool EncodeLiteralHeaderFieldWithoutNameReference(string name, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
147public static bool EncodeLiteralHeaderFieldWithoutNameReference(string name, ReadOnlySpan<string> values, byte[] separator, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
160/// Encodes just the value part of a Literawl Header Field Without Static Name Reference. Must call <see cref="EncodeValueString(string, Encoding?, Span{byte}, out int)"/> after to encode the header's value.
164Span<byte> temp = name.Length < 256 ? stackalloc byte[256 + IntegerEncoder.MaxInt32EncodedLength] : new byte[name.Length + IntegerEncoder.MaxInt32EncodedLength];
174Span<byte> temp = (name.Length + value.Length) < 256 ? stackalloc byte[256 + IntegerEncoder.MaxInt32EncodedLength * 2] : new byte[name.Length + value.Length + IntegerEncoder.MaxInt32EncodedLength * 2];
182private static bool EncodeValueString(string s, Encoding? valueEncoding, Span<byte> buffer, out int length)
220public static bool EncodeValueString(ReadOnlySpan<string> values, byte[]? separator, Encoding? valueEncoding, Span<byte> buffer, out int length)
301private static void EncodeValueStringPart(string s, Span<byte> buffer)
316private static bool EncodeNameString(string s, Span<byte> buffer, out int length)
355private static bool EncodeHeaderBlockPrefix(Span<byte> destination, out int bytesWritten)
src\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (11)
18public static int DecodeRequestLine(ReadOnlySpan<byte> source, Span<byte> destination, bool isFormEncoding)
42public static int DecodeInPlace(Span<byte> buffer, bool isFormEncoding)
96private static bool DecodeCore(ref int sourceIndex, ref int destinationIndex, Span<byte> buffer, bool isFormEncoding)
234private static void Copy<T>(int begin, int end, ref int writer, Span<T> buffer)
262private static int UnescapePercentEncoding(ref int scan, Span<byte> buffer, bool isFormEncoding)
301private static int ReadHex(ref int scan, Span<byte> buffer)
355/// Form Encoding is not supported compared to the <see cref="DecodeRequestLine(ReadOnlySpan{byte}, Span{byte}, bool)" />
358public static int DecodeRequestLine(ReadOnlySpan<char> source, Span<char> destination)
374/// Form Encoding is not supported compared to the <see cref="DecodeInPlace(Span{byte}, bool)" />
377public static int DecodeInPlace(Span<char> buffer)
434private static bool DecodeCore(ref int sourceIndex, ref int destinationIndex, Span<char> buffer)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (5)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (7)
Microsoft.AspNetCore.Session (1)
Microsoft.AspNetCore.SignalR.Client.Core (1)
Microsoft.AspNetCore.SignalR.Common (7)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.AspNetCore.SignalR.Protocols.Json (5)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (5)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (7)
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (4)
Microsoft.AspNetCore.StaticAssets (1)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.WebSockets (15)
Microsoft.AspNetCore.WebUtilities (27)
src\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (11)
18public static int DecodeRequestLine(ReadOnlySpan<byte> source, Span<byte> destination, bool isFormEncoding)
42public static int DecodeInPlace(Span<byte> buffer, bool isFormEncoding)
96private static bool DecodeCore(ref int sourceIndex, ref int destinationIndex, Span<byte> buffer, bool isFormEncoding)
234private static void Copy<T>(int begin, int end, ref int writer, Span<T> buffer)
262private static int UnescapePercentEncoding(ref int scan, Span<byte> buffer, bool isFormEncoding)
301private static int ReadHex(ref int scan, Span<byte> buffer)
355/// Form Encoding is not supported compared to the <see cref="DecodeRequestLine(ReadOnlySpan{byte}, Span{byte}, bool)" />
358public static int DecodeRequestLine(ReadOnlySpan<char> source, Span<char> destination)
374/// Form Encoding is not supported compared to the <see cref="DecodeInPlace(Span{byte}, bool)" />
377public static int DecodeInPlace(Span<char> buffer)
434private static bool DecodeCore(ref int sourceIndex, ref int destinationIndex, Span<char> buffer)
Microsoft.Build (35)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Internal\ArraySortHelper.cs (19)
315int nanLeft = SegmentedArraySortUtils.MoveNansToFront(keys, default(Span<byte>));
673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j)
711private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer)
781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer)
871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
944private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
962private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
975private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit)
1020private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1079private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1096private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n)
1121private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1233public static int MoveNansToFront<TKey, TValue>(SegmentedArraySegment<TKey> keys, Span<TValue> values) where TKey : notnull
Microsoft.Build.Framework (58)
Microsoft.Build.Tasks.Core (2)
Microsoft.CodeAnalysis (51)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (19)
315int nanLeft = SegmentedArraySortUtils.MoveNansToFront(keys, default(Span<byte>));
673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j)
711private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer)
781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer)
871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
944private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
962private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
975private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit)
1020private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1079private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1096private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n)
1121private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1233public static int MoveNansToFront<TKey, TValue>(SegmentedArraySegment<TKey> keys, Span<TValue> values) where TKey : notnull
Microsoft.CodeAnalysis.Analyzers (62)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (19)
315int nanLeft = SegmentedArraySortUtils.MoveNansToFront(keys, default(Span<byte>));
673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j)
711private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer)
781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer)
871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
944private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
962private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
975private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit)
1020private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1079private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1096private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n)
1121private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1233public static int MoveNansToFront<TKey, TValue>(SegmentedArraySegment<TKey> keys, Span<TValue> values) where TKey : notnull
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry_Metrics.cs (6)
50Span<KeyValuePair<string, object?>> tags = [tag];
56Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
62Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
96Span<KeyValuePair<string, object?>> tags = [tag];
102Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
108Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
786Name: nameof(Span<>),
Microsoft.CodeAnalysis.AnalyzerUtilities (62)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (19)
315int nanLeft = SegmentedArraySortUtils.MoveNansToFront(keys, default(Span<byte>));
673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j)
711private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer)
781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer)
871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
944private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
962private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
975private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit)
1020private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1079private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1096private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n)
1121private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1233public static int MoveNansToFront<TKey, TValue>(SegmentedArraySegment<TKey> keys, Span<TValue> values) where TKey : notnull
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry_Metrics.cs (6)
50Span<KeyValuePair<string, object?>> tags = [tag];
56Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
62Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
96Span<KeyValuePair<string, object?>> tags = [tag];
102Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
108Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
786Name: nameof(Span<>),
Microsoft.CodeAnalysis.CodeStyle (62)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (19)
315int nanLeft = SegmentedArraySortUtils.MoveNansToFront(keys, default(Span<byte>));
673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j)
711private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer)
781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer)
871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
944private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
962private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
975private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit)
1020private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1079private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1096private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n)
1121private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1233public static int MoveNansToFront<TKey, TValue>(SegmentedArraySegment<TKey> keys, Span<TValue> values) where TKey : notnull
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry_Metrics.cs (6)
50Span<KeyValuePair<string, object?>> tags = [tag];
56Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
62Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
96Span<KeyValuePair<string, object?>> tags = [tag];
102Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
108Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
786Name: nameof(Span<>),
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
44nameof(Span<>),
Microsoft.CodeAnalysis.CSharp.Features (6)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
44nameof(Span<>),
Microsoft.CodeAnalysis.Extensions.Package (29)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (19)
315int nanLeft = SegmentedArraySortUtils.MoveNansToFront(keys, default(Span<byte>));
673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j)
711private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer)
781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer)
871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
944private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
962private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
975private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit)
1020private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1079private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1096private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n)
1121private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1233public static int MoveNansToFront<TKey, TValue>(SegmentedArraySegment<TKey> keys, Span<TValue> values) where TKey : notnull
Microsoft.CodeAnalysis.NetAnalyzers (1)
Microsoft.CodeAnalysis.Razor.Compiler (14)
Microsoft.CodeAnalysis.ResxSourceGenerator (62)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (19)
315int nanLeft = SegmentedArraySortUtils.MoveNansToFront(keys, default(Span<byte>));
673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j)
711private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer)
781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer)
871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
944private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
962private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
975private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit)
1020private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1079private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1096private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n)
1121private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1233public static int MoveNansToFront<TKey, TValue>(SegmentedArraySegment<TKey> keys, Span<TValue> values) where TKey : notnull
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry_Metrics.cs (6)
50Span<KeyValuePair<string, object?>> tags = [tag];
56Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
62Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
96Span<KeyValuePair<string, object?>> tags = [tag];
102Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
108Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
786Name: nameof(Span<>),
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (80)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (19)
315int nanLeft = SegmentedArraySortUtils.MoveNansToFront(keys, default(Span<byte>));
673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j)
711private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer)
781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer)
871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
944private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
962private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
975private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit)
1020private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1079private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1096private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n)
1121private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1233public static int MoveNansToFront<TKey, TValue>(SegmentedArraySegment<TKey> keys, Span<TValue> values) where TKey : notnull
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry_Metrics.cs (6)
50Span<KeyValuePair<string, object?>> tags = [tag];
56Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
62Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
96Span<KeyValuePair<string, object?>> tags = [tag];
102Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
108Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
786Name: nameof(Span<>),
Microsoft.CSharp (2)
Microsoft.Data.Analysis (331)
Computations\Arithmetic.cs (44)
18public void HandleOperation(BinaryOperation operation, ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
49public void HandleOperation(BinaryOperation operation, ReadOnlySpan<T> x, T y, Span<T> destination)
80public void HandleOperation(BinaryOperation operation, T x, ReadOnlySpan<T> y, Span<T> destination)
125public void HandleOperation(BinaryIntOperation operation, ReadOnlySpan<T> x, int y, Span<T> destination)
141public void HandleOperation(ComparisonOperation operation, ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination)
166public void HandleOperation(ComparisonOperation operation, ReadOnlySpan<T> x, T y, Span<bool> destination)
194protected virtual void Add(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
195protected virtual void Add(ReadOnlySpan<T> x, T y, Span<T> destination) => throw new NotSupportedException();
196protected virtual void Add(T x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
197protected virtual void Subtract(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
198protected virtual void Subtract(ReadOnlySpan<T> x, T y, Span<T> destination) => throw new NotSupportedException();
199protected virtual void Subtract(T x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
200protected virtual void Multiply(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
201protected virtual void Multiply(ReadOnlySpan<T> x, T y, Span<T> destination) => throw new NotSupportedException();
202protected virtual void Multiply(T x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
203protected virtual void Divide(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
204protected virtual void Divide(ReadOnlySpan<T> x, T y, Span<T> destination) => throw new NotSupportedException();
205protected virtual void Divide(T x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
206protected virtual void Modulo(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
207protected virtual void Modulo(ReadOnlySpan<T> x, T y, Span<T> destination) => throw new NotSupportedException();
208protected virtual void Modulo(T x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
213protected virtual void And(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
214protected virtual void And(ReadOnlySpan<T> x, T y, Span<T> destination) => throw new NotSupportedException();
215protected virtual void And(T x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
216protected virtual void Or(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
217protected virtual void Or(ReadOnlySpan<T> x, T y, Span<T> destination) => throw new NotSupportedException();
218protected virtual void Or(T x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
219protected virtual void Xor(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
220protected virtual void Xor(ReadOnlySpan<T> x, T y, Span<T> destination) => throw new NotSupportedException();
221protected virtual void Xor(T x, ReadOnlySpan<T> y, Span<T> destination) => throw new NotSupportedException();
223protected virtual void LeftShift(ReadOnlySpan<T> x, int y, Span<T> destination) => throw new NotSupportedException();
224protected virtual void RightShift(ReadOnlySpan<T> x, int y, Span<T> destination) => throw new NotSupportedException();
226protected virtual void ElementwiseEquals(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination) => throw new NotSupportedException();
227protected virtual void ElementwiseEquals(ReadOnlySpan<T> x, T y, Span<bool> destination) => throw new NotSupportedException();
228protected virtual void ElementwiseNotEquals(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination) => throw new NotSupportedException();
229protected virtual void ElementwiseNotEquals(ReadOnlySpan<T> x, T y, Span<bool> destination) => throw new NotSupportedException();
230protected virtual void ElementwiseGreaterThanOrEqual(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination) => throw new NotSupportedException();
231protected virtual void ElementwiseGreaterThanOrEqual(ReadOnlySpan<T> x, T y, Span<bool> destination) => throw new NotSupportedException();
232protected virtual void ElementwiseLessThanOrEqual(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination) => throw new NotSupportedException();
233protected virtual void ElementwiseLessThanOrEqual(ReadOnlySpan<T> x, T y, Span<bool> destination) => throw new NotSupportedException();
234protected virtual void ElementwiseGreaterThan(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination) => throw new NotSupportedException();
235protected virtual void ElementwiseGreaterThan(ReadOnlySpan<T> x, T y, Span<bool> destination) => throw new NotSupportedException();
236protected virtual void ElementwiseLessThan(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination) => throw new NotSupportedException();
237protected virtual void ElementwiseLessThan(ReadOnlySpan<T> x, T y, Span<bool> destination) => throw new NotSupportedException();
Computations\Arithmetic.net8.cs (111)
20static abstract void And(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
21static abstract void And(ReadOnlySpan<T> x, T y, Span<T> destination);
22static abstract void And(T x, ReadOnlySpan<T> y, Span<T> destination);
23static abstract void Or(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
24static abstract void Or(ReadOnlySpan<T> x, T y, Span<T> destination);
25static abstract void Or(T x, ReadOnlySpan<T> y, Span<T> destination);
26static abstract void Xor(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
27static abstract void Xor(ReadOnlySpan<T> x, T y, Span<T> destination);
28static abstract void Xor(T x, ReadOnlySpan<T> y, Span<T> destination);
34static abstract void LeftShift(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination);
35static abstract void RightShift(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination);
41static abstract void Add(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
42static abstract void Add(ReadOnlySpan<T> x, T y, Span<T> destination);
43static abstract void Add(T x, ReadOnlySpan<T> y, Span<T> destination);
44static abstract void Subtract(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
45static abstract void Subtract(ReadOnlySpan<T> x, T y, Span<T> destination);
46static abstract void Subtract(T x, ReadOnlySpan<T> y, Span<T> destination);
47static abstract void Multiply(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
48static abstract void Multiply(ReadOnlySpan<T> x, T y, Span<T> destination);
49static abstract void Multiply(T x, ReadOnlySpan<T> y, Span<T> destination);
50static abstract void Divide(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
51static abstract void Divide(ReadOnlySpan<T> x, T y, Span<T> destination);
52static abstract void Divide(T x, ReadOnlySpan<T> y, Span<T> destination);
54static abstract void Modulo(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
55static abstract void Modulo(ReadOnlySpan<T> x, T y, Span<T> destination);
56static abstract void Modulo(T x, ReadOnlySpan<T> y, Span<T> destination);
59static abstract void ElementwiseEquals(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination);
60static abstract void ElementwiseEquals(ReadOnlySpan<T> x, T y, Span<bool> destination);
61static abstract void ElementwiseNotEquals(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination);
62static abstract void ElementwiseNotEquals(ReadOnlySpan<T> x, T y, Span<bool> destination);
63static abstract void ElementwiseGreaterThanOrEqual(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination);
64static abstract void ElementwiseGreaterThanOrEqual(ReadOnlySpan<T> x, T y, Span<bool> destination);
65static abstract void ElementwiseLessThanOrEqual(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination);
66static abstract void ElementwiseLessThanOrEqual(ReadOnlySpan<T> x, T y, Span<bool> destination);
67static abstract void ElementwiseGreaterThan(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination);
68static abstract void ElementwiseGreaterThan(ReadOnlySpan<T> x, T y, Span<bool> destination);
69static abstract void ElementwiseLessThan(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination);
70static abstract void ElementwiseLessThan(ReadOnlySpan<T> x, T y, Span<bool> destination);
76public static void And(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.BitwiseAnd(x, y, destination);
77public static void And(ReadOnlySpan<T> x, T y, Span<T> destination) => TensorPrimitives.BitwiseAnd(x, y, destination);
78public static void And(T x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.BitwiseAnd(y, x, destination);
79public static void Or(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.BitwiseOr(x, y, destination);
80public static void Or(ReadOnlySpan<T> x, T y, Span<T> destination) => TensorPrimitives.BitwiseOr(x, y, destination);
81public static void Or(T x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.BitwiseOr(y, x, destination);
82public static void Xor(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.Xor(x, y, destination);
83public static void Xor(ReadOnlySpan<T> x, T y, Span<T> destination) => TensorPrimitives.Xor(x, y, destination);
84public static void Xor(T x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.Xor(y, x, destination);
90public static void LeftShift(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination) => TensorPrimitives.ShiftLeft(x, shiftAmount, destination);
91public static void RightShift(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination) => TensorPrimitives.ShiftRightArithmetic(x, shiftAmount, destination);
97public static void Add(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.Add(x, y, destination);
98public static void Add(ReadOnlySpan<T> x, T y, Span<T> destination) => TensorPrimitives.Add(x, y, destination);
99public static void Add(T x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.Add(y, x, destination);
100public static void Subtract(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.Subtract(x, y, destination);
101public static void Subtract(ReadOnlySpan<T> x, T y, Span<T> destination) => TensorPrimitives.Subtract(x, y, destination);
102public static void Subtract(T x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.Subtract(x, y, destination);
103public static void Multiply(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.Multiply(x, y, destination);
104public static void Multiply(ReadOnlySpan<T> x, T y, Span<T> destination) => TensorPrimitives.Multiply(x, y, destination);
105public static void Multiply(T x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.Multiply(y, x, destination);
106public static void Divide(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.Divide(x, y, destination);
107public static void Divide(ReadOnlySpan<T> x, T y, Span<T> destination) => TensorPrimitives.Divide(x, y, destination);
108public static void Divide(T x, ReadOnlySpan<T> y, Span<T> destination) => TensorPrimitives.Divide(x, y, destination);
111public static void Modulo(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
119public static void Modulo(ReadOnlySpan<T> x, T y, Span<T> destination)
127public static void Modulo(T x, ReadOnlySpan<T> y, Span<T> destination)
137public static void ElementwiseEquals(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination)
145public static void ElementwiseEquals(ReadOnlySpan<T> x, T y, Span<bool> destination)
153public static void ElementwiseNotEquals(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination)
161public static void ElementwiseNotEquals(ReadOnlySpan<T> x, T y, Span<bool> destination)
169public static void ElementwiseGreaterThanOrEqual(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination)
177public static void ElementwiseGreaterThanOrEqual(ReadOnlySpan<T> x, T y, Span<bool> destination)
185public static void ElementwiseLessThanOrEqual(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination)
193public static void ElementwiseLessThanOrEqual(ReadOnlySpan<T> x, T y, Span<bool> destination)
201public static void ElementwiseGreaterThan(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination)
209public static void ElementwiseGreaterThan(ReadOnlySpan<T> x, T y, Span<bool> destination)
217public static void ElementwiseLessThan(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination)
225public static void ElementwiseLessThan(ReadOnlySpan<T> x, T y, Span<bool> destination)
240public virtual void HandleOperation(BinaryOperation operation, ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
264public virtual void HandleOperation(BinaryOperation operation, ReadOnlySpan<T> x, T y, Span<T> destination)
288public virtual void HandleOperation(BinaryOperation operation, T x, ReadOnlySpan<T> y, Span<T> destination)
323public virtual void HandleOperation(BinaryIntOperation operation, ReadOnlySpan<T> x, int y, Span<T> destination)
328public void HandleOperation(ComparisonOperation operation, ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination)
355public void HandleOperation(ComparisonOperation operation, ReadOnlySpan<T> x, T y, Span<bool> destination)
388public override void HandleOperation(BinaryOperation operation, ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
406public override void HandleOperation(BinaryOperation operation, ReadOnlySpan<T> x, T y, Span<T> destination)
424public override void HandleOperation(BinaryOperation operation, T x, ReadOnlySpan<T> y, Span<T> destination)
450public override void HandleOperation(BinaryIntOperation operation, ReadOnlySpan<T> x, int y, Span<T> destination)
469protected override void ElementwiseEquals(ReadOnlySpan<DateTime> x, ReadOnlySpan<DateTime> y, Span<bool> destination)
477protected override void ElementwiseEquals(ReadOnlySpan<DateTime> x, DateTime y, Span<bool> destination)
485protected override void ElementwiseNotEquals(ReadOnlySpan<DateTime> x, ReadOnlySpan<DateTime> y, Span<bool> destination)
493protected override void ElementwiseNotEquals(ReadOnlySpan<DateTime> x, DateTime y, Span<bool> destination)
501protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<DateTime> x, ReadOnlySpan<DateTime> y, Span<bool> destination)
509protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<DateTime> x, DateTime y, Span<bool> destination)
517protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<DateTime> x, ReadOnlySpan<DateTime> y, Span<bool> destination)
525protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<DateTime> x, DateTime y, Span<bool> destination)
533protected override void ElementwiseGreaterThan(ReadOnlySpan<DateTime> x, ReadOnlySpan<DateTime> y, Span<bool> destination)
541protected override void ElementwiseGreaterThan(ReadOnlySpan<DateTime> x, DateTime y, Span<bool> destination)
549protected override void ElementwiseLessThan(ReadOnlySpan<DateTime> x, ReadOnlySpan<DateTime> y, Span<bool> destination)
557protected override void ElementwiseLessThan(ReadOnlySpan<DateTime> x, DateTime y, Span<bool> destination)
568protected override void And(ReadOnlySpan<bool> x, ReadOnlySpan<bool> y, Span<bool> destination)
579protected override void And(ReadOnlySpan<bool> x, bool y, Span<bool> destination)
590protected override void And(bool x, ReadOnlySpan<bool> y, Span<bool> destination)
601protected override void Or(ReadOnlySpan<bool> x, ReadOnlySpan<bool> y, Span<bool> destination)
612protected override void Or(ReadOnlySpan<bool> x, bool y, Span<bool> destination)
623protected override void Or(bool x, ReadOnlySpan<bool> y, Span<bool> destination)
634protected override void Xor(ReadOnlySpan<bool> x, ReadOnlySpan<bool> y, Span<bool> destination)
645protected override void Xor(ReadOnlySpan<bool> x, bool y, Span<bool> destination)
656protected override void Xor(bool x, ReadOnlySpan<bool> y, Span<bool> destination)
667protected override void ElementwiseEquals(ReadOnlySpan<bool> x, ReadOnlySpan<bool> y, Span<bool> destination)
675protected override void ElementwiseEquals(ReadOnlySpan<bool> x, bool y, Span<bool> destination)
683protected override void ElementwiseNotEquals(ReadOnlySpan<bool> x, ReadOnlySpan<bool> y, Span<bool> destination)
691protected override void ElementwiseNotEquals(ReadOnlySpan<bool> x, bool y, Span<bool> destination)
Computations\IArithmetic.cs (6)
15void HandleOperation(BinaryOperation operation, ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
16void HandleOperation(BinaryOperation operation, ReadOnlySpan<T> x, T y, Span<T> destination);
17void HandleOperation(BinaryOperation operation, T x, ReadOnlySpan<T> y, Span<T> destination);
22void HandleOperation(BinaryIntOperation operation, ReadOnlySpan<T> x, int y, Span<T> destination);
25void HandleOperation(ComparisonOperation operation, ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<bool> destination);
26void HandleOperation(ComparisonOperation operation, ReadOnlySpan<T> x, T y, Span<bool> destination);
PrimitiveColumnContainer.BinaryOperations.cs (15)
23var leftSpan = mutableBuffer.Span;
26var leftValidity = this.NullBitMapBuffers.GetOrCreateMutable(i).Span;
63var leftSpan = this.Buffers.GetOrCreateMutable(i).Span;
76var rightSpan = this.Buffers.GetOrCreateMutable(i).Span;
100var leftSpan = this.Buffers.GetOrCreateMutable(i).Span;
131var retSpan = ret.Buffers.GetOrCreateMutable(retSpanIndex).Span;
145var firstRetSpan = retSpan.Slice(retOffset, availableInRetSpan);
148var nextRetSpan = ret.Buffers.GetOrCreateMutable(retSpanIndex + 1).Span.Slice(0, leftSpan.Length - availableInRetSpan);
159var currentRetSpan = retSpan.Slice(retOffset, leftSpan.Length);
189var retSpan = ret.Buffers.GetOrCreateMutable(retSpanIndex).Span;
204var firstRetSpan = retSpan.Slice(retOffset, availableInRetSpan);
207var nextRetSpan = ret.Buffers.GetOrCreateMutable(retSpanIndex + 1).Span.Slice(0, leftSpan.Length - availableInRetSpan);
219var currentRetSpan = retSpan.Slice(retOffset, leftSpan.Length);
247private static void ApplyNullComparisonResults(ComparisonOperation operation, ReadOnlySpan<byte> leftValidity, ReadOnlySpan<byte> rightValidity, int start, Span<bool> destination)
282private static void ValidityElementwiseAnd(ReadOnlySpan<byte> left, ReadOnlySpan<byte> right, Span<byte> destination)
Utils\BitUtility.cs (7)
59public static void ClearBit(Span<byte> data, int index)
64public static void SetBit(Span<byte> data, int index)
69public static void SetBit(Span<byte> data, long index, bool value)
86public static void SetBits(Span<byte> data, long index, long length, bool value)
119var slice = data.Slice(startByteIndex, 1);
126var slice = data.Slice(fullByteStartIndex, fullByteEndIndex - fullByteStartIndex + 1);
134var slice = data.Slice(endByteIndex, 1);
Microsoft.Data.Analysis.Tests (1)
Microsoft.Diagnostics.DataContractReader (18)
ContractDescriptorTarget.cs (18)
74public delegate int ReadFromTargetDelegate(ulong address, Span<byte> bufferToFill);
75public delegate int WriteToTargetDelegate(ulong address, Span<byte> bufferToWrite);
76public delegate int GetTargetThreadContextDelegate(uint threadId, uint contextFlags, Span<byte> bufferToFill);
401Span<byte> buffer = stackalloc byte[sizeof(ulong)];
452Span<byte> descriptorBuffer = descriptorSize <= StackAllocByteThreshold
500public override bool TryGetThreadContext(ulong threadId, uint contextFlags, Span<byte> buffer)
562Span<byte> buffer = stackalloc byte[sizeof(T)];
600Span<byte> buffer = stackalloc byte[sizeof(T)];
628public override void ReadBuffer(ulong address, Span<byte> buffer)
634private bool TryReadBuffer(ulong address, Span<byte> buffer)
639public override void WriteBuffer(ulong address, Span<byte> buffer)
656private bool TryWriteBuffer(ulong address, Span<byte> buffer)
732public void ReadPointers(ulong address, Span<TargetPointer> buffer)
764Span<byte> span = length <= StackAllocByteThreshold
789Span<byte> span = length <= StackAllocByteThreshold
1064public int ReadFromTarget(ulong address, Span<byte> buffer)
1072public int GetThreadContext(uint threadId, uint contextFlags, Span<byte> buffer)
1080public int WriteToTarget(ulong address, Span<byte> buffer)
Microsoft.Diagnostics.DataContractReader.Abstractions (3)
Microsoft.Diagnostics.DataContractReader.Contracts (37)
Microsoft.Diagnostics.DataContractReader.Legacy (77)
Generated\361d1da7f942c932\Microsoft.Diagnostics.DataContractReader.Legacy.ISOSDacInterface.cs (30)
326global::System.Span<ulong> __values_native__nativeSpan = __values_native__marshaller.GetUnmanagedValuesDestination();
345global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __values_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __values_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __values_native__numElements);
346global::System.Span<ulong> __values_native__nativeSpan = __values_native__marshaller.GetUnmanagedValuesDestination();
387global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __values_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(values);
398global::System.Span<ulong> __values_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetUnmanagedValuesSource(__values_native, __values_native__numElements).GetPinnableReference()), __values_native__numElements);
399global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __values_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(values);
577global::System.Span<ulong> __values_native__nativeSpan = __values_native__marshaller.GetUnmanagedValuesDestination();
597global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __values_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __values_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __values_native__numElements);
598global::System.Span<ulong> __values_native__nativeSpan = __values_native__marshaller.GetUnmanagedValuesDestination();
640global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __values_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(values);
652global::System.Span<ulong> __values_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetUnmanagedValuesSource(__values_native, __values_native__numElements).GetPinnableReference()), __values_native__numElements);
653global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __values_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(values);
953global::System.Span<ulong> __modules_native__nativeSpan = __modules_native__marshaller.GetUnmanagedValuesDestination();
973global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __modules_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __modules_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __modules_native__numElements);
974global::System.Span<ulong> __modules_native__nativeSpan = __modules_native__marshaller.GetUnmanagedValuesDestination();
1016global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __modules_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(modules);
1028global::System.Span<ulong> __modules_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetUnmanagedValuesSource(__modules_native, __modules_native__numElements).GetPinnableReference()), __modules_native__numElements);
1029global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __modules_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(modules);
2473global::System.Span<ulong> __heaps_native__nativeSpan = __heaps_native__marshaller.GetUnmanagedValuesDestination();
2492global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __heaps_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __heaps_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __heaps_native__numElements);
2493global::System.Span<ulong> __heaps_native__nativeSpan = __heaps_native__marshaller.GetUnmanagedValuesDestination();
2534global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __heaps_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(heaps);
2545global::System.Span<ulong> __heaps_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetUnmanagedValuesSource(__heaps_native, __heaps_native__numElements).GetPinnableReference()), __heaps_native__numElements);
2546global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __heaps_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(heaps);
4275global::System.Span<ulong> __values_native__nativeSpan = __values_native__marshaller.GetUnmanagedValuesDestination();
4295global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __values_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __values_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __values_native__numElements);
4296global::System.Span<ulong> __values_native__nativeSpan = __values_native__marshaller.GetUnmanagedValuesDestination();
4338global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __values_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(values);
4350global::System.Span<ulong> __values_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetUnmanagedValuesSource(__values_native, __values_native__numElements).GetPinnableReference()), __values_native__numElements);
4351global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __values_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(values);
Microsoft.DiaSymReader (189)
Generated\361d1da7f942c932\Microsoft.DiaSymReader.ISymUnmanagedMethod.cs (18)
440global::System.Span<global::System.IntPtr> __parameters_native__nativeSpan = __parameters_native__marshaller.GetUnmanagedValuesDestination();
462global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __parameters_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __parameters_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __parameters_native__numElements);
463global::System.Span<global::System.IntPtr> __parameters_native__nativeSpan = __parameters_native__marshaller.GetUnmanagedValuesDestination();
514global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __parameters_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetManagedValuesDestination(parameters);
526global::System.Span<global::System.IntPtr> __parameters_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetUnmanagedValuesSource(__parameters_native, __parameters_native__numElements).GetPinnableReference()), __parameters_native__numElements);
527global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __parameters_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetManagedValuesDestination(parameters);
634global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = __documents_native__marshaller.GetUnmanagedValuesDestination();
658global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __documents_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __documents_native__numElements);
659global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = __documents_native__marshaller.GetUnmanagedValuesDestination();
722global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument, global::System.IntPtr>.GetManagedValuesDestination(documents);
737global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument, global::System.IntPtr>.GetUnmanagedValuesSource(__documents_native, __documents_native__numElements).GetPinnableReference()), __documents_native__numElements);
738global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument, global::System.IntPtr>.GetManagedValuesDestination(documents);
781global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = __documents_native__marshaller.GetUnmanagedValuesDestination();
808global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __documents_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __documents_native__numElements);
809global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = __documents_native__marshaller.GetUnmanagedValuesDestination();
887global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument, global::System.IntPtr>.GetManagedValuesDestination(documents);
906global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument, global::System.IntPtr>.GetUnmanagedValuesSource(__documents_native, __documents_native__numElements).GetPinnableReference()), __documents_native__numElements);
907global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument, global::System.IntPtr>.GetManagedValuesDestination(documents);
Generated\361d1da7f942c932\Microsoft.DiaSymReader.ISymUnmanagedNamespace.cs (12)
132global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = __namespaces_native__marshaller.GetUnmanagedValuesDestination();
154global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __namespaces_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __namespaces_native__numElements);
155global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = __namespaces_native__marshaller.GetUnmanagedValuesDestination();
206global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace, global::System.IntPtr>.GetManagedValuesDestination(namespaces);
218global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace, global::System.IntPtr>.GetUnmanagedValuesSource(__namespaces_native, __namespaces_native__numElements).GetPinnableReference()), __namespaces_native__numElements);
219global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace, global::System.IntPtr>.GetManagedValuesDestination(namespaces);
263global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
285global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __variables_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __variables_native__numElements);
286global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
337global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetManagedValuesDestination(variables);
349global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetUnmanagedValuesSource(__variables_native, __variables_native__numElements).GetPinnableReference()), __variables_native__numElements);
350global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetManagedValuesDestination(variables);
Generated\361d1da7f942c932\Microsoft.DiaSymReader.ISymUnmanagedReader.cs (30)
169global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = __documents_native__marshaller.GetUnmanagedValuesDestination();
191global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __documents_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __documents_native__numElements);
192global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = __documents_native__marshaller.GetUnmanagedValuesDestination();
243global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument, global::System.IntPtr>.GetManagedValuesDestination(documents);
255global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument, global::System.IntPtr>.GetUnmanagedValuesSource(__documents_native, __documents_native__numElements).GetPinnableReference()), __documents_native__numElements);
256global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument, global::System.IntPtr>.GetManagedValuesDestination(documents);
472global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
494global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __variables_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __variables_native__numElements);
495global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
546global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetManagedValuesDestination(variables);
558global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetUnmanagedValuesSource(__variables_native, __variables_native__numElements).GetPinnableReference()), __variables_native__numElements);
559global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetManagedValuesDestination(variables);
603global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
625global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __variables_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __variables_native__numElements);
626global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
677global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetManagedValuesDestination(variables);
689global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetUnmanagedValuesSource(__variables_native, __variables_native__numElements).GetPinnableReference()), __variables_native__numElements);
690global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetManagedValuesDestination(variables);
863global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = __namespaces_native__marshaller.GetUnmanagedValuesDestination();
885global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __namespaces_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __namespaces_native__numElements);
886global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = __namespaces_native__marshaller.GetUnmanagedValuesDestination();
937global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace, global::System.IntPtr>.GetManagedValuesDestination(namespaces);
949global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace, global::System.IntPtr>.GetUnmanagedValuesSource(__namespaces_native, __namespaces_native__numElements).GetPinnableReference()), __namespaces_native__numElements);
950global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace, global::System.IntPtr>.GetManagedValuesDestination(namespaces);
1234global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
1257global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __methods_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __methods_native__numElements);
1258global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
1311global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.GetManagedValuesDestination(methods);
1324global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.GetUnmanagedValuesSource(__methods_native, __methods_native__numElements).GetPinnableReference()), __methods_native__numElements);
1325global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.GetManagedValuesDestination(methods);
Generated\361d1da7f942c932\Microsoft.DiaSymReader.ISymUnmanagedReader2.cs (21)
215global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
238global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __methods_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __methods_native__numElements);
239global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
292global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.GetManagedValuesDestination(methods);
305global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.GetUnmanagedValuesSource(__methods_native, __methods_native__numElements).GetPinnableReference()), __methods_native__numElements);
306global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.GetManagedValuesDestination(methods);
389global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = __documents_native__marshaller.GetUnmanagedValuesDestination();
411global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __documents_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __documents_native__numElements);
412global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = __documents_native__marshaller.GetUnmanagedValuesDestination();
564global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
586global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __variables_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __variables_native__numElements);
587global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
642global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
664global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __variables_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __variables_native__numElements);
665global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
787global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = __namespaces_native__marshaller.GetUnmanagedValuesDestination();
809global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __namespaces_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __namespaces_native__numElements);
810global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = __namespaces_native__marshaller.GetUnmanagedValuesDestination();
993global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
1016global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __methods_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __methods_native__numElements);
1017global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
Generated\361d1da7f942c932\Microsoft.DiaSymReader.ISymUnmanagedScope.cs (18)
209global::System.Span<global::System.IntPtr> __children_native__nativeSpan = __children_native__marshaller.GetUnmanagedValuesDestination();
231global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedScope> __children_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __children_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __children_native__numElements);
232global::System.Span<global::System.IntPtr> __children_native__nativeSpan = __children_native__marshaller.GetUnmanagedValuesDestination();
283global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedScope> __children_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedScope, global::System.IntPtr>.GetManagedValuesDestination(children);
295global::System.Span<global::System.IntPtr> __children_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedScope, global::System.IntPtr>.GetUnmanagedValuesSource(__children_native, __children_native__numElements).GetPinnableReference()), __children_native__numElements);
296global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedScope> __children_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedScope, global::System.IntPtr>.GetManagedValuesDestination(children);
484global::System.Span<global::System.IntPtr> __locals_native__nativeSpan = __locals_native__marshaller.GetUnmanagedValuesDestination();
506global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __locals_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __locals_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __locals_native__numElements);
507global::System.Span<global::System.IntPtr> __locals_native__nativeSpan = __locals_native__marshaller.GetUnmanagedValuesDestination();
558global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __locals_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetManagedValuesDestination(locals);
570global::System.Span<global::System.IntPtr> __locals_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetUnmanagedValuesSource(__locals_native, __locals_native__numElements).GetPinnableReference()), __locals_native__numElements);
571global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __locals_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.GetManagedValuesDestination(locals);
615global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = __namespaces_native__marshaller.GetUnmanagedValuesDestination();
637global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __namespaces_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __namespaces_native__numElements);
638global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = __namespaces_native__marshaller.GetUnmanagedValuesDestination();
689global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace, global::System.IntPtr>.GetManagedValuesDestination(namespaces);
701global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace, global::System.IntPtr>.GetUnmanagedValuesSource(__namespaces_native, __namespaces_native__numElements).GetPinnableReference()), __namespaces_native__numElements);
702global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace, global::System.IntPtr>.GetManagedValuesDestination(namespaces);
Microsoft.DotNet.Build.Tasks.Installers (3)
Microsoft.DotNet.Cli.CoreUtils (8)
Microsoft.DotNet.ILAssembler (2)
Microsoft.DotNet.NativeWrapper (1)
Microsoft.DotNet.TemplateLocator (1)
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.SystemTextJson.cs (1)
47Span<byte> span;
Microsoft.Extensions.AI.Abstractions (3)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.Extensions.Caching.Hybrid (7)
Microsoft.Extensions.Caching.Hybrid.Tests (2)
Microsoft.Extensions.Compliance.Abstractions (13)
Redaction\Redactor.cs (10)
71public abstract int Redact(ReadOnlySpan<char> source, Span<char> destination);
83public int Redact(string? source, Span<char> destination) => Redact(source.AsSpan(), destination);
114Span<char> buffer = stackalloc char[MaximumStackAllocation];
122var formatted = buffer.Slice(0, written);
171public int Redact<T>(T value, Span<char> destination, string? format = null, IFormatProvider? provider = null)
176Span<char> buffer = stackalloc char[MaximumStackAllocation];
182var formatted = buffer.Slice(0, written);
222public bool TryRedact<T>(T value, Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider = null)
227Span<char> buffer = stackalloc char[MaximumStackAllocation];
233var formatted = buffer.Slice(0, written);
Microsoft.Extensions.Compliance.Abstractions.Tests (5)
Microsoft.Extensions.Compliance.Redaction (4)
Microsoft.Extensions.Compliance.Redaction.Tests (2)
Microsoft.Extensions.Compliance.Testing (1)
Microsoft.Extensions.Configuration (6)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (8)
Microsoft.Extensions.Configuration.EnvironmentVariables (6)
Microsoft.Extensions.DataIngestion (6)
Microsoft.Extensions.DependencyInjection.Abstractions (6)
Microsoft.Extensions.Diagnostics (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (9)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Microsoft.Extensions.DotNetDeltaApplier (1)
Microsoft.Extensions.FileProviders.Physical (1)
Microsoft.Extensions.Http.Diagnostics (6)
Microsoft.Extensions.Identity.Core (8)
Base32.cs (4)
28Span<byte> bytes = stackalloc byte[length];
100internal static bool TryFromBase32(ReadOnlySpan<char> input, Span<byte> destination, out int bytesWritten)
110var output = destination.Slice(0, outputLength);
161private static int GetNextGroup(Span<byte> input, ref int offset, out byte a, out byte b, out byte c, out byte d, out byte e, out byte f, out byte g, out byte h)
Microsoft.Extensions.Logging.Abstractions (6)
Microsoft.Extensions.Logging.Console (11)
Microsoft.Extensions.Logging.Generators (8)
Microsoft.Extensions.ServiceDiscovery.Dns (4)
Microsoft.Extensions.Telemetry (5)
Microsoft.Extensions.Telemetry.Tests (2)
Microsoft.Extensions.VectorData.Abstractions (2)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.JSInterop.WebAssembly (1)
Microsoft.Maui.Graphics (4)
Microsoft.Maui.Resizetizer (2)
Microsoft.ML.Core (12)
Microsoft.ML.Core.Tests (3)
Microsoft.ML.CpuMath (45)
AvxIntrinsics.cs (14)
420public static unsafe void AddScalarU(float scalar, Span<float> dst)
461public static unsafe void Scale(float scale, Span<float> dst)
568public static unsafe void ScaleSrcU(float scale, ReadOnlySpan<float> src, Span<float> dst, int count)
617public static unsafe void ScaleAddU(float a, float b, Span<float> dst)
663public static unsafe void AddScaleU(float scale, ReadOnlySpan<float> src, Span<float> dst, int count)
717public static unsafe void AddScaleCopyU(float scale, ReadOnlySpan<float> src, ReadOnlySpan<float> dst, Span<float> result, int count)
774public static unsafe void AddScaleSU(float scale, ReadOnlySpan<float> src, ReadOnlySpan<int> idx, Span<float> dst, int count)
825public static unsafe void AddU(ReadOnlySpan<float> src, Span<float> dst, int count)
874public static unsafe void AddSU(ReadOnlySpan<float> src, ReadOnlySpan<int> idx, Span<float> dst, int count)
922public static unsafe void MulElementWiseU(ReadOnlySpan<float> src1, ReadOnlySpan<float> src2, Span<float> dst, int count)
1505public static unsafe void SdcaL1UpdateU(float primalUpdate, int count, ReadOnlySpan<float> src, float threshold, Span<float> v, Span<float> w)
1565public static unsafe void SdcaL1UpdateSU(float primalUpdate, int count, ReadOnlySpan<float> src, ReadOnlySpan<int> indices, float threshold, Span<float> v, Span<float> w)
CpuMathUtils.cs (7)
21public static void Add(float value, Span<float> destination)
33public static void Scale(float value, Span<float> destination)
48public static void Scale(float value, ReadOnlySpan<float> source, Span<float> destination, int count)
67public static void AddScale(float scale, ReadOnlySpan<float> source, Span<float> destination, int count)
87public static void AddScaleCopy(float scale, ReadOnlySpan<float> source, ReadOnlySpan<float> destination, Span<float> result, int count)
107public static void Add(ReadOnlySpan<float> source, Span<float> destination, int count)
126public static void MulElementWise(ReadOnlySpan<float> left, ReadOnlySpan<float> right, Span<float> destination, int count)
CpuMathUtils.netcoreapp.cs (7)
167public static void ScaleAdd(float scale, float addend, Span<float> destination)
197public static void AddScale(float scale, ReadOnlySpan<float> source, ReadOnlySpan<int> indices, Span<float> destination, int count)
233public static void Add(ReadOnlySpan<float> source, ReadOnlySpan<int> indices, Span<float> destination, int count)
529public static void SdcaL1UpdateDense(float primalUpdate, int count, ReadOnlySpan<float> source, float threshold, Span<float> v, Span<float> w)
569public static void SdcaL1UpdateSparse(float primalUpdate, int count, ReadOnlySpan<float> source, ReadOnlySpan<int> indices, float threshold, Span<float> v, Span<float> w)
SseIntrinsics.cs (14)
355public static unsafe void AddScalarU(float scalar, Span<float> dst)
385public static unsafe void Scale(float scale, Span<float> dst)
487public static unsafe void ScaleSrcU(float scale, ReadOnlySpan<float> src, Span<float> dst, int count)
524public static unsafe void ScaleAddU(float a, float b, Span<float> dst)
557public static unsafe void AddScaleU(float scale, ReadOnlySpan<float> src, Span<float> dst, int count)
598public static unsafe void AddScaleCopyU(float scale, ReadOnlySpan<float> src, ReadOnlySpan<float> dst, Span<float> result, int count)
642public static unsafe void AddScaleSU(float scale, ReadOnlySpan<float> src, ReadOnlySpan<int> idx, Span<float> dst, int count)
681public static unsafe void AddU(ReadOnlySpan<float> src, Span<float> dst, int count)
718public static unsafe void AddSU(ReadOnlySpan<float> src, ReadOnlySpan<int> idx, Span<float> dst, int count)
754public static unsafe void MulElementWiseU(ReadOnlySpan<float> src1, ReadOnlySpan<float> src2, Span<float> dst, int count)
1199public static unsafe void SdcaL1UpdateU(float primalUpdate, int count, ReadOnlySpan<float> src, float threshold, Span<float> v, Span<float> w)
1244public static unsafe void SdcaL1UpdateSU(float primalUpdate, int count, ReadOnlySpan<float> src, ReadOnlySpan<int> indices, float threshold, Span<float> v, Span<float> w)
Microsoft.ML.Data (23)
Deprecated\Vector\GenericSpanSortHelper.cs (19)
48public static void Sort<TValue>(Span<TKey> keys, Span<TValue> values, int index, int length)
55public static void Sort(Span<TKey> keys, int index, int length)
60private static void SwapIfGreaterWithItems<TValue>(Span<TKey> keys, Span<TValue> values, int a, int b)
76private static void Swap<TValue>(Span<TKey> keys, Span<TValue> values, int i, int j)
89internal static void IntrospectiveSort<TValue>(Span<TKey> keys, Span<TValue> values, int left, int length)
103private static void IntroSort<TValue>(Span<TKey> keys, Span<TValue> values, int lo, int hi, int depthLimit)
148private static int PickPivotAndPartition<TValue>(Span<TKey> keys, Span<TValue> values, int lo, int hi)
191private static void Heapsort<TValue>(Span<TKey> keys, Span<TValue> values, int lo, int hi)
209private static void DownHeap<TValue>(Span<TKey> keys, Span<TValue> values, int i, int n, int lo)
234private static void InsertionSort<TValue>(Span<TKey> keys, Span<TValue> values, int lo, int hi)
Microsoft.ML.DataView (6)
Microsoft.ML.ImageAnalytics (6)
Microsoft.ML.KMeansClustering (1)
Microsoft.ML.Mkl.Components (3)
Microsoft.ML.StandardTrainers (6)
Microsoft.ML.TensorFlow (4)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.ML.Tokenizers (133)
Model\BertTokenizer.cs (3)
339public OperationStatus BuildInputsWithSpecialTokens(IEnumerable<int> tokenIds, Span<int> destination, out int valuesWritten, IEnumerable<int>? additionalTokenIds = null)
466public OperationStatus GetSpecialTokensMask(IEnumerable<int> tokenIds, Span<int> destination, out int valuesWritten, IEnumerable<int>? additionalTokenIds = null, bool alreadyHasSpecialTokens = false)
602public OperationStatus CreateTokenTypeIdsFromSequences(IEnumerable<int> tokenIds, Span<int> destination, out int valuesWritten, IEnumerable<int>? additionalTokenIds = null)
Model\BpeTokenizer.cs (18)
887public override OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, out int idsConsumed, out int charsWritten)
899public OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, bool considerSpecialTokens, out int idsConsumed, out int charsWritten)
914Span<char> buffer = destination;
980private OperationStatus DecodeByteLevel(IEnumerable<int> ids, Span<char> destination, bool considerSpecialTokens, out int idsConsumed, out int charsWritten)
986Span<char> vocabBuffer = stackalloc char[128];
989Span<byte> utf8bytes = stackalloc byte[256];
998Span<char> buffer = destination;
1044Span<byte> current = utf8bytes.Slice(incompleteUtf8BytesInBufferIndex + incompleteUtf8BytesInBuffer);
1212Span<char> buffer = stackalloc char[256];
1332scoped Span<char> token;
1333scoped Span<int> mapping = Span<int>.Empty;
1445scoped Span<char> token;
1446scoped Span<int> mapping = Span<int>.Empty;
1525scoped Span<char> token;
1526scoped Span<int> mapping = Span<int>.Empty;
Model\CodeGenTokenizer.cs (22)
337Span<char> mutatedInputSpan = stackalloc char[BufferLength];
445Span<char> token = stackalloc char[BufferLength];
446Span<int> mapping = stackalloc int[BufferLength];
596Span<char> mutatedInputSpan = stackalloc char[BufferLength];
688=> CountTokens(text, Span<char>.Empty, addPrefixSpace, addBeginningOfSentence, addEndOfSentence, considerPreTokenization, considerNormalization, out _, out _);
750tokenCount = CountTokens(text, Span<char>.Empty, addPrefixSpace, addBeginningOfSentence, addEndOfSentence, considerPreTokenization, considerNormalization, out normalizedText, out int charsConsumed, maxTokenCount);
815Span<char> mutatedInputSpan = stackalloc char[BufferLength];
900=> LastIndexOf(text, Span<char>.Empty, maxTokenCount, addPrefixSpace, addBeginningOfSentence, addEndOfSentence, considerPreTokenization, considerNormalization, out normalizedText, out tokenCount);
952Span<char> mutatedInputSpan = stackalloc char[BufferLength];
1128Span<char> token = stackalloc char[BufferLength];
1129Span<int> mapping = stackalloc int[BufferLength];
1192Span<char> token = stackalloc char[100];
1193Span<int> mapping = stackalloc int[100];
1331public override OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, out int idsConsumed, out int charsWritten)
1344public OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, bool hasPrefixSpace, bool considerSpecialTokens, out int idsConsumed, out int charsWritten)
1355Span<char> vocabBuffer = stackalloc char[256];
1357Span<byte> utf8bytes = stackalloc byte[256];
1365Span<char> buffer = destination;
1470Span<byte> current = utf8bytes.Slice(incompleteUtf8BytesInBufferIndex + incompleteUtf8BytesInBuffer);
1598private List<EncodedToken> EncodeToTokens(Span<char> text, Span<int> mapping, ReadOnlySpan<char> originalText, PriorityQueue<SymbolPair> agenda)
1680static EncodedToken GetToken(int id, string token, int index, int length, ReadOnlySpan<char> originalText, Span<int> mapping)
Model\SentencePieceBaseModel.cs (7)
412public virtual OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, bool considerSpecialTokens, out int idsConsumed, out int charsWritten)
428Span<char> buffer = destination;
620static OperationStatus TryDecodeAsSpecialToken(SentencePieceBaseModel model, int id, bool considerSpecialTokens, Span<char> buffer, ref int charsWritten, out bool isSpecialToken)
657static bool FlushBytes(ref int bytesCount, ref byte[]? bytesPoolArray, ref char[]? charPoolArray, Span<char> buffer, ref int charsWritten, ref int idsConsumed)
686static bool EncodeByte(int id, int oneByteUtf8EncodingMaxId, int byteCodeToIdOffset, ref int bytesCount, Span<char> buffer, ref int charsWritten, ref int idsConsumed, ref byte[]? bytesPoolArray)
709static bool AppendTokenWithCheckingPrefix(bool addDummyPrefix, bool treatWhitespaceAsSuffix, string token, char prefixSuffixChar, Span<char> destination, ref bool prefixRemoved, ref int suffixIndex, ref int idsConsumed, ref int charsConsumed)
716Span<char> buffer = destination.Slice(charsConsumed);
Model\SentencePieceTokenizer.cs (5)
146=> _model.EncodeToTokens(text, Span<char>.Empty, out normalizedText, addBeginningOfSentence, addEndOfSentence, considerNormalization);
189=> _model.EncodeToIds(text, Span<char>.Empty, addBeginningOfSentence, addEndOfSentence, considerNormalization, out _, out _);
216=> _model.EncodeToIds(text, Span<char>.Empty, addBeginningOfSentence, addEndOfSentence, considerNormalization, out normalizedText, out charsConsumed, maxTokenCount);
425public override OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, out int idsConsumed, out int charsWritten)
437public OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, bool considerSpecialTokens, out int idsConsumed, out int charsWritten)
Model\SentencePieceUnigramModel.cs (11)
456Span<char> utf16NormalizedString = normalizedString.AsSpan().Slice(normalizedStringIndex);
470Span<char> normalizedUtf16Span = normalizedString.AsSpan().Slice(normalizedStringIndex);
567out Span<byte> normalizationSpan)
570Span<byte> byteSpan = MemoryMarshal.AsBytes(buffer.AsSpan());
614NormalizeText(text, considerNormalization, buffer, out byte[]? normalizedArrayPool, out Span<byte> normalizationSpan);
689Span<byte> destination = stackalloc byte[4];
746private void Encode(ReadOnlySpan<byte> normalized, Span<BestPathNode> bestPathEndsAt)
909NormalizeText(text, considerNormalization, buffer, out byte[]? normalizedArrayPool, out Span<byte> normalizationSpan);
1065NormalizeText(text, considerNormalization, buffer, out byte[]? normalizedArrayPool, out Span<byte> normalizationSpan);
1406NormalizeText(text, considerNormalization, buffer, out byte[]? normalizedArrayPool, out Span<byte> normalizationSpan);
1667NormalizeText(text, considerNormalization, buffer, out byte[]? normalizedArrayPool, out Span<byte> normalizationSpan);
Normalizer\SentencePieceNormalizer.cs (9)
118Span<byte> normalized = poolArray;
177Span<char> span = stackalloc char[512];
249private void InsertDummyPrefix(ReadOnlySpan<char> original, ref int startIndex, int endIndex, Span<char> span, ref int bufferIndex)
279private void InsertDummyPrefixAtEnd(Span<char> span, ref int bufferIndex)
333Span<DoubleArrayResultPair> trieResults = stackalloc DoubleArrayResultPair[MaxTrieResultsSize];
383internal int Normalize(ReadOnlySpan<byte> input, ref Span<byte> normalized, ref byte[]? poolArray)
416private int NormalizeCore(ReadOnlySpan<byte> input, ref Span<byte> normalized, ref byte[]? poolArray)
521Span<byte> space = EscapeWhiteSpaces ? _spaceSymbol : _space;
544static void AddWhiteSpace(SentencePieceNormalizer normalizer, Span<byte> normalized, ref int normalizedIndex, ref byte[]? poolArray)
Utils\Helpers.cs (7)
30internal static void ArrayPoolGrow<T>(ref Span<T> span, ref T[]? poolArray, int newSize)
67internal static int EncodeToUtf8(ReadOnlySpan<char> text, Span<byte> destination, Span<int> indexMapping)
121internal static int EncodeNextUtf8(ReadOnlySpan<char> text, Span<byte> destination)
159internal static int EncodeToUtf8AndTransform(ReadOnlySpan<char> text, Span<char> destination, Span<int> indexMapping)
235public static bool ConvertUtf8ToUtf16(ReadOnlySpan<byte> utf8Bytes, Span<char> utf16Chars, out int bytesConsumed, out int charsWritten)
Utils\Helpers.netcoreapp.cs (6)
58internal static unsafe int GetUtf8Bytes(ReadOnlySpan<char> source, Span<byte> destination)
61internal static unsafe bool TryGetUtf8Bytes(ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten)
67internal static int GetChars(ReadOnlySpan<byte> bytes, Span<char> chars)
70internal static void Replace(Span<char> span, char oldValue, char newValue) => span.Replace(oldValue, newValue);
72internal static void Replace(ReadOnlySpan<char> source, Span<char> destination, char oldValue, char newValue) => source.Replace(destination, oldValue, newValue);
88Span<byte> buffer = stackalloc byte[4]; // max number of bytes for a single code point utf-8 encoding.
Microsoft.ML.Tokenizers.Tests (30)
parent\parent\src\Microsoft.ML.Tokenizers\Utils\Helpers.cs (7)
30internal static void ArrayPoolGrow<T>(ref Span<T> span, ref T[]? poolArray, int newSize)
67internal static int EncodeToUtf8(ReadOnlySpan<char> text, Span<byte> destination, Span<int> indexMapping)
121internal static int EncodeNextUtf8(ReadOnlySpan<char> text, Span<byte> destination)
159internal static int EncodeToUtf8AndTransform(ReadOnlySpan<char> text, Span<char> destination, Span<int> indexMapping)
235public static bool ConvertUtf8ToUtf16(ReadOnlySpan<byte> utf8Bytes, Span<char> utf16Chars, out int bytesConsumed, out int charsWritten)
parent\parent\src\Microsoft.ML.Tokenizers\Utils\Helpers.netcoreapp.cs (6)
58internal static unsafe int GetUtf8Bytes(ReadOnlySpan<char> source, Span<byte> destination)
61internal static unsafe bool TryGetUtf8Bytes(ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten)
67internal static int GetChars(ReadOnlySpan<byte> bytes, Span<char> chars)
70internal static void Replace(Span<char> span, char oldValue, char newValue) => span.Replace(oldValue, newValue);
72internal static void Replace(ReadOnlySpan<char> source, Span<char> destination, char oldValue, char newValue) => source.Replace(destination, oldValue, newValue);
88Span<byte> buffer = stackalloc byte[4]; // max number of bytes for a single code point utf-8 encoding.
TokenizerTests.cs (3)
81public override OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, out int idsConsumed, out int charsWritten)
218Assert.Equal(0, tokenizer.GetIndexByTokenCount(Span<char>.Empty, maxTokenCount: 10, out _, out _));
219Assert.Equal(0, tokenizer.GetIndexByTokenCountFromEnd(Span<char>.Empty, maxTokenCount: 10, out _, out _));
Microsoft.ML.TorchSharp (2)
Microsoft.ML.Transforms (11)
Microsoft.ML.Vision (1)
Microsoft.NET.Build.Containers (8)
Microsoft.NET.Build.Tasks (1)
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.SystemTextJson.cs (1)
47Span<byte> span;
Microsoft.NET.HostModel (6)
Microsoft.Net.Http.Headers (6)
Microsoft.NET.ProjectData (1)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (2)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (11)
Microsoft.NET.Sdk.WorkloadManifestReader (1)
Microsoft.Private.Windows.Core (112)
Microsoft.TestPlatform.AdapterUtilities (2)
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
Microsoft.Win32.Registry (3)
mscorlib (1)
netstandard (1)
PresentationCore (16)
PresentationFramework (11)
ReachFramework (1)
Roslyn.Diagnostics.Analyzers (62)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (19)
315int nanLeft = SegmentedArraySortUtils.MoveNansToFront(keys, default(Span<byte>));
673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j)
711private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer)
781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer)
871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
944private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
962private static void Swap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int j)
975private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit)
1020private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1079private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1096private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n)
1121private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values)
1233public static int MoveNansToFront<TKey, TValue>(SegmentedArraySegment<TKey> keys, Span<TValue> values) where TKey : notnull
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry_Metrics.cs (6)
50Span<KeyValuePair<string, object?>> tags = [tag];
56Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
62Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
96Span<KeyValuePair<string, object?>> tags = [tag];
102Span<KeyValuePair<string, object?>> tags = [tag1, tag2];
108Span<KeyValuePair<string, object?>> tags = [tag1, tag2, tag3];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
786Name: nameof(Span<>),
sdk-tasks (2)
Shared (5)
System.Collections (4)
System.Collections.Immutable (20)
System.CommandLine (1)
System.ComponentModel.Annotations (1)
System.ComponentModel.TypeConverter (6)
System.Console (21)
System.Data.Common (33)
System\Data\SQLTypes\SQLDecimal.cs (24)
493Span<int> bits = [0, 0, 0, 0];
930Span<uint> rgulNumeric = [_data1, _data2, _data3, _data4];
932Span<char> pszTmp = stackalloc char[s_NUMERIC_MAX_PRECISION + 1]; //Local Character buffer to hold
1165public int WriteTdsValue(Span<uint> destination)
1296Span<uint> rglData1 = [x._data1, x._data2, x._data3, x._data4];
1297Span<uint> rglData2 = [y._data1, y._data2, y._data3, y._data4];
1345Span<uint> rguiTemp = rglData2;
1488Span<uint> rgulRes = stackalloc uint[x_culNumeMultRes]; //new [] are already initialized to zero
1716Span<uint> rgulData1 = [x._data1, x._data2, x._data3, x._data4];
1717Span<uint> rgulData2 = [y._data1, y._data2, y._data3, y._data4];
1720Span<uint> rgulR = stackalloc uint[s_cNumeMax + 1];
1721Span<uint> rgulQ = stackalloc uint[s_cNumeMax];
1864private static void ZeroToMaxLen(Span<uint> rgulData, int cUI4sCur)
1938private static bool FGt10_38(Span<uint> rglData)
2126Span<uint> rguiData = [_data1, _data2, _data3, _data4];
2171Span<uint> rguiData = [_data1, _data2, _data3, _data4];
2231Span<uint> rguiData = [_data1, _data2, _data3, _data4];
2465Span<uint> rgulD, // Out | Destination number
2481Span<uint> rgulD, // Out | Number
2506Span<uint> piulD, // InOut| D
2538Span<uint> rgulU, // InOut| U
2602Span<uint> rgulD, // InOut | D
2604Span<uint> rgulQ, // Out | Q
2606Span<uint> rgulR, // Out | R
System.Data.OleDb (2)
System.Diagnostics.DiagnosticSource (43)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Diagnostics.EventLog (8)
System.Diagnostics.FileVersionInfo (1)
System.Diagnostics.PerformanceCounter (3)
System.Diagnostics.Process (21)
System.Diagnostics.TextWriterTraceListener (3)
System.Diagnostics.TraceSource (1)
System.DirectoryServices.Protocols (4)
System.Drawing.Primitives (1)
System.Formats.Asn1 (89)
System.Formats.Cbor (21)
System.Formats.Nrbf (6)
System.Formats.Tar (44)
System.IO.Compression (108)
System\IO\Compression\DeflateEncoder.cs (5)
175public OperationStatus Compress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock)
245public OperationStatus Flush(Span<byte> destination, out int bytesWritten)
308public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
319public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, int quality)
331public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, int quality, int windowLog2)
System\IO\Compression\GZipEncoder.cs (5)
103public OperationStatus Compress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock)
115public OperationStatus Flush(Span<byte> destination, out int bytesWritten)
141public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
152public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, int quality)
164public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, int quality, int windowLog2)
System\IO\Compression\ZipArchiveEntry.cs (12)
857private void WriteCentralDirectoryFileHeaderPrepare(Span<byte> cdStaticHeader, uint compressedSizeTruncated, uint uncompressedSizeTruncated, ushort extraFieldLength, uint offsetOfLocalHeaderTruncated)
908Span<byte> cdStaticHeader = stackalloc byte[ZipCentralDirectoryFileHeader.BlockConstantSectionSize];
1768private void WriteLocalFileHeaderPrepare(Span<byte> lfStaticHeader, uint crc32, uint compressedSizeTruncated, uint uncompressedSizeTruncated, ushort extraFieldLength)
1791Span<byte> lfStaticHeader = stackalloc byte[ZipLocalFileHeader.SizeOfLocalHeader];
1973Span<byte> flagBytes = stackalloc byte[2];
2037Span<byte> writeBuffer = stackalloc byte[Zip64DataDescriptorCrcAndSizesBufferLength];
2096private void WriteCrcAndSizesInLocalHeaderPrepareForZip64PretendStreaming(Span<byte> writeBuffer)
2110private void WriteCrcAndSizesInLocalHeaderPrepareFor32bitValuesWriting(bool pretendStreaming, Span<byte> writeBuffer, uint compressedSizeTruncated, uint uncompressedSizeTruncated)
2131private void WriteCrcAndSizesInLocalHeaderPrepareForWritingWhenZip64HeaderUsed(Span<byte> writeBuffer)
2143private void WriteCrcAndSizesInLocalHeaderPrepareForWritingDataDescriptor(Span<byte> writeBuffer)
2162Span<byte> dataDescriptor = stackalloc byte[MaxSizeOfDataDescriptor];
2167private int PrepareToWriteDataDescriptor(Span<byte> dataDescriptor)
System\IO\Compression\ZipBlocks.cs (26)
32Span<byte> extraFieldHeader = stackalloc byte[SizeOfHeader];
38private void WriteBlockCore(Span<byte> extraFieldHeader)
412public void WriteBlockCore(Span<byte> extraFieldData)
445Span<byte> extraFieldData = stackalloc byte[TotalSize];
464private static bool TryReadBlockCore(Span<byte> blockContents, int bytesRead, [NotNullWhen(returnValue: true)] out Zip64EndOfCentralDirectoryLocator? zip64EOCDLocator)
484Span<byte> blockContents = stackalloc byte[TotalSize];
493private static void WriteBlockCore(Span<byte> blockContents, long zip64EOCDRecordStart)
506Span<byte> blockContents = stackalloc byte[TotalSize];
532private static bool TryReadBlockCore(Span<byte> blockContents, int bytesRead, [NotNullWhen(returnValue: true)] out Zip64EndOfCentralDirectoryRecord? zip64EOCDRecord)
563Span<byte> blockContents = stackalloc byte[BlockConstantSectionSize];
573private static void WriteBlockCore(Span<byte> blockContents, long numberOfEntries, long startOfCentralDirectory, long sizeOfCentralDirectory)
595Span<byte> blockContents = stackalloc byte[BlockConstantSectionSize];
617private static void GetExtraFieldsCore(Span<byte> fixedHeaderBuffer, int relativeFilenameLengthLocation, int relativeExtraFieldLengthLocation, out ushort filenameLength, out ushort extraFieldLength)
623private static List<ZipGenericExtraField> GetExtraFieldPostReadWork(Span<byte> extraFieldBuffer, out byte[] trailingData, out bool usesZip64)
635Span<byte> fixedHeaderBuffer = stackalloc byte[FieldLengths.FilenameLength + FieldLengths.ExtraFieldLength];
644Span<byte> extraFieldBuffer = extraFieldLength <= StackAllocationThreshold ? stackalloc byte[StackAllocationThreshold].Slice(0, extraFieldLength) : arrayPoolBuffer.AsSpan(0, extraFieldLength);
661private static bool TrySkipBlockCore(Stream stream, Span<byte> blockBytes, int bytesRead)
678private static bool TrySkipBlockFinalize(Stream stream, Span<byte> blockBytes, int bytesRead)
707Span<byte> blockBytes = stackalloc byte[FieldLengths.Signature];
832Span<byte> buffer = stackalloc byte[TotalSize];
844private void WriteBlockCore(Span<byte> buffer)
1026Span<byte> collatedHeader = dynamicHeaderSize <= StackAllocationThreshold ? stackalloc byte[StackAllocationThreshold].Slice(0, dynamicHeaderSize) : arrayPoolBuffer.AsSpan(0, dynamicHeaderSize);
1080private static void WriteBlockInitialize(Span<byte> blockContents, long numberOfEntries, long startOfCentralDirectory, long sizeOfCentralDirectory, byte[] archiveComment)
1110Span<byte> blockContents = stackalloc byte[TotalSize];
1121private static bool TryReadBlockInitialize(Stream stream, Span<byte> blockContents, int bytesRead, [NotNullWhen(returnValue: true)] out ZipEndOfCentralDirectoryBlock? eocdBlock, out bool readComment)
1169Span<byte> blockContents = stackalloc byte[TotalSize];
System\IO\Compression\ZLibEncoder.cs (5)
96public OperationStatus Compress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock)
108public OperationStatus Flush(Span<byte> destination, out int bytesWritten)
134public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
145public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, int quality)
157public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, int quality, int windowLog2)
System\IO\Compression\Zstandard\ZstandardEncoder.cs (7)
211public OperationStatus Compress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock)
233public OperationStatus Flush(Span<byte> destination, out int bytesWritten)
241private OperationStatus CompressCore(ReadOnlySpan<byte> source, Span<byte> destination,
323public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
336public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, int quality, int windowLog2)
350public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, ZstandardDictionary dictionary, int windowLog2)
356internal static bool TryCompressCore(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, int quality, int windowLog2, ZstandardDictionary? dictionary)
System.IO.Compression.Brotli (11)
System\IO\Compression\enc\BrotliEncoder.cs (5)
129public OperationStatus Flush(Span<byte> destination, out int bytesWritten) => Compress(ReadOnlySpan<byte>.Empty, destination, out _, out bytesWritten, BrotliEncoderOperation.Flush);
140public OperationStatus Compress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock) => Compress(source, destination, out bytesConsumed, out bytesWritten, isFinalBlock ? BrotliEncoderOperation.Finish : BrotliEncoderOperation.Process);
142internal OperationStatus Compress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, BrotliEncoderOperation operation)
192public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten) => TryCompress(source, destination, out bytesWritten, BrotliUtils.Quality_Default, BrotliUtils.WindowBits_Default);
201public static bool TryCompress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, int quality, int window)
System.IO.FileSystem.AccessControl (7)
System.IO.FileSystem.DriveInfo (6)
System.IO.FileSystem.Watcher (11)
System.IO.Hashing (42)
System.IO.IsolatedStorage (1)
System.IO.MemoryMappedFiles (1)
System.IO.Packaging (3)
System.IO.Pipelines (14)
System.IO.Pipes (2)
System.IO.Ports (1)
System.Linq (22)
System\Linq\Select.SpeedOpt.cs (6)
164private static void Fill(ReadOnlySpan<TSource> source, Span<TResult> destination, Func<TSource, TResult> func)
307private static void Fill(Span<TResult> results, T start, Func<T, TResult> func)
420private static void Fill(ReadOnlySpan<TSource> source, Span<TResult> destination, Func<TSource, TResult> func)
538private static void Fill(IList<TSource> source, Span<TResult> results, Func<TSource, TResult> func)
806private static void Fill(Iterator<TSource> source, Span<TResult> results, Func<TSource, TResult> func)
981private static void Fill(IList<TSource> source, Span<TResult> destination, Func<TSource, TResult> func, int sourceIndex)
System.Linq.AsyncEnumerable (2)
System.Linq.Expressions (1)
System.Memory (34)
System\Buffers\SequenceReaderExtensions.Binary.cs (7)
43Span<byte> tempSpan = new Span<byte>(&buffer, sizeof(T));
185Span<byte> tmpSpan = [0, 0];
207Span<byte> tmpSpan = [0, 0];
229Span<byte> tmpSpan = [0, 0, 0, 0];
251Span<byte> tmpSpan = [0, 0, 0, 0];
273Span<byte> tmpSpan = [0, 0, 0, 0, 0, 0, 0, 0];
295Span<byte> tmpSpan = [0, 0, 0, 0, 0, 0, 0, 0];
System.Net.Http (113)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackEncoder.cs (22)
25public static bool EncodeIndexedHeaderField(int index, Span<byte> destination, out int bytesWritten)
45public static bool EncodeStatusHeader(int statusCode, Span<byte> destination, out int bytesWritten)
77public static bool EncodeLiteralHeaderFieldWithoutIndexing(int index, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
109public static bool EncodeLiteralHeaderFieldNeverIndexing(int index, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
141public static bool EncodeLiteralHeaderFieldIndexing(int index, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
176public static bool EncodeLiteralHeaderFieldWithoutIndexing(int index, Span<byte> destination, out int bytesWritten)
208public static bool EncodeLiteralHeaderFieldIndexingNewName(string name, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
229public static bool EncodeLiteralHeaderFieldWithoutIndexingNewName(string name, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
250public static bool EncodeLiteralHeaderFieldNeverIndexingNewName(string name, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
270private static bool EncodeLiteralHeaderNewNameCore(byte mask, string name, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
288public static bool EncodeLiteralHeaderFieldWithoutIndexingNewName(string name, ReadOnlySpan<string> values, byte[] separator, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
324public static bool EncodeLiteralHeaderFieldWithoutIndexingNewName(string name, Span<byte> destination, out int bytesWritten)
358private static bool EncodeLiteralHeaderName(string value, Span<byte> destination, out int bytesWritten)
395private static void EncodeValueStringPart(string value, Span<byte> destination)
410public static bool EncodeStringLiteral(ReadOnlySpan<byte> value, Span<byte> destination, out int bytesWritten)
444public static bool EncodeStringLiteral(string value, Span<byte> destination, out int bytesWritten)
449public static bool EncodeStringLiteral(string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
494public static bool EncodeDynamicTableSizeUpdate(int value, Span<byte> destination, out int bytesWritten)
513public static bool EncodeStringLiterals(ReadOnlySpan<string> values, byte[]? separator, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
601Span<byte> span = stackalloc byte[256];
613Span<byte> span = stackalloc byte[256];
622Span<byte> span =
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackEncoder.cs (18)
23public static bool EncodeStaticIndexedHeaderField(int index, Span<byte> destination, out int bytesWritten)
39Span<byte> buffer = stackalloc byte[IntegerEncoder.MaxInt32EncodedLength];
61public static bool EncodeLiteralHeaderFieldWithStaticNameReference(int index, string value, Span<byte> destination, out int bytesWritten)
66public static bool EncodeLiteralHeaderFieldWithStaticNameReference(int index, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
89/// Encodes just the name part of a Literal Header Field With Static Name Reference. Must call <see cref="EncodeValueString(string, Encoding?, Span{byte}, out int)"/> after to encode the header's value.
93Span<byte> temp = stackalloc byte[IntegerEncoder.MaxInt32EncodedLength];
104Span<byte> temp = value.Length < 256 ? stackalloc byte[256 + IntegerEncoder.MaxInt32EncodedLength * 2] : new byte[value.Length + IntegerEncoder.MaxInt32EncodedLength * 2];
125public static bool EncodeLiteralHeaderFieldWithoutNameReference(string name, string value, Span<byte> destination, out int bytesWritten)
130public static bool EncodeLiteralHeaderFieldWithoutNameReference(string name, string value, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
147public static bool EncodeLiteralHeaderFieldWithoutNameReference(string name, ReadOnlySpan<string> values, byte[] separator, Encoding? valueEncoding, Span<byte> destination, out int bytesWritten)
160/// Encodes just the value part of a Literawl Header Field Without Static Name Reference. Must call <see cref="EncodeValueString(string, Encoding?, Span{byte}, out int)"/> after to encode the header's value.
164Span<byte> temp = name.Length < 256 ? stackalloc byte[256 + IntegerEncoder.MaxInt32EncodedLength] : new byte[name.Length + IntegerEncoder.MaxInt32EncodedLength];
174Span<byte> temp = (name.Length + value.Length) < 256 ? stackalloc byte[256 + IntegerEncoder.MaxInt32EncodedLength * 2] : new byte[name.Length + value.Length + IntegerEncoder.MaxInt32EncodedLength * 2];
182private static bool EncodeValueString(string s, Encoding? valueEncoding, Span<byte> buffer, out int length)
220public static bool EncodeValueString(ReadOnlySpan<string> values, byte[]? separator, Encoding? valueEncoding, Span<byte> buffer, out int length)
301private static void EncodeValueStringPart(string s, Span<byte> buffer)
316private static bool EncodeNameString(string s, Span<byte> buffer, out int length)
355private static bool EncodeHeaderBlockPrefix(Span<byte> destination, out int bytesWritten)
System.Net.Http.WinHttpHandler (3)
System.Net.HttpListener (9)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Net.Mail (31)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Net.NameResolution (31)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (9)
73public static unsafe void SetAddressFamily(Span<byte> buffer, AddressFamily family)
101public static unsafe void SetPort(Span<byte> buffer, ushort port)
125public static unsafe void GetIPv6Address(ReadOnlySpan<byte> buffer, Span<byte> address, out uint scope)
139public static unsafe void SetIPv4Address(Span<byte> buffer, uint address)
150public static unsafe void SetIPv4Address(Span<byte> buffer, byte* address)
156public static unsafe void SetIPv6Address(Span<byte> buffer, Span<byte> address, uint scope)
165public static unsafe void SetIPv6Address(Span<byte> buffer, byte* address, int addressLength, uint scope)
176public static void Clear(Span<byte> buffer)
System.Net.NetworkInformation (11)
System.Net.Ping (17)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (9)
73public static unsafe void SetAddressFamily(Span<byte> buffer, AddressFamily family)
101public static unsafe void SetPort(Span<byte> buffer, ushort port)
125public static unsafe void GetIPv6Address(ReadOnlySpan<byte> buffer, Span<byte> address, out uint scope)
139public static unsafe void SetIPv4Address(Span<byte> buffer, uint address)
150public static unsafe void SetIPv4Address(Span<byte> buffer, byte* address)
156public static unsafe void SetIPv6Address(Span<byte> buffer, Span<byte> address, uint scope)
165public static unsafe void SetIPv6Address(Span<byte> buffer, byte* address, int addressLength, uint scope)
176public static void Clear(Span<byte> buffer)
System.Net.Primitives (54)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (9)
73public static unsafe void SetAddressFamily(Span<byte> buffer, AddressFamily family)
101public static unsafe void SetPort(Span<byte> buffer, ushort port)
125public static unsafe void GetIPv6Address(ReadOnlySpan<byte> buffer, Span<byte> address, out uint scope)
139public static unsafe void SetIPv4Address(Span<byte> buffer, uint address)
150public static unsafe void SetIPv4Address(Span<byte> buffer, byte* address)
156public static unsafe void SetIPv6Address(Span<byte> buffer, Span<byte> address, uint scope)
165public static unsafe void SetIPv6Address(Span<byte> buffer, byte* address, int addressLength, uint scope)
176public static void Clear(Span<byte> buffer)
System\Net\IPAddress.cs (10)
322public bool TryWriteBytes(Span<byte> destination, out int bytesWritten)
351private void WriteIPv6Bytes(Span<byte> destination)
379private void WriteIPv4Bytes(Span<byte> destination)
465Span<char> span = stackalloc char[IPAddressParser.MaxIPv6StringLength];
480public bool TryFormat(Span<char> destination, out int charsWritten) =>
487public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten) =>
491bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
496bool IUtf8SpanFormattable.TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
500private unsafe bool TryFormatCore<TChar>(Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IBinaryInteger<TChar>
519Span<TChar> tmpDestination = stackalloc TChar[IPAddressParser.MaxIPv6StringLength];
System\Net\IPAddressParser.cs (7)
42Span<ushort> numbers = stackalloc ushort[IPAddressParserStatics.IPv6AddressShorts];
80private static bool TryParseIPv6<TChar>(ReadOnlySpan<TChar> ipSpan, Span<ushort> numbers, int numbersLength, out uint scope)
136internal static int FormatIPv4Address<TChar>(uint address, Span<TChar> addressString)
152static int FormatByte(uint number, Span<TChar> addressString)
181internal static int FormatIPv6Address<TChar>(ushort[] address, uint scopeId, Span<TChar> destination)
225static void AppendSections(ReadOnlySpan<ushort> address, Span<TChar> destination, ref int offset)
264static void AppendHex(ushort value, Span<TChar> destination, ref int offset)
System.Net.Quic (56)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (9)
73public static unsafe void SetAddressFamily(Span<byte> buffer, AddressFamily family)
101public static unsafe void SetPort(Span<byte> buffer, ushort port)
125public static unsafe void GetIPv6Address(ReadOnlySpan<byte> buffer, Span<byte> address, out uint scope)
139public static unsafe void SetIPv4Address(Span<byte> buffer, uint address)
150public static unsafe void SetIPv4Address(Span<byte> buffer, byte* address)
156public static unsafe void SetIPv6Address(Span<byte> buffer, Span<byte> address, uint scope)
165public static unsafe void SetIPv6Address(Span<byte> buffer, byte* address, int addressLength, uint scope)
176public static void Clear(Span<byte> buffer)
System.Net.Requests (3)
System.Net.Security (126)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (3)
1297private static partial int BioRead(global::Microsoft.Win32.SafeHandles.SafeBioHandle b, global::System.Span<byte> data, int len)
2902private static unsafe partial int GetDefaultSignatureAlgorithms(global::System.Span<ushort> algorithms, ref int algorithmCount)
4841internal static unsafe partial int SslCtxSetCaching(global::Microsoft.Win32.SafeHandles.SafeSslContextHandle ctx, int mode, int cacheSize, int contextIdLength, global::System.Span<byte> contextId, delegate* unmanaged<nint, nint, int> neewSessionCallback, delegate* unmanaged<nint, nint, void> removeSessionCallback)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (1)
43internal static unsafe partial int SslCtxSetCaching(SafeSslContextHandle ctx, int mode, int cacheSize, int contextIdLength, Span<byte> contextId, delegate* unmanaged<IntPtr, IntPtr, int> neewSessionCallback, delegate* unmanaged<IntPtr, IntPtr, void> removeSessionCallback);
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
src\runtime\src\libraries\Common\src\System\Net\Security\MD4.cs (13)
63internal static unsafe void HashData(ReadOnlySpan<byte> source, Span<byte> destination)
67Span<byte> buffer = stackalloc byte[64];
71Span<uint> state = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476];
72Span<uint> count = [0, 0];
77Span<byte> bits = stackalloc byte[8];
84Span<byte> padding = stackalloc byte[padLen];
96private static void HashCore(ReadOnlySpan<byte> input, Span<uint> state, Span<uint> count, Span<byte> buffer)
173private static void Encode(Span<byte> output, ReadOnlySpan<uint> input)
181private static void Decode(Span<uint> output, ReadOnlySpan<byte> input)
189private static unsafe void MD4Transform(Span<uint> state, ReadOnlySpan<byte> block)
195Span<uint> x = stackalloc uint[16];
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (27)
362private static unsafe void CreateNtlmNegotiateMessage(Span<byte> asBytes, Flags requiredFlags)
401private static void AddToPayload(ref MessageField field, ReadOnlySpan<byte> data, Span<byte> payload, ref int offset)
408private static void AddToPayload(ref MessageField field, ReadOnlySpan<char> data, Span<byte> payload, ref int offset)
419private static unsafe void makeNtlm2Hash(string domain, string userName, ReadOnlySpan<char> password, Span<byte> hash)
428Span<byte> pwHash = stackalloc byte[DigestLength];
429Span<byte> pwBytes = stackalloc byte[Encoding.Unicode.GetByteCount(password)];
452private static unsafe void makeNtlm2ChallengeResponse(DateTime time, ReadOnlySpan<byte> ntlm2hash, ReadOnlySpan<byte> serverChallenge, Span<byte> clientChallenge, ReadOnlySpan<byte> serverInfo, ref MessageField field, Span<byte> payload, ref int payloadOffset)
458Span<byte> blob = payload.Slice(payloadOffset, sizeof(NtChallengeResponse) + serverInfo.Length);
465clientChallenge.CopyTo((Span<byte>)temp.ClientChallenge);
483private unsafe void WriteChannelBindingHash(Span<byte> hashBuffer)
494Span<byte> prefix = stackalloc byte[sizeof(uint) * 5];
696Span<byte> responseAsSpan = new Span<byte>(responseBytes);
700Span<byte> payload = responseAsSpan;
711Span<byte> ntlm2hash = stackalloc byte[DigestLength];
715Span<byte> clientChallenge = stackalloc byte[ChallengeLength];
733Span<byte> exportedSessionKey = stackalloc byte[16];
740Span<byte> sessionBaseKey = stackalloc byte[HMACMD5.HashSizeInBytes];
747Span<byte> encryptedRandomSessionKey = payload.Slice(payloadOffset, 16);
760hmacMic.GetHashAndReset((Span<byte>)response.Mic);
794Span<byte> signature)
802Span<byte> hmacResult = stackalloc byte[hmac.HashLengthInBytes];
819Span<byte> expectedSignature = stackalloc byte[SignatureLength];
832Span<byte> signatureBuffer = signature.GetSpan(SignatureLength);
845Span<byte> output = outputWriter.GetSpan(input.Length + SignatureLength);
870Span<byte> output = outputWriter.GetSpan(input.Length - SignatureLength);
883public override NegotiateAuthenticationStatusCode UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
System\Net\Security\TlsBufferSession.cs (6)
36public TlsOperationStatus Handshake(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten)
47public TlsOperationStatus Write(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten)
58public TlsOperationStatus Read(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten)
66public TlsOperationStatus Shutdown(Span<byte> destination, out int bytesWritten)
74public TlsOperationStatus DrainPendingOutput(Span<byte> destination, out int bytesWritten)
89public TlsOperationStatus RequestClientCertificate(Span<byte> destination, out int bytesWritten)
System\Net\Security\TlsSession.cs (13)
607public bool TryGetClientHelloBytes(Span<byte> destination, out int bytesWritten)
856Span<byte> output,
1211Span<byte> ciphertext,
1281Span<byte> plaintext,
1399private TlsOperationStatus TryDrainBufferedPlaintext(Span<byte> plaintext, out int bytesWritten)
1410Span<byte>.Empty,
1476private protected TlsOperationStatus RequestClientCertificateBufferedCore(Span<byte> ciphertext, out int bytesWritten)
1588private protected TlsOperationStatus ShutdownBufferedCore(Span<byte> ciphertext, out int bytesWritten)
1654private protected TlsOperationStatus DrainPendingOutputCore(Span<byte> ciphertext, out int bytesWritten)
1675private int DrainTo(Span<byte> output)
2216private protected TlsOperationStatus ReadSocketCore(Span<byte> buffer, out int bytesRead)
2406private TlsOperationStatus DriveBufferedOpOverSocket(Func<Span<byte>, (TlsOperationStatus status, int written)> op)
2495partial void TryFastRead(Span<byte> buffer, ref int bytesRead, ref TlsOperationStatus? result);
System.Net.ServerSentEvents (7)
System.Net.Sockets (81)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (4)
166internal static unsafe partial global::Interop.Error Connectx(global::System.Runtime.InteropServices.SafeHandle socket, byte* socketAddress, int socketAddressLen, global::System.Span<byte> buffer, int bufferLen, int enableTfo, int* sent)
1515internal static unsafe partial global::Interop.Error Select(global::System.Span<int> readFDs, int readFDsLength, global::System.Span<int> writeFDs, int writeFDsLength, global::System.Span<int> checkError, int checkErrorLength, int timeout, int maxFd, out int triggered)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (9)
73public static unsafe void SetAddressFamily(Span<byte> buffer, AddressFamily family)
101public static unsafe void SetPort(Span<byte> buffer, ushort port)
125public static unsafe void GetIPv6Address(ReadOnlySpan<byte> buffer, Span<byte> address, out uint scope)
139public static unsafe void SetIPv4Address(Span<byte> buffer, uint address)
150public static unsafe void SetIPv4Address(Span<byte> buffer, byte* address)
156public static unsafe void SetIPv6Address(Span<byte> buffer, Span<byte> address, uint scope)
165public static unsafe void SetIPv6Address(Span<byte> buffer, byte* address, int addressLength, uint scope)
176public static void Clear(Span<byte> buffer)
System\Net\Sockets\Socket.cs (15)
142Span<byte> buffer = stackalloc byte[SocketPal.MaximumAddressSize];
170Span<byte> address = stackalloc byte[IPAddressParserStatics.IPv6AddressBytes];
204Span<byte> address = stackalloc byte[IPAddressParserStatics.IPv6AddressBytes];
314Span<byte> buffer = stackalloc byte[SocketAddress.GetMaximumAddressSize(_addressFamily)];
362Span<byte> buffer = stackalloc byte[SocketAddress.GetMaximumAddressSize(_addressFamily)];
1579public int Receive(Span<byte> buffer) => Receive(buffer, SocketFlags.None);
1581public int Receive(Span<byte> buffer, SocketFlags socketFlags)
1591public int Receive(Span<byte> buffer, SocketFlags socketFlags, out SocketError errorCode)
1734/// An <see cref="Span{T}"/> of type <see cref="byte"/> that is the storage location for received data.
1751/// <see cref="Socket.ReceiveMessageFrom(Span{byte}, ref SocketFlags, ref EndPoint, out IPPacketInformation)"/>
1756public int ReceiveMessageFrom(Span<byte> buffer, ref SocketFlags socketFlags, ref EndPoint remoteEP, out IPPacketInformation ipPacketInformation)
1929public int ReceiveFrom(Span<byte> buffer, ref EndPoint remoteEP)
1944public int ReceiveFrom(Span<byte> buffer, SocketFlags socketFlags, ref EndPoint remoteEP)
2027public int ReceiveFrom(Span<byte> buffer, SocketFlags socketFlags, SocketAddress receivedAddress)
2301public int GetRawSocketOption(int optionLevel, int optionName, Span<byte> optionValue)
System\Net\Sockets\SocketAsyncContext.Unix.cs (4)
325bool completed = SocketPal.TryCompleteReceiveFrom(context._socket, default(Span<byte>), Buffers, Flags, SocketAddress.Span, out int socketAddressLen, out BytesTransferred, out ReceivedFlags, out ErrorCode);
827public SocketError Receive(Span<byte> buffer, SocketFlags flags, int timeout, out int bytesReceived)
870public unsafe SocketError ReceiveFrom(Span<byte> buffer, ref SocketFlags flags, Memory<byte> socketAddress, out int socketAddressLen, int timeout, out int bytesReceived)
1094Span<byte> buffer, ref SocketFlags flags, Memory<byte> socketAddress, out int socketAddressLen, bool isIPv4, bool isIPv6, int timeout, out IPPacketInformation ipPacketInformation, out int bytesReceived)
System\Net\Sockets\SocketPal.Unix.cs (36)
105private static unsafe int SysRead(SafeSocketHandle handle, Span<byte> buffer, out Interop.Error errno)
120private static unsafe int SysReceive(SafeSocketHandle socket, SocketFlags flags, Span<byte> buffer, out Interop.Error errno)
144private static unsafe int SysReceive(SafeSocketHandle socket, SocketFlags flags, Span<byte> buffer, Span<byte> socketAddress, out int socketAddressLen, out SocketFlags receivedFlags, out Interop.Error errno)
299Span<GCHandle> handles = allocOnStack ? stackalloc GCHandle[IovStackThreshold] : new GCHandle[maxBuffers];
300Span<Interop.Sys.IOVector> iovecs = allocOnStack ? stackalloc Interop.Sys.IOVector[IovStackThreshold] : new Interop.Sys.IOVector[maxBuffers];
380private static unsafe int SysReceive(SafeSocketHandle socket, SocketFlags flags, IList<ArraySegment<byte>> buffers, Span<byte> socketAddress, out int socketAddressLen, out SocketFlags receivedFlags, out Interop.Error errno)
411Span<GCHandle> handles = allocOnStack ? stackalloc GCHandle[IovStackThreshold] : new GCHandle[maxBuffers];
412Span<Interop.Sys.IOVector> iovecs = allocOnStack ? stackalloc Interop.Sys.IOVector[IovStackThreshold] : new Interop.Sys.IOVector[maxBuffers];
483private static unsafe int SysReceiveMessageFrom(SafeSocketHandle socket, SocketFlags flags, Span<byte> buffer, Span<byte> socketAddress, out int socketAddressLen, bool isIPv4, bool isIPv6, out SocketFlags receivedFlags, out IPPacketInformation ipPacketInformation, out Interop.Error errno)
540Span<byte> socketAddress, out int socketAddressLen, bool isIPv4, bool isIPv6,
553Span<GCHandle> handles = allocOnStack ? stackalloc GCHandle[IovStackThreshold] : new GCHandle[buffersCount];
554Span<Interop.Sys.IOVector> iovecs = allocOnStack ? stackalloc Interop.Sys.IOVector[IovStackThreshold] : new Interop.Sys.IOVector[buffersCount];
669public static bool TryStartConnect(SafeSocketHandle socket, Memory<byte> socketAddress, out SocketError errorCode) => TryStartConnect(socket, socketAddress, out errorCode, Span<byte>.Empty, false, out int _ );
671public static unsafe bool TryStartConnect(SafeSocketHandle socket, Memory<byte> socketAddress, out SocketError errorCode, Span<byte> data, bool tfo, out int sent)
767public static bool TryCompleteReceiveFrom(SafeSocketHandle socket, Span<byte> buffer, SocketFlags flags, Span<byte> socketAddress, out int socketAddressLen, out int bytesReceived, out SocketFlags receivedFlags, out SocketError errorCode) =>
770public static bool TryCompleteReceiveFrom(SafeSocketHandle socket, IList<ArraySegment<byte>> buffers, SocketFlags flags, Span<byte> socketAddress, out int socketAddressLen, out int bytesReceived, out SocketFlags receivedFlags, out SocketError errorCode) =>
771TryCompleteReceiveFrom(socket, default(Span<byte>), buffers, flags, socketAddress, out socketAddressLen, out bytesReceived, out receivedFlags, out errorCode);
793public static unsafe bool TryCompleteReceive(SafeSocketHandle socket, Span<byte> buffer, SocketFlags flags, out int bytesReceived, out SocketError errorCode)
858public static unsafe bool TryCompleteReceiveFrom(SafeSocketHandle socket, Span<byte> buffer, IList<ArraySegment<byte>>? buffers, SocketFlags flags, Span<byte> socketAddress, out int receivedSocketAddressLength, out int bytesReceived, out SocketFlags receivedFlags, out SocketError errorCode)
937public static bool TryCompleteReceiveMessageFrom(SafeSocketHandle socket, Span<byte> buffer, IList<ArraySegment<byte>>? buffers, SocketFlags flags, Memory<byte> socketAddress, out int receivedSocketAddressLength, bool isIPv4, bool isIPv6, out int bytesReceived, out SocketFlags receivedFlags, out IPPacketInformation ipPacketInformation, out SocketError errorCode)
983public static bool TryCompleteSendTo(SafeSocketHandle socket, Span<byte> buffer, ref int offset, ref int count, SocketFlags flags, ReadOnlySpan<byte> socketAddress, ref int bytesSent, out SocketError errorCode)
1141public static unsafe SocketError GetPeerName(SafeSocketHandle handle, Span<byte> buffer, ref int nameLen)
1305if (!TryCompleteReceiveFrom(handle, buffers, socketFlags, Span<byte>.Empty, out int _, out bytesTransferred, out _, out errorCode))
1326public static SocketError Receive(SafeSocketHandle handle, Span<byte> buffer, SocketFlags socketFlags, out int bytesTransferred)
1364public static SocketError ReceiveMessageFrom(Socket socket, SafeSocketHandle handle, Span<byte> buffer, ref SocketFlags socketFlags, SocketAddress socketAddress, out SocketAddress receiveAddress, out IPPacketInformation ipPacketInformation, out int bytesTransferred)
1401public static SocketError ReceiveFrom(SafeSocketHandle handle, Span<byte> buffer, SocketFlags socketFlags, Memory<byte> socketAddress, out int socketAddressLen, out int bytesTransferred)
1718public static unsafe SocketError GetRawSockOpt(SafeSocketHandle handle, int optionLevel, int optionName, Span<byte> optionValue, ref int optionLength)
1872Span<int> readFDs = checkRead?.Count > MaxStackAllocCount ? new int[checkRead.Count] : stackalloc int[checkRead?.Count ?? 0];
1873Span<int> writeFDs = checkWrite?.Count > MaxStackAllocCount ? new int[checkWrite.Count] : stackalloc int[checkWrite?.Count ?? 0];
1874Span<int> errorFDs = checkError?.Count > MaxStackAllocCount ? new int[checkError.Count] : stackalloc int[checkError?.Count ?? 0];
1921private static void AddDesriptors(Span<int> buffer, IList? socketList, ref int refsAdded, ref int maxFd)
1950private static void FilterSelectList(IList? socketList, Span<int> results)
System.Net.WebProxy (1)
System.Net.WebSockets (10)
System.Net.WebSockets.Client (6)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JSImports.g.cs (6)
42global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __webSocket_native];
98global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __uri_native, __subProtocols_native, __responseStatusPtr_native];
148global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __webSocket_native];
210global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __webSocket_native, __bufferPtr_native, __bufferLength_native, __messageType_native, __endOfMessage_native];
266global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __webSocket_native, __bufferPtr_native, __bufferLength_native];
325global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __webSocket_native, __code_native, __reason_native, __waitForCloseReceived_native];
System.Numerics.Tensors (561)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.ITernaryOperator.cs (4)
43ReadOnlySpan<T> x, ReadOnlySpan<T> y, ReadOnlySpan<T> z, Span<T> destination)
1520ReadOnlySpan<T> x, ReadOnlySpan<T> y, T z, Span<T> destination)
2999ReadOnlySpan<T> x, T y, ReadOnlySpan<T> z, Span<T> destination)
3013ReadOnlySpan<T> x, T y, T z, Span<T> destination)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryInputBinaryOutput.cs (8)
48ReadOnlySpan<T> x, Span<T> destination1, Span<T> destination2)
182ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination1, Span<T> destination2)
371ReadOnlySpan<T> x, T y, Span<T> destination1, Span<T> destination2)
553T x, ReadOnlySpan<T> y, Span<T> destination1, Span<T> destination2)
System\Numerics\Tensors\netcore\Tensor_1.cs (10)
178/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.FlattenTo(Span{T})" />
179public void FlattenTo(scoped Span<T> destination)
207public Span<T> GetSpan(scoped ReadOnlySpan<nint> startIndexes, int length) => AsTensorSpan().GetSpan(startIndexes, length);
210public Span<T> GetSpan(scoped ReadOnlySpan<NIndex> startIndexes, int length) => AsTensorSpan().GetSpan(startIndexes, length);
282/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.TryFlattenTo(Span{T})" />
283public bool TryFlattenTo(scoped Span<T> destination) => AsReadOnlyTensorSpan().TryFlattenTo(destination);
285/// <inheritdoc cref="ITensor{TSelf, T}.TryGetSpan(ReadOnlySpan{nint}, int, out Span{T})" />
286public bool TryGetSpan(scoped ReadOnlySpan<nint> startIndexes, int length, out Span<T> span) => AsTensorSpan().TryGetSpan(startIndexes, length, out span);
288/// <inheritdoc cref="ITensor{TSelf, T}.TryGetSpan(ReadOnlySpan{NIndex}, int, out Span{T})" />
289public bool TryGetSpan(scoped ReadOnlySpan<NIndex> startIndexes, int length, out Span<T> span) => AsTensorSpan().TryGetSpan(startIndexes, length, out span);
System\Numerics\Tensors\netcore\Tensor.cs (52)
241scoped Span<nint> lengths = TensorOperation.RentedBuffer.CreateUninitialized(sourceLengths.Length,
317Span<NRange> ranges = TensorOperation.RentedBuffer.CreateUninitialized(targetRank, out TensorOperation.RentedBuffer<NRange> rentedBuffer);
337Span<T> dstSpan = MemoryMarshal.CreateSpan(ref target._reference, (int)destinationLength);
433private static void ConcatenateOnDimensionToSpan<T>(int dimension, scoped ReadOnlySpan<Tensor<T>> tensors, in TensorSpan<T> destination, Span<T> dstSpan)
446Span<NRange> ranges = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<NRange> rentedBuffer);
544Span<T> span = MemoryMarshal.CreateSpan(ref destination._reference, (int)flattenedLength);
565Span<T> span = MemoryMarshal.CreateSpan(ref slice._reference, (int)slice.FlattenedLength);
608Span<T> span = MemoryMarshal.CreateSpan(ref destination._reference, (int)flattenedLength);
626Span<T> span = MemoryMarshal.CreateSpan(ref slice._reference, (int)slice.FlattenedLength);
1549scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
1550scoped Span<nint> newStrides = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
1561scoped Span<ulong> seen = TensorOperation.RentedBuffer.CreateUninitialized(
1595private static void GetReshapeLengths(ReadOnlySpan<nint> lengths, nint flattenedLength, Span<nint> result)
1647bool isDense, ReadOnlySpan<nint> lengths, Span<nint> strides)
1712scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(lengths.Length, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
1714scoped Span<nint> strides = TensorOperation.RentedBuffer.CreateUninitialized(tensor.IsDense ? 0 : newLengths.Length, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
1744scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(lengths.Length, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
1746scoped Span<nint> strides = TensorOperation.RentedBuffer.CreateUninitialized(shape.IsDense ? 0 : newLengths.Length, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
1776scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(lengths.Length, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
1778scoped Span<nint> strides = TensorOperation.RentedBuffer.CreateUninitialized(shape.IsDense ? 0 : newLengths.Length, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
1804Span<T> ospan = MemoryMarshal.CreateSpan(ref output.AsTensorSpan()._reference, (int)output.FlattenedLength);
1817Span<T> ospan = MemoryMarshal.CreateSpan(ref output.AsTensorSpan()._reference, (int)output.FlattenedLength);
1878Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destinationLength);
2128Span<T> buffer = array.AsSpan(0, count);
2136Span<T> first = TensorOperation.AsDenseSpan(tensor, block + left, length);
2137Span<T> second = TensorOperation.AsDenseSpan(tensor, block + axisLength - left - length, length);
2163private static void SwapDenseSpans<T>(Span<T> first, Span<T> second, Span<T> buffer)
2179Span<T> target = TensorOperation.AsDenseSpan(destination, offset, count);
2203Span<NRange> srcIndexes = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<NRange> srcIndexesRentedBuffer);
2204Span<NRange> dstIndexes = TensorOperation.RentedBuffer.CreateUninitialized(destinationRank, out TensorOperation.RentedBuffer<NRange> dstIndexesRentedBuffer);
2236Span<T> span = TensorOperation.AsDenseSpan(destination, offset, count);
2423scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
2428scoped Span<NRange> sliceDims = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<NRange> sliceDimsRentedBuffer);
2480scoped Span<nint> lengths = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
2481scoped Span<nint> strides = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
2559scoped Span<nint> lengths = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
2560scoped Span<nint> strides = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
2638scoped Span<nint> lengths = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
2639scoped Span<nint> strides = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
2710Span<nint> lengths = TensorOperation.RentedBuffer.CreateUninitialized(rank + 1,
2743Span<nint> lengths = TensorOperation.RentedBuffer.CreateUninitialized(rank + 1,
2803Span<NRange> ranges = TensorOperation.RentedBuffer.CreateUninitialized(target.Rank,
2978scoped Span<nint> lengths = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
2979scoped Span<nint> strides = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
3068scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(rank + 1, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
3074Span<nint> newStrides = TensorOperation.RentedBuffer.CreateUninitialized(rank + 1, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
3113scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(rank + 1, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
3119Span<nint> newStrides = TensorOperation.RentedBuffer.CreateUninitialized(rank + 1, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
3158scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(rank + 1, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
3164Span<nint> newStrides = TensorOperation.RentedBuffer.CreateUninitialized(rank + 1, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
System\Numerics\Tensors\netcore\TensorOperation.cs (184)
65internal static Span<T> AsDenseSpan<T>(in TensorSpan<T> destination)
68internal static Span<T> AsDenseSpan<T>(in TensorSpan<T> destination, nint offset, int length)
196Span<T> target = destination.IsDense
292Span<T> target = destination.IsDense
325Span<T> target = destination.IsDense
411scoped Span<nint> strides = RentedBuffer.CreateUninitialized(destinationRank, out RentedBuffer<nint> rentedBuffer);
554scoped Span<nint> indexes = RentedBuffer.Create(x.Rank, x.Strides, out nint linearOffset, out RentedBuffer<nint> rentedBuffer);
562Span<T> chunk = buffer.AsSpan(0, length);
634scoped Span<nint> indexes = RentedBuffer.Create(x.Rank, x.Strides, out nint linearOffset, out RentedBuffer<nint> rentedBuffer);
719scoped Span<nint> xIndexes = RentedBuffer.Create(destinationShape.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
720scoped Span<nint> yIndexes = RentedBuffer.Create(destinationShape.Rank, y.Strides, out nint yLinearOffset, out RentedBuffer<nint> yRentedBuffer);
758scoped Span<nint> lengths = RentedBuffer.CreateUninitialized(rank, out RentedBuffer<nint> rentedBuffer);
831scoped Span<nint> xIndexes = RentedBuffer.Create(x.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
885scoped Span<nint> indexes = RentedBuffer.Create(destination.Rank, destination.Strides, out nint linearOffset, out RentedBuffer<nint> rentedBuffer);
970scoped Span<nint> xIndexes = RentedBuffer.Create(destinationRank, source.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
971scoped Span<nint> destinationIndexes = RentedBuffer.Create(destinationRank, destination.Strides, out nint destinationLinearOffset, out RentedBuffer<nint> destinationRentedBuffer);
994scoped Span<nint> xIndexes = RentedBuffer.Create(destinationRank, source.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
995scoped Span<nint> destinationIndexes = RentedBuffer.Create(destinationRank, destination.Strides, out nint negInnermostStride, out RentedBuffer<nint> destinationRentedBuffer);
1020public static void Invoke<TOperation, TArg, TResult>(in ReadOnlyTensorSpan<TArg> x, in Span<TResult> destination)
1023Span<TResult> result = destination[..checked((int)x.FlattenedLength)];
1059scoped Span<nint> xIndexes = RentedBuffer.Create(x.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
1107scoped Span<nint> xIndexes = RentedBuffer.Create(x.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
1195scoped Span<nint> xIndexes = RentedBuffer.Create(destinationRank, left.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
1196scoped Span<nint> yIndexes = RentedBuffer.Create(destinationRank, right.Strides, out nint yLinearOffset, out RentedBuffer<nint> yRentedBuffer);
1197scoped Span<nint> destinationIndexes = RentedBuffer.Create(destinationRank, destination.Strides, out nint destinationLinearOffset, out RentedBuffer<nint> destinationRentedBuffer);
1261scoped Span<nint> xIndexes = RentedBuffer.Create(destinationShape.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
1262scoped Span<nint> yIndexes = RentedBuffer.Create(destinationShape.Rank, y.Strides, out nint yLinearOffset, out RentedBuffer<nint> yRentedBuffer);
1327scoped Span<nint> xIndexes = RentedBuffer.Create(destinationRank, source.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
1328scoped Span<nint> destinationIndexes = RentedBuffer.Create(destinationRank, destination.Strides, out nint destinationLinearOffset, out RentedBuffer<nint> destinationRentedBuffer);
1384scoped Span<nint> xIndexes = RentedBuffer.Create(destinationRank, source.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
1385scoped Span<nint> destinationIndexes = RentedBuffer.Create(destinationRank, destination.Strides, out nint destinationLinearOffset, out RentedBuffer<nint> destinationRentedBuffer);
1433scoped Span<nint> xIndexes = RentedBuffer.Create(x.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
1501scoped Span<nint> resultLengths = RentedBuffer.CreateUninitialized(maxRank, out RentedBuffer<nint> resultLengthsRentedBuffer);
1531public static void Invoke(Span<T> destination)
1545public static void Invoke(ReadOnlySpan<T> source, Span<T> destination)
1566public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
1574public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
1603public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
1621public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
1650public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1665public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1680public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1695public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1711public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1721public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1736public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1751public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1766public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1781public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1798public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1811public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1821public static void Invoke(T x, ReadOnlySpan<T> y, Span<T> destination)
1841public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1854public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1864public static void Invoke(T x, ReadOnlySpan<T> y, Span<T> destination)
1882public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1897public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1913public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1923public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1939public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1949public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1964public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1979public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1995public static void Invoke(ReadOnlySpan<TFrom> x, Span<TTo> destination)
2011public static void Invoke(ReadOnlySpan<TFrom> x, Span<TTo> destination)
2027public static void Invoke(ReadOnlySpan<TFrom> x, Span<TTo> destination)
2043public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2053public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2068public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2083public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2102public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<(T, T, T)> destination)
2119public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2135public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2150public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2167public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2177public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2186public static void Invoke(T x, ReadOnlySpan<T> y, Span<T> destination)
2201public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2216public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2231public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2246public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2261public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2276public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2291public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2306public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2321public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2338public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2348public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2357public static void Invoke(T x, ReadOnlySpan<T> y, Span<T> destination)
2372public static void Invoke(ReadOnlySpan<T> x, Span<int> destination)
2388public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2403public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2420public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2430public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2440public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2455public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2470public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2485public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2500public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2515public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2542public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2552public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2579public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2589public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2616public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2626public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2653public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2663public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2690public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2700public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2727public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2737public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2764public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2774public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2801public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2811public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2827public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2837public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2852public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2867public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2882public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2899public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2909public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2919public static void Invoke(T x, ReadOnlySpan<T> y, Span<T> destination)
2949public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2964public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2979public static void Invoke(ReadOnlySpan<T> x, int y, Span<T> destination)
2993public static void Invoke(ReadOnlySpan<T> x, int y, Span<T> destination)
3007public static void Invoke(ReadOnlySpan<T> x, int y, Span<T> destination)
3023public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
3033public static void Invoke(ReadOnlySpan<T> x, Tuple<int, MidpointRounding> y, Span<T> destination)
3048public static void Invoke(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination)
3063public static void Invoke(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination)
3078public static void Invoke(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination)
3093public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
3108public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
3123public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
3138public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
3206public static void Invoke(ReadOnlySpan<T> x, (T Shift, T Sum) y, Span<T> destination)
3224public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
3241public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
3251public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
3261public static void Invoke(T x, ReadOnlySpan<T> y, Span<T> destination)
3291public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
3304public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
3323public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
3357public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
3372public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
3387public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
3402public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
3417public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
3433public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
3443public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
3459public static void Invoke(Span<T> destination, T value)
3476public static void Invoke(ReadOnlySpan<bool> x, ReadOnlySpan<T> y, Span<T> destination)
3495public static void Invoke(ReadOnlySpan<bool> x, T y, Span<T> destination)
3522public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
3530public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
3559public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
3577public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
3611public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
3619public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
3648public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
3666public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
3700public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
3708public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
3737public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
3755public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
3789public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
3797public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
3826public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
3844public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
3876static abstract void Invoke(ReadOnlySpan<T1> x, T2 y, Span<TResult> destination);
3882static abstract void Invoke(T1 x, ReadOnlySpan<T2> y, Span<TResult> destination);
3888static abstract void Invoke(ReadOnlySpan<T1> x, ReadOnlySpan<T2> y, Span<TResult> destination);
3899static abstract void Invoke(Span<T> destination);
3905static abstract void Invoke(Span<TResult> destination, T x);
3911static abstract void Invoke(ReadOnlySpan<T> x, Span<TResult> destination);
3922public static Span<T> Create<T>(int rank, ReadOnlySpan<nint> strides, out nint linearOffset, [UnscopedRef] out RentedBuffer<T> rentedBuffer)
3925Span<T> output = RentedBuffer<T>.Create(rank, out rentedBuffer);
3935public static Span<T> CreateUninitialized<T>(int rank, [UnscopedRef] out RentedBuffer<T> rentedBuffer)
3944public static Span<T> Create(int rank, [UnscopedRef] out RentedBuffer<T> rentedBuffer)
3951Span<T> resultBuffer = rentedBuffer._array.AsSpan(0, rank);
3960return ((Span<T>)rentedBuffer._inline)[..rank];
System\Numerics\Tensors\netcore\TensorPrimitives.Clamp.cs (7)
30public static void Clamp<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> min, ReadOnlySpan<T> max, Span<T> destination)
59public static void Clamp<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> min, T max, Span<T> destination)
88public static void Clamp<T>(ReadOnlySpan<T> x, T min, ReadOnlySpan<T> max, Span<T> destination)
117public static void Clamp<T>(T x, ReadOnlySpan<T> min, ReadOnlySpan<T> max, Span<T> destination)
144public static void Clamp<T>(ReadOnlySpan<T> x, T min, T max, Span<T> destination)
171public static void Clamp<T>(T x, ReadOnlySpan<T> min, T max, Span<T> destination)
198public static void Clamp<T>(T x, T min, ReadOnlySpan<T> max, Span<T> destination)
System\Numerics\Tensors\netcore\TensorPrimitives.Half.cs (15)
27public static void ConvertToHalf(ReadOnlySpan<float> source, Span<Half> destination) =>
45public static void ConvertToSingle(ReadOnlySpan<Half> source, Span<float> destination) =>
49private static bool TryUnaryInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, Span<T> destination)
66private static bool TryUnaryBitwiseInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, Span<T> destination)
83private static bool TryBinaryInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
101private static bool TryBinaryInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, T y, Span<T> destination)
119private static bool TryBinaryInvokeHalfAsInt16<T, TOp>(T x, ReadOnlySpan<T> y, Span<T> destination)
137private static bool TryBinaryBitwiseInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
155private static bool TryBinaryBitwiseInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, T y, Span<T> destination)
173private static bool TryAggregateInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
191private static bool TryAggregateInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, T y, Span<T> destination)
225private static bool TryTernaryInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, ReadOnlySpan<T> z, Span<T> destination)
244private static bool TryTernaryInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, T y, ReadOnlySpan<T> z, Span<T> destination)
263private static bool TryTernaryInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, T z, Span<T> destination)
282private static bool TryTernaryInvokeHalfAsInt16<T, TOp>(ReadOnlySpan<T> x, T y, T z, Span<T> destination)
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs (9)
31/// Behaves the same as either <see cref="MultiplyAdd{T}(ReadOnlySpan{T}, ReadOnlySpan{T}, ReadOnlySpan{T}, Span{T})"/> or
32/// <see cref="FusedMultiplyAdd{T}(ReadOnlySpan{T}, ReadOnlySpan{T}, ReadOnlySpan{T}, Span{T})"/> depending on the current machine's capabilities.
35public static void MultiplyAddEstimate<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, ReadOnlySpan<T> addend, Span<T> destination)
64/// Behaves the same as either <see cref="MultiplyAdd{T}(ReadOnlySpan{T}, ReadOnlySpan{T}, T, Span{T})"/> or
65/// <see cref="FusedMultiplyAdd{T}(ReadOnlySpan{T}, ReadOnlySpan{T}, T, Span{T})"/> depending on the current machine's capabilities.
68public static void MultiplyAddEstimate<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, T addend, Span<T> destination)
96/// Behaves the same as either <see cref="MultiplyAdd{T}(ReadOnlySpan{T}, T, ReadOnlySpan{T}, Span{T})"/> or
97/// <see cref="FusedMultiplyAdd{T}(ReadOnlySpan{T}, T, ReadOnlySpan{T}, Span{T})"/> depending on the current machine's capabilities.
100public static void MultiplyAddEstimate<T>(ReadOnlySpan<T> x, T y, ReadOnlySpan<T> addend, Span<T> destination)
System\Numerics\Tensors\netcore\TensorPrimitives.Single.netcore.cs (7)
41ReadOnlySpan<float> x, Span<float> destination)
46ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination)
51ReadOnlySpan<float> x, float y, Span<float> destination)
56ReadOnlySpan<float> x, float y, Span<float> destination)
62ReadOnlySpan<float> x, ReadOnlySpan<float> y, ReadOnlySpan<float> z, Span<float> destination)
67ReadOnlySpan<float> x, ReadOnlySpan<float> y, float z, Span<float> destination)
72ReadOnlySpan<float> x, float y, ReadOnlySpan<float> z, Span<float> destination)
System\Numerics\Tensors\netcore\TensorSpan_1.cs (15)
74public TensorSpan(Span<T> span)
82public TensorSpan(Span<T> span, scoped ReadOnlySpan<nint> lengths)
86public TensorSpan(Span<T> span, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
247/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.FlattenTo(Span{T})" />
248public void FlattenTo(scoped Span<T> destination)
279public Span<T> GetSpan(scoped ReadOnlySpan<nint> startIndexes, int length)
281if (!TryGetSpan(startIndexes, length, out Span<T> span))
289public Span<T> GetSpan(scoped ReadOnlySpan<NIndex> startIndexes, int length)
291if (!TryGetSpan(startIndexes, length, out Span<T> span))
337/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.TryFlattenTo(Span{T})" />
338public bool TryFlattenTo(scoped Span<T> destination) => AsReadOnlyTensorSpan().TryFlattenTo(destination);
340/// <inheritdoc cref="ITensor{TSelf, T}.TryGetSpan(ReadOnlySpan{nint}, int, out Span{T})" />
341public bool TryGetSpan(scoped ReadOnlySpan<nint> startIndexes, int length, out Span<T> span)
356/// <inheritdoc cref="ITensor{TSelf, T}.TryGetSpan(ReadOnlySpan{NIndex}, int, out Span{T})" />
357public bool TryGetSpan(scoped ReadOnlySpan<NIndex> startIndexes, int length, out Span<T> span)
System\Numerics\Tensors\TensorPrimitives.Single.cs (28)
26public static void Abs(ReadOnlySpan<float> x, Span<float> destination) =>
45public static void Add(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination) =>
62public static void Add(ReadOnlySpan<float> x, float y, Span<float> destination) =>
83public static void AddMultiply(ReadOnlySpan<float> x, ReadOnlySpan<float> y, ReadOnlySpan<float> multiplier, Span<float> destination) =>
103public static void AddMultiply(ReadOnlySpan<float> x, ReadOnlySpan<float> y, float multiplier, Span<float> destination) =>
123public static void AddMultiply(ReadOnlySpan<float> x, float y, ReadOnlySpan<float> multiplier, Span<float> destination) =>
147public static void Cosh(ReadOnlySpan<float> x, Span<float> destination) =>
222public static void Divide(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination) =>
239public static void Divide(ReadOnlySpan<float> x, float y, Span<float> destination) =>
286public static void Exp(ReadOnlySpan<float> x, Span<float> destination) =>
375public static void Log(ReadOnlySpan<float> x, Span<float> destination) =>
398public static void Log2(ReadOnlySpan<float> x, Span<float> destination) =>
439public static void Max(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination) =>
475public static void MaxMagnitude(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination) =>
516public static void Min(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination) =>
557public static void MinMagnitude(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination) =>
576public static void Multiply(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination) =>
594public static void Multiply(ReadOnlySpan<float> x, float y, Span<float> destination) =>
615public static void MultiplyAdd(ReadOnlySpan<float> x, ReadOnlySpan<float> y, ReadOnlySpan<float> addend, Span<float> destination) =>
636public static void MultiplyAdd(ReadOnlySpan<float> x, ReadOnlySpan<float> y, float addend, Span<float> destination) =>
656public static void MultiplyAdd(ReadOnlySpan<float> x, float y, ReadOnlySpan<float> addend, Span<float> destination) =>
672public static void Negate(ReadOnlySpan<float> x, Span<float> destination) =>
795public static void Sigmoid(ReadOnlySpan<float> x, Span<float> destination)
826public static void Sinh(ReadOnlySpan<float> x, Span<float> destination) =>
845public static void SoftMax(ReadOnlySpan<float> x, Span<float> destination)
880public static void Subtract(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination) =>
897public static void Subtract(ReadOnlySpan<float> x, float y, Span<float> destination) =>
979public static void Tanh(ReadOnlySpan<float> x, Span<float> destination) =>
System.Private.CoreLib (1548)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (4)
704internal static partial int ToAscii(uint flags, global::System.ReadOnlySpan<char> src, int srcLen, global::System.Span<char> dstBuffer, int dstBufferCapacity)
728internal static partial int ToUnicode(uint flags, global::System.ReadOnlySpan<char> src, int srcLen, global::System.Span<char> dstBuffer, int dstBufferCapacity)
1411internal static partial int IdnToAscii(uint dwFlags, global::System.ReadOnlySpan<char> lpUnicodeCharStr, int cchUnicodeChar, global::System.Span<char> lpASCIICharStr, int cchASCIIChar)
1440internal static partial int IdnToUnicode(uint dwFlags, global::System.ReadOnlySpan<char> lpASCIICharStr, int cchASCIIChar, global::System.Span<char> lpUnicodeCharStr, int cchUnicodeChar)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (12)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
120private static void EncodeTo_Vector128<TChar>(ReadOnlySpan<byte> source, Span<TChar> destination, Casing casing)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
211EncodeTo_Vector128(source, Unsafe.BitCast<Span<char>, Span<ushort>>(destination), casing);
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
304public static bool TryDecodeFrom_Vector128<TChar>(ReadOnlySpan<TChar> source, Span<byte> destination, out int elementsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
src\runtime\src\libraries\Common\src\System\Number.Formatting.Common.cs (14)
233internal static void WriteTwoDigits<TChar>(uint value, Span<TChar> destination) where TChar : unmanaged, IUtfChar<TChar>
243MemoryMarshal.Write(MemoryMarshal.AsBytes(Unsafe.BitCast<Span<TChar>, Span<char>>(destination)), in pair);
249MemoryMarshal.Write(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination), in pair);
254internal static void WriteTwoDigits<TChar>(uint value, Span<TChar> buffer, int index) where TChar : unmanaged, IUtfChar<TChar>
261internal static void CopyNegativeSign<TChar>(ReadOnlySpan<TChar> sign, Span<TChar> destination)
274internal static int UInt32ToDecChars<TChar>(Span<TChar> buffer, int index, uint value) where TChar : unmanaged, IUtfChar<TChar>
303internal static int UInt32ToDecChars<TChar>(Span<TChar> buffer, int index, uint value, int digits) where TChar : unmanaged, IUtfChar<TChar>
645Span<int> thousandsSepPos = [0, 0, 0, 0];
1033Span<TChar> buffer = vlb.AppendSpan(bufferSize);
1043Span<TChar> groupBuffer = buffer.Slice(groupStartWrite, digitsInGroup);
1250Span<TChar> digits = vlb.AppendSpan(digitCount);
1349Span<byte> dig = number.Digits;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Array.cs (8)
1593Span<T> span = stackAllocatedMatches;
2528Span<T> keysSpan = UnsafeArrayAsSpan<T>(keys, adjustedIndex, length);
2551var span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(array), array.Length);
2600var span = new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index), length);
2624var spanKeys = new Span<TKey>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(keys), index), length);
2625var spanItems = new Span<TValue>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(items), index), length);
2642var span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(array), array.Length);
3108private static Span<T> UnsafeArrayAsSpan<T>(Array array, int adjustedIndex, int length) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\BitConverter.cs (15)
42public static bool TryWriteBytes(Span<byte> destination, bool value)
70public static bool TryWriteBytes(Span<byte> destination, char value)
98public static bool TryWriteBytes(Span<byte> destination, short value)
126public static bool TryWriteBytes(Span<byte> destination, int value)
154public static bool TryWriteBytes(Span<byte> destination, long value)
182public static bool TryWriteBytes(Span<byte> destination, Int128 value)
212public static bool TryWriteBytes(Span<byte> destination, ushort value)
242public static bool TryWriteBytes(Span<byte> destination, uint value)
272public static bool TryWriteBytes(Span<byte> destination, ulong value)
302public static bool TryWriteBytes(Span<byte> destination, UInt128 value)
330public static unsafe bool TryWriteBytes(Span<byte> destination, BFloat16 value)
358public static unsafe bool TryWriteBytes(Span<byte> destination, Half value)
386public static bool TryWriteBytes(Span<byte> destination, float value)
414public static bool TryWriteBytes(Span<byte> destination, double value)
870var dst = new Span<char>(ref result.GetRawStringData(), result.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (20)
201public static void ReverseEndianness(ReadOnlySpan<ushort> source, Span<ushort> destination) =>
204/// <inheritdoc cref="ReverseEndianness(ReadOnlySpan{ushort}, Span{ushort})" />
205public static void ReverseEndianness(ReadOnlySpan<short> source, Span<short> destination) =>
208/// <inheritdoc cref="ReverseEndianness(ReadOnlySpan{ushort}, Span{ushort})" />
210public static void ReverseEndianness(ReadOnlySpan<uint> source, Span<uint> destination) =>
213/// <inheritdoc cref="ReverseEndianness(ReadOnlySpan{ushort}, Span{ushort})" />
214public static void ReverseEndianness(ReadOnlySpan<int> source, Span<int> destination) =>
217/// <inheritdoc cref="ReverseEndianness(ReadOnlySpan{ushort}, Span{ushort})" />
219public static void ReverseEndianness(ReadOnlySpan<ulong> source, Span<ulong> destination) =>
222/// <inheritdoc cref="ReverseEndianness(ReadOnlySpan{ushort}, Span{ushort})" />
223public static void ReverseEndianness(ReadOnlySpan<long> source, Span<long> destination) =>
226/// <inheritdoc cref="ReverseEndianness(ReadOnlySpan{ushort}, Span{ushort})" />
228public static void ReverseEndianness(ReadOnlySpan<nuint> source, Span<nuint> destination) =>
235/// <inheritdoc cref="ReverseEndianness(ReadOnlySpan{ushort}, Span{ushort})" />
236public static void ReverseEndianness(ReadOnlySpan<nint> source, Span<nint> destination) =>
285private static void ReverseEndianness<T, TReverser>(ReadOnlySpan<T> source, Span<T> destination)
373/// <inheritdoc cref="ReverseEndianness(ReadOnlySpan{ushort}, Span{ushort})" />
375public static void ReverseEndianness(ReadOnlySpan<UInt128> source, Span<UInt128> destination) =>
378/// <inheritdoc cref="ReverseEndianness(ReadOnlySpan{ushort}, Span{ushort})" />
379public static void ReverseEndianness(ReadOnlySpan<Int128> source, Span<Int128> destination)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.WriteBigEndian.cs (28)
22public static void WriteDoubleBigEndian(Span<byte> destination, double value)
45public static void WriteHalfBigEndian(Span<byte> destination, Half value)
68public static void WriteBFloat16BigEndian(Span<byte> destination, BFloat16 value)
91public static void WriteInt16BigEndian(Span<byte> destination, short value)
114public static void WriteInt32BigEndian(Span<byte> destination, int value)
137public static void WriteInt64BigEndian(Span<byte> destination, long value)
160public static void WriteInt128BigEndian(Span<byte> destination, Int128 value)
183public static void WriteIntPtrBigEndian(Span<byte> destination, nint value)
206public static void WriteSingleBigEndian(Span<byte> destination, float value)
230public static void WriteUInt16BigEndian(Span<byte> destination, ushort value)
254public static void WriteUInt32BigEndian(Span<byte> destination, uint value)
278public static void WriteUInt64BigEndian(Span<byte> destination, ulong value)
302public static void WriteUInt128BigEndian(Span<byte> destination, UInt128 value)
326public static void WriteUIntPtrBigEndian(Span<byte> destination, nuint value)
349public static bool TryWriteDoubleBigEndian(Span<byte> destination, double value)
370public static bool TryWriteHalfBigEndian(Span<byte> destination, Half value)
391public static bool TryWriteBFloat16BigEndian(Span<byte> destination, BFloat16 value)
412public static bool TryWriteInt16BigEndian(Span<byte> destination, short value)
433public static bool TryWriteInt32BigEndian(Span<byte> destination, int value)
454public static bool TryWriteInt64BigEndian(Span<byte> destination, long value)
475public static bool TryWriteInt128BigEndian(Span<byte> destination, Int128 value)
496public static bool TryWriteIntPtrBigEndian(Span<byte> destination, nint value)
517public static bool TryWriteSingleBigEndian(Span<byte> destination, float value)
539public static bool TryWriteUInt16BigEndian(Span<byte> destination, ushort value)
561public static bool TryWriteUInt32BigEndian(Span<byte> destination, uint value)
583public static bool TryWriteUInt64BigEndian(Span<byte> destination, ulong value)
605public static bool TryWriteUInt128BigEndian(Span<byte> destination, UInt128 value)
627public static bool TryWriteUIntPtrBigEndian(Span<byte> destination, nuint value)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.WriteLittleEndian.cs (28)
22public static void WriteDoubleLittleEndian(Span<byte> destination, double value)
45public static void WriteHalfLittleEndian(Span<byte> destination, Half value)
68public static void WriteBFloat16LittleEndian(Span<byte> destination, BFloat16 value)
91public static void WriteInt16LittleEndian(Span<byte> destination, short value)
114public static void WriteInt32LittleEndian(Span<byte> destination, int value)
137public static void WriteInt64LittleEndian(Span<byte> destination, long value)
160public static void WriteInt128LittleEndian(Span<byte> destination, Int128 value)
183public static void WriteIntPtrLittleEndian(Span<byte> destination, nint value)
206public static void WriteSingleLittleEndian(Span<byte> destination, float value)
230public static void WriteUInt16LittleEndian(Span<byte> destination, ushort value)
254public static void WriteUInt32LittleEndian(Span<byte> destination, uint value)
278public static void WriteUInt64LittleEndian(Span<byte> destination, ulong value)
302public static void WriteUInt128LittleEndian(Span<byte> destination, UInt128 value)
326public static void WriteUIntPtrLittleEndian(Span<byte> destination, nuint value)
349public static bool TryWriteDoubleLittleEndian(Span<byte> destination, double value)
370public static bool TryWriteHalfLittleEndian(Span<byte> destination, Half value)
391public static bool TryWriteBFloat16LittleEndian(Span<byte> destination, BFloat16 value)
412public static bool TryWriteInt16LittleEndian(Span<byte> destination, short value)
433public static bool TryWriteInt32LittleEndian(Span<byte> destination, int value)
454public static bool TryWriteInt64LittleEndian(Span<byte> destination, long value)
475public static bool TryWriteInt128LittleEndian(Span<byte> destination, Int128 value)
496public static bool TryWriteIntPtrLittleEndian(Span<byte> destination, nint value)
517public static bool TryWriteSingleLittleEndian(Span<byte> destination, float value)
539public static bool TryWriteUInt16LittleEndian(Span<byte> destination, ushort value)
561public static bool TryWriteUInt32LittleEndian(Span<byte> destination, uint value)
583public static bool TryWriteUInt64LittleEndian(Span<byte> destination, ulong value)
605public static bool TryWriteUInt128LittleEndian(Span<byte> destination, UInt128 value)
627public static bool TryWriteUIntPtrLittleEndian(Span<byte> destination, nuint value)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Decoder.cs (9)
65public static OperationStatus DecodeFromUtf8(ReadOnlySpan<byte> utf8, Span<byte> bytes, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true) =>
77public static int DecodeFromUtf8(ReadOnlySpan<byte> source, Span<byte> destination)
107Span<byte> destination = (uint)upperBound <= MaxStackallocThreshold
132public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
160public static OperationStatus DecodeFromUtf8InPlace(Span<byte> buffer, out int bytesWritten) =>
173public static OperationStatus DecodeFromChars(ReadOnlySpan<char> source, Span<byte> destination,
187public static int DecodeFromChars(ReadOnlySpan<char> source, Span<byte> destination)
214public static bool TryDecodeFromChars(ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten)
239Span<byte> destination = (uint)upperBound <= MaxStackallocThreshold
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Encoder.cs (10)
29/// <see cref="EncodeToChars(ReadOnlySpan{byte}, Span{char})"/>
31/// <see cref="EncodeToUtf8(ReadOnlySpan{byte}, Span{byte})"/>.
71public static OperationStatus EncodeToUtf8(ReadOnlySpan<byte> bytes, Span<byte> utf8, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true) =>
81public static int EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> destination)
115public static bool TryEncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
137public static OperationStatus EncodeToUtf8InPlace(Span<byte> buffer, int dataLength, out int bytesWritten) =>
150public static bool TryEncodeToUtf8InPlace(Span<byte> buffer, int dataLength, out int bytesWritten)
167public static OperationStatus EncodeToChars(ReadOnlySpan<byte> source, Span<char> destination,
178public static int EncodeToChars(ReadOnlySpan<byte> source, Span<char> destination)
224public static bool TryEncodeToChars(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (11)
25internal static unsafe OperationStatus DecodeFrom<TBase64Decoder, T>(TBase64Decoder decoder, ReadOnlySpan<T> source, Span<byte> bytes,
284static OperationStatus InvalidDataFallback(TBase64Decoder decoder, ReadOnlySpan<T> source, Span<byte> bytes, ref int bytesConsumed, ref int bytesWritten, bool isFinalBlock)
341internal static unsafe OperationStatus DecodeFromUtf8InPlace<TBase64Decoder>(TBase64Decoder decoder, Span<byte> buffer, out int bytesWritten, bool ignoreWhiteSpace)
515internal static unsafe OperationStatus DecodeWithWhiteSpaceBlockwise<TBase64Decoder>(TBase64Decoder decoder, ReadOnlySpan<byte> source, Span<byte> bytes, ref int bytesConsumed, ref int bytesWritten, bool isFinalBlock = true)
519Span<byte> buffer = stackalloc byte[BlockSize];
621internal static unsafe OperationStatus DecodeWithWhiteSpaceBlockwise<TBase64Decoder>(TBase64Decoder decoder, ReadOnlySpan<ushort> source, Span<byte> bytes, ref int bytesConsumed, ref int bytesWritten, bool isFinalBlock = true)
625Span<ushort> buffer = stackalloc ushort[BlockSize];
766private static unsafe OperationStatus DecodeWithWhiteSpaceFromUtf8InPlace<TBase64Decoder>(TBase64Decoder decoder, Span<byte> source, ref int destIndex, uint sourceIndex)
770Span<byte> buffer = stackalloc byte[BlockSize];
1676Span<byte> bytes, ref int bytesConsumed, ref int bytesWritten, bool isFinalBlock = true)
1894Span<byte> bytes, ref int bytesConsumed, ref int bytesWritten, bool isFinalBlock = true) where TBase64Decoder : IBase64Decoder<ushort> =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (11)
68public static OperationStatus DecodeFromUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true) =>
86public static int DecodeFromUtf8InPlace(Span<byte> buffer)
117public static int DecodeFromUtf8(ReadOnlySpan<byte> source, Span<byte> destination)
144public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
169Span<byte> destination = (uint)upperBound <= MaxStackallocThreshold
202public static OperationStatus DecodeFromChars(ReadOnlySpan<char> source, Span<byte> destination,
216public static int DecodeFromChars(ReadOnlySpan<char> source, Span<byte> destination)
243public static bool TryDecodeFromChars(ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten)
267Span<byte> destination = (uint)upperBound <= MaxStackallocThreshold
483public OperationStatus DecodeWithWhiteSpaceBlockwiseWrapper<TBase64Decoder>(TBase64Decoder decoder, ReadOnlySpan<byte> utf8, Span<byte> bytes,
570public OperationStatus DecodeWithWhiteSpaceBlockwiseWrapper<TBase64Decoder>(TBase64Decoder decoder, ReadOnlySpan<ushort> source, Span<byte> bytes,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (9)
31Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true) =>
42/// <see cref="EncodeToChars(ReadOnlySpan{byte}, Span{char})"/>
44/// <see cref="EncodeToUtf8(ReadOnlySpan{byte}, Span{byte})"/>.
77public static int EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> destination)
116public static OperationStatus EncodeToChars(ReadOnlySpan<byte> source, Span<char> destination,
128public static int EncodeToChars(ReadOnlySpan<byte> source, Span<char> destination)
190public static bool TryEncodeToChars(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
205public static bool TryEncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
223public static bool TryEncodeToUtf8InPlace(Span<byte> buffer, int dataLength, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Formatter\Utf8Formatter.Integer.cs (9)
34public static bool TryFormat(byte value, Span<byte> destination, out int bytesWritten, StandardFormat format = default) =>
59public static bool TryFormat(sbyte value, Span<byte> destination, out int bytesWritten, StandardFormat format = default) =>
84public static bool TryFormat(ushort value, Span<byte> destination, out int bytesWritten, StandardFormat format = default) =>
108public static bool TryFormat(short value, Span<byte> destination, out int bytesWritten, StandardFormat format = default) =>
134public static bool TryFormat(uint value, Span<byte> destination, out int bytesWritten, StandardFormat format = default)
186public static bool TryFormat(int value, Span<byte> destination, out int bytesWritten, StandardFormat format = default) =>
190private static bool TryFormat(int value, int hexMask, Span<byte> destination, out int bytesWritten, StandardFormat format = default)
248public static bool TryFormat(ulong value, Span<byte> destination, out int bytesWritten, StandardFormat format = default)
301public static bool TryFormat(long value, Span<byte> destination, out int bytesWritten, StandardFormat format = default)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (6)
157public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
163public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
366/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
367bool IBinaryInteger<byte>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
383/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
384bool IBinaryInteger<byte>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (6)
198bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
212bool IUtf8SpanFormattable.TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
1339/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
1340bool IBinaryInteger<char>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
1352/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
1353bool IBinaryInteger<char>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (15)
99BinaryPrimitives.ReverseEndianness(array, MemoryMarshal.Cast<byte, int>((Span<byte>)_array));
123MemoryMarshal.Cast<byte, int>((Span<byte>)_array)[(int)index] &= ReverseIfBE((1 << (int)extraBits) - 1);
345BinaryPrimitives.ReverseEndianness(values, MemoryMarshal.Cast<byte, int>((Span<byte>)array));
535Span<int> thisRemaining = MemoryMarshal.Cast<byte, int>(((Span<byte>)thisArray).Slice(i, roundedBytesRemaining));
536Span<int> valueRemaining = MemoryMarshal.Cast<byte, int>(((Span<byte>)valueArray).Slice(i, roundedBytesRemaining));
611Span<int> intSpan = MemoryMarshal.Cast<byte, int>((Span<byte>)_array);
674Span<int> intSpan = MemoryMarshal.Cast<byte, int>((Span<byte>)_array);
777Span<int> source = MemoryMarshal.Cast<byte, int>((Span<byte>)_array).Slice(0, intLength);
829Span<int> in32Span = MemoryMarshal.Cast<byte, int>((Span<byte>)_array);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (80)
19public void Sort(Span<T> keys, IComparer<T>? comparer)
54internal static void Sort(Span<T> keys, Comparison<T> comparer)
99private static void SwapIfGreater(Span<T> keys, Comparison<T> comparer, int i, int j)
112private static void Swap(Span<T> a, int i, int j)
121internal static void IntrospectiveSort(Span<T> keys, Comparison<T> comparer)
134private static void IntroSort(Span<T> keys, int depthLimit, Comparison<T> comparer)
179private static int PickPivotAndPartition(Span<T> keys, Comparison<T> comparer)
217private static void HeapSort(Span<T> keys, Comparison<T> comparer)
235private static void DownHeap(Span<T> keys, int i, int n, Comparison<T> comparer)
258private static void InsertionSort(Span<T> keys, Comparison<T> comparer)
283public void Sort(Span<T> keys, IComparer<T>? comparer)
298int nanLeft = SortUtils.MoveNansToFront(keys, default(Span<byte>));
411private static void IntroSort(Span<T> keys, int depthLimit)
458private static unsafe int PickPivotAndPartition(Span<T> keys)
507private static void HeapSort(Span<T> keys)
524private static void DownHeap(Span<T> keys, int i, int n)
545private static void InsertionSort(Span<T> keys)
615public void Sort(Span<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
633private static void SwapIfGreaterWithValues(Span<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j)
653private static void Swap(Span<TKey> keys, Span<TValue> values, int i, int j)
666internal static void IntrospectiveSort(Span<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
677private static void IntroSort(Span<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer)
723private static int PickPivotAndPartition(Span<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
761private static void HeapSort(Span<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
779private static void DownHeap(Span<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer)
806private static void InsertionSort(Span<TKey> keys, Span<TValue> values, IComparer<TKey> comparer)
832public void Sort(Span<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
876private static void SwapIfGreaterWithValues(Span<TKey> keys, Span<TValue> values, int i, int j)
894private static void Swap(Span<TKey> keys, Span<TValue> values, int i, int j)
907private static void IntroSort(Span<TKey> keys, Span<TValue> values, int depthLimit)
952private static int PickPivotAndPartition(Span<TKey> keys, Span<TValue> values)
997private static void HeapSort(Span<TKey> keys, Span<TValue> values)
1014private static void DownHeap(Span<TKey> keys, Span<TValue> values, int i, int n)
1039private static void InsertionSort(Span<TKey> keys, Span<TValue> values)
1111public static int MoveNansToFront<TKey, TValue>(Span<TKey> keys, Span<TValue> values) where TKey : notnull
1149internal static void Sort(Span<T> keys, TComparer comparer)
1169private static void Swap(Span<T> a, int i, int j)
1178private static void SwapIfGreater(Span<T> keys, TComparer comparer, int i, int j)
1190internal static void IntrospectiveSort(Span<T> keys, TComparer comparer)
1203private static void IntroSort(Span<T> keys, int depthLimit, TComparer comparer)
1247private static int PickPivotAndPartition(Span<T> keys, TComparer comparer)
1285private static void HeapSort(Span<T> keys, TComparer comparer)
1303private static void DownHeap(Span<T> keys, int i, int n, TComparer comparer)
1326private static void InsertionSort(Span<T> keys, TComparer comparer)
1351public static void Sort(Span<TKey> keys, Span<TValue> values, TComparer comparer)
1372private static void Swap(Span<TKey> keys, Span<TValue> values, int i, int j)
1385private static void SwapIfGreaterWithValues(Span<TKey> keys, Span<TValue> values, TComparer comparer, int i, int j)
1404internal static void IntrospectiveSort(Span<TKey> keys, Span<TValue> values, TComparer comparer)
1415private static void IntroSort(Span<TKey> keys, Span<TValue> values, int depthLimit, TComparer comparer)
1460private static int PickPivotAndPartition(Span<TKey> keys, Span<TValue> values, TComparer comparer)
1498private static void HeapSort(Span<TKey> keys, Span<TValue> values, TComparer comparer)
1516private static void DownHeap(Span<TKey> keys, Span<TValue> values, int i, int n, TComparer comparer)
1543private static void InsertionSort(Span<TKey> keys, Span<TValue> values, TComparer comparer)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (12)
2299Span<char> chars = stackalloc char[22]; // max length of a ulong in octal
2416public static bool TryToBase64Chars(ReadOnlySpan<byte> bytes, Span<char> chars, out int charsWritten, Base64FormattingOptions options = Base64FormattingOptions.None)
2453private static int ConvertToBase64WithLineBreaks(Span<char> destination, ReadOnlySpan<byte> source)
2524public static bool TryFromBase64String(string s, Span<byte> bytes, out int bytesWritten)
2534public static bool TryFromBase64Chars(ReadOnlySpan<char> chars, Span<byte> bytes, out int bytesWritten)
2641public static OperationStatus FromHexString(string source, Span<byte> destination, out int charsConsumed, out int bytesWritten)
2657public static OperationStatus FromHexString(ReadOnlySpan<char> source, Span<byte> destination, out int charsConsumed, out int bytesWritten)
2713public static OperationStatus FromHexString(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesConsumed, out int bytesWritten)
2813public static bool TryToHexString(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
2836public static bool TryToHexString(ReadOnlySpan<byte> source, Span<byte> utf8Destination, out int bytesWritten)
2908public static bool TryToHexStringLower(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
2931public static bool TryToHexStringLower(ReadOnlySpan<byte> source, Span<byte> utf8Destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (13)
503public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
509public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
586public static int GetBits(decimal d, Span<int> destination)
607public static bool TryGetBits(decimal d, Span<int> destination, out int valuesWritten)
623internal static void GetBytes(in decimal d, Span<byte> buffer)
1146/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
1147bool IFloatingPoint<decimal>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
1160/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
1161bool IFloatingPoint<decimal>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
1174/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
1175bool IFloatingPoint<decimal>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
1191/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
1192bool IFloatingPoint<decimal>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (10)
594Span<uint> result = bufRes.AsSpan();
765private static uint DivByConst(Span<uint> result, int hiRes, out uint quotient, out uint remainder, uint power)
1062Span<uint> rgulNum = bufNum.AsSpan();
1076Span<uint> num = rgulNum.Slice(0, hiProd + 1);
1558Span<uint> product = bufProd.AsSpan();
2343/// <see cref="MemoryMarshal.Cast{TFrom, TTo}(Span{TFrom})"/> derives the destination length
2347private static ref TWindow Window<TWindow>(Span<uint> buf, int index) where TWindow : struct
2364Span<uint> buf = bufNum;
2753public Span<uint> AsSpan() => MemoryMarshal.CreateSpan(ref Unsafe.As<Buf24, uint>(ref this), Length);
2756private Span<ulong> AsUInt64() => MemoryMarshal.Cast<uint, ulong>(AsSpan());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (14)
380public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
386public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
723internal bool TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
735/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
736bool IFloatingPoint<double>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
741internal bool TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
753/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
754bool IFloatingPoint<double>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
759internal bool TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
771/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
772bool IFloatingPoint<double>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
777internal bool TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
789/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
790bool IFloatingPoint<double>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (12)
1554private static unsafe bool TryFormatNumberAsHex<TStorage>(ref byte data, Span<char> destination, out int charsWritten) where TStorage : struct
1688bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
1748public static unsafe bool TryFormat<TEnum>(TEnum value, Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.EnumFormat)] ReadOnlySpan<char> format = default) where TEnum : struct
1804internal static unsafe bool TryFormatUnconstrained<TEnum>(TEnum value, Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.EnumFormat)] ReadOnlySpan<char> format = default)
1857private static bool TryFormatPrimitiveDefault<TUnderlying, TStorage>(RuntimeType enumType, TUnderlying value, Span<char> destination, out int charsWritten)
1892private static bool TryFormatPrimitiveNonDefault<TUnderlying, TStorage>(RuntimeType enumType, TUnderlying value, Span<char> destination, out int charsWritten, ReadOnlySpan<char> format)
1943Span<int> foundItems = stackalloc int[64];
1962private static unsafe bool TryFormatFlagNames<TStorage>(EnumInfo<TStorage> enumInfo, TStorage resultValue, Span<char> destination, out int charsWritten, ref bool isDestinationTooSmall)
1987Span<int> foundItems = stackalloc int[64];
2062private static bool TryFindFlagsNames<TStorage>(TStorage resultValue, string[] names, TStorage[] values, int index, Span<int> foundItems, out int resultLength, out int foundItemsCount)
2108private static void WriteMultipleFoundFlagsNames(string[] names, ReadOnlySpan<int> foundItems, Span<char> destination)
2117Span<char> afterSeparator = destination.Slice(2); // done before copying ", " to eliminate those two bounds checks
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (24)
186Span<TChar> buffer = outputBuffer.AppendSpan(digitCount);
830Encoding.UTF8.GetBytes(s, Unsafe.BitCast<Span<TChar>, Span<byte>>(result.AppendSpan(Encoding.UTF8.GetByteCount(s))));
841Span<TChar> chars = buffer;
845fraction.TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(chars), out charCount, fractionFormat, CultureInfo.InvariantCulture) :
846fraction.TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(chars), out charCount, fractionFormat, CultureInfo.InvariantCulture);
906Span<TChar> offsetSpan = result.AppendSpan(5);
950Span<TChar> hoursMinutes = result.AppendSpan(5);
1037Span<char> span = stackalloc char[FormatOMaxLength];
1105internal static bool TryFormat<TChar>(DateTime dateTime, Span<TChar> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) where TChar : unmanaged, IUtfChar<TChar> =>
1108internal static bool TryFormat<TChar>(DateTime dateTime, Span<TChar> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider, TimeSpan offset) where TChar : unmanaged, IUtfChar<TChar>
1390internal static bool TryFormatTimeOnlyO<TChar>(TimeOnly value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1415internal static bool TryFormatTimeOnlyR<TChar>(TimeOnly value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1439internal static bool TryFormatDateOnlyO<TChar>(DateOnly value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1463internal static bool TryFormatDateOnlyR<TChar>(DateOnly value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1504internal static bool TryFormatO<TChar>(DateTime dateTime, TimeSpan offset, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1538Span<TChar> dest = destination.Slice(0, FormatOMinLength);
1568Span<TChar> suffix = destination.Slice(FormatOMinLength, 6);
1586internal static bool TryFormatS<TChar>(DateTime dateTime, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1618internal static bool TryFormatu<TChar>(DateTime dateTime, TimeSpan offset, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1656internal static bool TryFormatR<TChar>(DateTime dateTime, TimeSpan offset, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1718internal static bool TryFormatInvariantG<TChar>(DateTime value, TimeSpan offset, Span<TChar> destination, out int bytesWritten) where TChar : unmanaged, IUtfChar<TChar>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Icu.cs (6)
26Span<char> outputStack = stackalloc char[estimatedLength];
35actualLength = Interop.Globalization.ToAscii(flags, unicode, count, Span<char>.Empty, 0);
52private bool IcuTryGetAsciiCore(ReadOnlySpan<char> unicode, Span<char> destination, out int charsWritten)
89Span<char> output = stackalloc char[count];
99private static string IcuGetUnicodeCore(string asciiString, ReadOnlySpan<char> ascii, uint flags, Span<char> output, bool reattempt)
123private bool IcuTryGetUnicodeCore(ReadOnlySpan<char> ascii, Span<char> destination, out int charsWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Nls.cs (10)
21int length = Interop.Normaliz.IdnToAscii(flags, unicode, count, Span<char>.Empty, 0);
31Span<char> output = stackalloc char[length];
41private static string NlsGetAsciiCore(string unicodeString, ReadOnlySpan<char> unicode, uint flags, Span<char> output)
55private bool NlsTryGetAsciiCore(ReadOnlySpan<char> unicode, Span<char> destination, out int charsWritten)
63int length = Interop.Normaliz.IdnToAscii(flags, unicode, unicode.Length, Span<char>.Empty, 0);
95int length = Interop.Normaliz.IdnToUnicode(flags, ascii, count, Span<char>.Empty, 0);
105Span<char> output = stackalloc char[length];
115private static string NlsGetUnicodeCore(string asciiString, ReadOnlySpan<char> ascii, uint flags, Span<char> output)
129private bool NlsTryGetUnicodeCore(ReadOnlySpan<char> ascii, Span<char> destination, out int charsWritten)
137int length = Interop.Normaliz.IdnToUnicode(flags, ascii, ascii.Length, Span<char>.Empty, 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.cs (10)
176internal void ToLower(ReadOnlySpan<char> source, Span<char> destination)
235internal void ChangeCaseToLower(ReadOnlySpan<char> source, Span<char> destination)
242internal void ChangeCaseToUpper(ReadOnlySpan<char> source, Span<char> destination)
249private static unsafe void ChangeCaseCommon<TConversion>(TextInfo? instance, ReadOnlySpan<char> source, Span<char> destination) where TConversion : struct
372Span<char> resultSpan = new Span<char>(ref result.GetRawStringData(), result.Length);
396Span<char> resultSpan = new Span<char>(ref result.GetRawStringData(), result.Length);
505internal void ToUpper(ReadOnlySpan<char> source, Span<char> destination)
533Span<char> lowerChars = ['\0', '\0'];
555Span<char> upperChars = ['\0', '\0'];
762Span<char> dst = ['\0', '\0'];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (6)
51internal static bool TryFormat<TChar>(TimeSpan value, Span<TChar> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? formatProvider) where TChar : unmanaged, IUtfChar<TChar>
86Span<char> destination = stackalloc char[26]; // large enough for any "c" TimeSpan
95Span<char> destination = (uint)maxLength < 128 ?
109internal static bool TryFormatStandard<TChar>(TimeSpan value, StandardFormat format, ReadOnlySpan<TChar> decimalSeparator, Span<TChar> destination, out int written) where TChar : unmanaged, IUtfChar<TChar>
270Span<TChar> suffix = destination.Slice(pos, suffixLen);
311Span<TChar> suffix = destination.Slice(pos, suffixLen);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Guid.cs (13)
530Span<byte> bytes = MemoryMarshal.AsBytes(new Span<GuidResult>(ref result));
618Span<byte> bytes = MemoryMarshal.AsBytes(new Span<GuidResult>(ref result));
962Span<byte> destUtf8Span = new byte[srcUtf8Span.Length];
1034public bool TryWriteBytes(Span<byte> destination)
1053public bool TryWriteBytes(Span<byte> destination, bool bigEndian, out int bytesWritten)
1256public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.GuidFormat)] ReadOnlySpan<char> format = default) =>
1259bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.GuidFormat)] ReadOnlySpan<char> format, IFormatProvider? provider) =>
1263public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.GuidFormat)] ReadOnlySpan<char> format = default) =>
1266bool IUtf8SpanFormattable.TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.GuidFormat)] ReadOnlySpan<char> format, IFormatProvider? provider) =>
1279private bool TryFormatCore<TChar>(Span<TChar> destination, out int charsWritten, ReadOnlySpan<char> format) where TChar : unmanaged, IUtfChar<TChar>
1326internal unsafe bool TryFormatCore<TChar>(Span<TChar> destination, out int charsWritten, int flags) where TChar : unmanaged, IUtfChar<TChar>
1451private bool TryFormatX<TChar>(Span<TChar> dest, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1501static void WriteHex(Span<TChar> dest, int offset, int val, bool appendComma = true)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (10)
562public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
568public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
1401/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
1402bool IFloatingPoint<Half>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
1415/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
1416bool IFloatingPoint<Half>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
1429/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
1430bool IFloatingPoint<Half>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
1442/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
1443bool IFloatingPoint<Half>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (6)
119public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
125public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
925/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
926bool IBinaryInteger<Int128>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
938/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
939bool IBinaryInteger<Int128>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (6)
119public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
125public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
454/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
455bool IBinaryInteger<short>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
467/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
468bool IBinaryInteger<short>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (6)
135public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
141public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
494/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
495bool IBinaryInteger<int>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
507/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
508bool IBinaryInteger<int>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (6)
132public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
138public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
491/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
492bool IBinaryInteger<long>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
504/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
505bool IBinaryInteger<long>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (6)
234public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
238public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
524/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
525bool IBinaryInteger<nint>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
537/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
538bool IBinaryInteger<nint>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (126)
26public static Span<T> AsSpan<T>(this T[]? array, int start)
46public static Span<T> AsSpan<T>(this T[]? array, Index startIndex)
70public static Span<T> AsSpan<T>(this T[]? array, Range range)
318public static bool Contains<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
379public static bool ContainsAny<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>? =>
385public static bool ContainsAny<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>? =>
391public static bool ContainsAny<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>? =>
397public static bool ContainsAny<T>(this Span<T> span, SearchValues<T> values) where T : IEquatable<T>? =>
403public static bool ContainsAny(this Span<char> span, SearchValues<string> values) =>
409public static bool ContainsAnyExcept<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
415public static bool ContainsAnyExcept<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>? =>
421public static bool ContainsAnyExcept<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>? =>
427public static bool ContainsAnyExcept<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>? =>
433public static bool ContainsAnyExcept<T>(this Span<T> span, SearchValues<T> values) where T : IEquatable<T>? =>
439public static bool ContainsAnyInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> =>
445public static bool ContainsAnyExceptInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> =>
705public static int IndexOf<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
715public static int IndexOf<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>? =>
725public static int LastIndexOf<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
735public static int LastIndexOf<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>? =>
747public static int IndexOfAnyExcept<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
760public static int IndexOfAnyExcept<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>? =>
774public static int IndexOfAnyExcept<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>? =>
786public static int IndexOfAnyExcept<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>? =>
799public static int IndexOfAnyExcept<T>(this Span<T> span, SearchValues<T> values) where T : IEquatable<T>? =>
1325public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
1338public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>? =>
1352public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>? =>
1364public static int LastIndexOfAnyExcept<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>? =>
1377public static int LastIndexOfAnyExcept<T>(this Span<T> span, SearchValues<T> values) where T : IEquatable<T>? =>
1899public static int IndexOfAnyInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> =>
1970public static int IndexOfAnyExceptInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> =>
2041public static int LastIndexOfAnyInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> =>
2112public static int LastIndexOfAnyExceptInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> =>
2194public static bool SequenceEqual<T>(this Span<T> span, ReadOnlySpan<T> other) where T : IEquatable<T>? =>
2201public static int SequenceCompareTo<T>(this Span<T> span, ReadOnlySpan<T> other) where T : IComparable<T>? =>
2616public static int IndexOfAny<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>? =>
2628public static int IndexOfAny<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>? =>
2638public static int IndexOfAny<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>? =>
2648public static int IndexOfAny<T>(this Span<T> span, SearchValues<T> values) where T : IEquatable<T>? =>
2658public static int IndexOfAny(this Span<char> span, SearchValues<string> values) =>
3046public static int LastIndexOfAny<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>? =>
3058public static int LastIndexOfAny<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>? =>
3068public static int LastIndexOfAny<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>? =>
3078public static int LastIndexOfAny<T>(this Span<T> span, SearchValues<T> values) where T : IEquatable<T>? =>
3472public static bool SequenceEqual<T>(this Span<T> span, ReadOnlySpan<T> other, IEqualityComparer<T>? comparer = null) =>
3581public static bool StartsWith<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>? =>
3623public static bool EndsWith<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>? =>
3715public static void Reverse<T>(this Span<T> span)
3727public static Span<T> AsSpan<T>(this T[]? array)
3745public static Span<T> AsSpan<T>(this T[]? array, int start, int length)
3754public static Span<T> AsSpan<T>(this ArraySegment<T> segment)
3771public static Span<T> AsSpan<T>(this ArraySegment<T> segment, int start)
3786public static Span<T> AsSpan<T>(this ArraySegment<T> segment, Index startIndex)
3805public static Span<T> AsSpan<T>(this ArraySegment<T> segment, int start, int length)
3821public static Span<T> AsSpan<T>(this ArraySegment<T> segment, Range range)
3954public static void CopyTo<T>(this T[]? source, Span<T> destination)
4108public static bool Overlaps<T>(this Span<T> span, ReadOnlySpan<T> other) =>
4116public static bool Overlaps<T>(this Span<T> span, ReadOnlySpan<T> other, out int elementOffset) =>
4169/// Searches an entire sorted <see cref="Span{T}"/> for a value
4173/// <param name="span">The sorted <see cref="Span{T}"/> to search.</param>
4179/// no larger element, the bitwise complement of <see cref="Span{T}.Length"/>.
4186public static int BinarySearch<T>(this Span<T> span, IComparable<T> comparable) =>
4190/// Searches an entire sorted <see cref="Span{T}"/> for a value
4195/// <param name="span">The sorted <see cref="Span{T}"/> to search.</param>
4201/// no larger element, the bitwise complement of <see cref="Span{T}.Length"/>.
4209this Span<T> span, TComparable comparable)
4214/// Searches an entire sorted <see cref="Span{T}"/> for the specified <paramref name="value"/>
4219/// <param name="span">The sorted <see cref="Span{T}"/> to search.</param>
4226/// no larger element, the bitwise complement of <see cref="Span{T}.Length"/>.
4234this Span<T> span, T value, TComparer comparer)
4316/// Sorts the elements in the entire <see cref="Span{T}" /> using the <see cref="IComparable{T}" /> implementation
4317/// of each element of the <see cref= "Span{T}" />
4320/// <param name="span">The <see cref="Span{T}"/> to sort.</param>
4324public static void Sort<T>(this Span<T> span) =>
4328/// Sorts the elements in the entire <see cref="Span{T}" /> using the <typeparamref name="TComparer" />.
4332/// <param name="span">The <see cref="Span{T}"/> to sort.</param>
4344public static void Sort<T, TComparer>(this Span<T> span, TComparer comparer) where TComparer : IComparer<T>?
4362/// Sorts the elements in the entire <see cref="Span{T}" /> using the specified <see cref="Comparison{T}" />.
4365/// <param name="span">The <see cref="Span{T}"/> to sort.</param>
4368public static void Sort<T>(this Span<T> span, Comparison<T> comparison)
4381/// based on the keys in the first <see cref="Span{TKey}" /> using the <see cref="IComparable{T}" />
4394public static void Sort<TKey, TValue>(this Span<TKey> keys, Span<TValue> items) =>
4399/// based on the keys in the first <see cref="Span{TKey}" /> using the specified comparer.
4417public static void Sort<TKey, TValue, TComparer>(this Span<TKey> keys, Span<TValue> items, TComparer comparer) where TComparer : IComparer<TKey>?
4439/// based on the keys in the first <see cref="Span{TKey}" /> using the specified comparison.
4450public static void Sort<TKey, TValue>(this Span<TKey> keys, Span<TValue> items, Comparison<TKey> comparison)
4471public static unsafe void Replace<T>(this Span<T> span, T oldValue, T newValue) where T : IEquatable<T>?
4537public static unsafe void Replace<T>(this Span<T> span, T oldValue, T newValue, IEqualityComparer<T>? comparer = null)
4591static void ReplaceDefaultComparer(Span<T> span, T oldValue, T newValue)
4605static void ReplaceComparer(Span<T> span, T oldValue, T newValue, IEqualityComparer<T>? comparer)
4630public static unsafe void Replace<T>(this ReadOnlySpan<T> source, Span<T> destination, T oldValue, T newValue) where T : IEquatable<T>?
4714public static unsafe void Replace<T>(this ReadOnlySpan<T> source, Span<T> destination, T oldValue, T newValue, IEqualityComparer<T>? comparer = null)
4786static void ReplaceDefaultComparer(ReadOnlySpan<T> source, Span<T> destination, T oldValue, T newValue)
4799static void ReplaceComparer(ReadOnlySpan<T> source, Span<T> destination, T oldValue, T newValue, IEqualityComparer<T>? comparer)
4826public static void ReplaceAny<T>(this ReadOnlySpan<T> source, Span<T> destination, SearchValues<T> values, T newValue) where T : IEquatable<T>?
4852public static void ReplaceAny<T>(this Span<T> span, SearchValues<T> values, T newValue) where T : IEquatable<T>?
4876public static void ReplaceAnyExcept<T>(this ReadOnlySpan<T> source, Span<T> destination, SearchValues<T> values, T newValue) where T : IEquatable<T>?
4901public static void ReplaceAnyExcept<T>(this Span<T> span, SearchValues<T> values, T newValue) where T : IEquatable<T>?
4917public static int CommonPrefixLength<T>(this Span<T> span, ReadOnlySpan<T> other) =>
4927public static int CommonPrefixLength<T>(this Span<T> span, ReadOnlySpan<T> other, IEqualityComparer<T>? comparer) =>
5055/// or when <see cref="SplitAny(ReadOnlySpan{char}, Span{Range}, ReadOnlySpan{char}, StringSplitOptions)"/>
5105public static int Split(this ReadOnlySpan<char> source, Span<Range> destination, char separator, StringSplitOptions options = StringSplitOptions.None)
5139public static int Split(this ReadOnlySpan<char> source, Span<Range> destination, ReadOnlySpan<char> separator, StringSplitOptions options = StringSplitOptions.None)
5195public static int SplitAny(this ReadOnlySpan<char> source, Span<Range> destination, ReadOnlySpan<char> separators, StringSplitOptions options = StringSplitOptions.None)
5236public static int SplitAny(this ReadOnlySpan<char> source, Span<Range> destination, ReadOnlySpan<string> separators, StringSplitOptions options = StringSplitOptions.None)
5260ReadOnlySpan<char> source, Span<Range> destination,
5333Span<Range> destinationMinusOne = destination.Slice(0, destination.Length - 1);
5417public static int Count<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
5551public static int Count<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>? =>
5684public static bool TryWrite(this Span<char> destination, [InterpolatedStringHandlerArgument(nameof(destination))] ref TryWriteInterpolatedStringHandler handler, out int charsWritten)
5704public static bool TryWrite(this Span<char> destination, IFormatProvider? provider, [InterpolatedStringHandlerArgument(nameof(destination), nameof(provider))] ref TryWriteInterpolatedStringHandler handler, out int charsWritten) =>
5722public static bool TryWrite<TArg0>(this Span<char> destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, TArg0 arg0)
5744public static bool TryWrite<TArg0, TArg1>(this Span<char> destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, TArg0 arg0, TArg1 arg1)
5768public static bool TryWrite<TArg0, TArg1, TArg2>(this Span<char> destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, TArg0 arg0, TArg1 arg1, TArg2 arg2)
5788public static bool TryWrite(this Span<char> destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, params object?[] args)
5807public static bool TryWrite(this Span<char> destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, params ReadOnlySpan<object?> args)
5820private static bool TryWrite<TArg0, TArg1, TArg2>(Span<char> destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, TArg0 arg0, TArg1 arg1, TArg2 arg2, ReadOnlySpan<object?> args)
6063private readonly Span<char> _destination;
6080/// <summary>Creates a handler used to write an interpolated string into a <see cref="Span{Char}"/>.</summary>
6086public TryWriteInterpolatedStringHandler(int literalLength, int formattedCount, Span<char> destination, out bool shouldAppend)
6095/// <summary>Creates a handler used to write an interpolated string into a <see cref="Span{Char}"/>.</summary>
6102public TryWriteInterpolatedStringHandler(int literalLength, int formattedCount, Span<char> destination, IFormatProvider? provider, out bool shouldAppend)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (75)
289private static Span<char> GetFreshStringSpan(string result)
370internal static bool TryFormatDecimalIeee754<TDecimal, TValue, TChar>(TValue value, ReadOnlySpan<char> format, NumberFormatInfo info, Span<TChar> destination, out int charsWritten)
504public static bool TryFormatDecimal<TChar>(decimal value, ReadOnlySpan<char> format, NumberFormatInfo info, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
577Span<byte> digits = number.Digits;
909Span<TChar> exponentBuffer = vlb.AppendSpan(digitCount);
924public static bool TryFormatFloat<TNumber, TChar>(TNumber value, ReadOnlySpan<char> format, NumberFormatInfo info, Span<TChar> destination, out int charsWritten)
1038private static bool TryCopyTo<TChar>(string source, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1045if (source.TryCopyTo(Unsafe.BitCast<Span<TChar>, Span<char>>(destination)))
1057return Encoding.UTF8.TryGetBytes(source, Unsafe.BitCast<Span<TChar>, Span<byte>>(destination), out charsWritten);
1125public static bool TryFormatInt32<TChar>(int value, int hexMask, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1137static bool TryFormatInt32Slow(int value, int hexMask, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
1235public static bool TryFormatUInt32<TChar>(uint value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1247static bool TryFormatUInt32Slow(uint value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
1347public static bool TryFormatInt64<TChar>(long value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1361static bool TryFormatInt64Slow(long value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
1459public static bool TryFormatUInt64<TChar>(ulong value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1471static bool TryFormatUInt64Slow(ulong value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
1572public static bool TryFormatInt128<TChar>(Int128 value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1586static bool TryFormatInt128Slow(Int128 value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
1686public static bool TryFormatUInt128<TChar>(UInt128 value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1698static bool TryFormatUInt128Slow(UInt128 value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
1759Span<byte> digits = number.Digits;
1772private static void UInt32ToDecChars(uint value, Span<char> buffer)
1777Span<DigitPair> pairs = MemoryMarshal.Cast<char, DigitPair>(buffer.Slice(leadingDigits));
1808Span<char> buffer = GetFreshStringSpan(result);
1814internal static bool TryNegativeInt32ToDecStr<TChar>(int value, int digits, ReadOnlySpan<TChar> sNegative, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1847Span<char> buffer = GetFreshStringSpan(result);
1852internal static bool TryInt32ToHexStr<TChar>(int value, char hexBase, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1874private static void Int32ToHexChars<TChar>(Span<TChar> buffer, uint value, int hexBase) where TChar : unmanaged, IUtfChar<TChar>
1895Span<char> buffer = GetFreshStringSpan(result);
1900private static bool TryUInt32ToBinaryStr<TChar>(uint value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1922private static void UInt32ToBinaryChars<TChar>(Span<TChar> buffer, uint value) where TChar : unmanaged, IUtfChar<TChar>
1942Span<byte> digits = number.Digits;
1954internal static void WriteFourDigits<TChar>(uint value, Span<TChar> destination) where TChar : unmanaged, IUtfChar<TChar>
1964internal static void WriteDigits<TChar>(uint value, Span<TChar> destination) where TChar : unmanaged, IUtfChar<TChar>
2002Span<char> buffer = GetFreshStringSpan(result);
2014Span<char> buffer = GetFreshStringSpan(result);
2019internal static bool TryUInt32ToDecStr<TChar>(uint value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2036internal static bool TryUInt32ToDecStr<TChar>(uint value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2073Span<byte> digits = number.Digits;
2098Span<char> buffer = GetFreshStringSpan(result);
2104internal static bool TryNegativeInt64ToDecStr<TChar>(long value, int digits, ReadOnlySpan<TChar> sNegative, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2137Span<char> buffer = GetFreshStringSpan(result);
2142internal static bool TryInt64ToHexStr<TChar>(long value, char hexBase, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2166private static void Int64ToHexChars<TChar>(Span<TChar> buffer, ulong value, int hexBase) where TChar : unmanaged, IUtfChar<TChar>
2201Span<char> buffer = GetFreshStringSpan(result);
2206private static bool TryUInt64ToBinaryStr<TChar>(ulong value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2230private static void UInt64ToBinaryChars<TChar>(Span<TChar> buffer, ulong value) where TChar : unmanaged, IUtfChar<TChar>
2264Span<byte> digits = number.Digits;
2282private static void UInt64ToDecChars(ulong value, Span<char> buffer)
2297Span<DigitPair> pairs = MemoryMarshal.Cast<char, DigitPair>(buffer.Slice(leadingDigits));
2321internal static int UInt64ToDecChars<TChar>(Span<TChar> buffer, int index, ulong value) where TChar : unmanaged, IUtfChar<TChar>
2355internal static int UInt64ToDecChars<TChar>(Span<TChar> buffer, int index, ulong value, int digits) where TChar : unmanaged, IUtfChar<TChar>
2395Span<char> buffer = GetFreshStringSpan(result);
2409Span<char> buffer = GetFreshStringSpan(result);
2414internal static bool TryUInt64ToDecStr<TChar>(ulong value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2431internal static bool TryUInt64ToDecStr<TChar>(ulong value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2463Span<byte> digits = number.Digits;
2500Span<char> buffer = GetFreshStringSpan(result);
2506private static bool TryNegativeInt128ToDecStr<TChar>(Int128 value, int digits, ReadOnlySpan<TChar> sNegative, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2543Span<char> buffer = GetFreshStringSpan(result);
2548private static bool TryInt128ToHexStr<TChar>(Int128 value, char hexBase, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2572private static void Int128ToHexChars<TChar>(Span<TChar> buffer, UInt128 value, int hexBase) where TChar : unmanaged, IUtfChar<TChar>
2598Span<char> buffer = GetFreshStringSpan(result);
2603private static bool TryUInt128ToBinaryStr<TChar>(Int128 value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2627private static void UInt128ToBinaryChars<TChar>(Span<TChar> buffer, UInt128 value) where TChar : unmanaged, IUtfChar<TChar>
2647Span<byte> digits = number.Digits;
2675private static void UInt128ToDecChars(UInt128 value, Span<char> buffer)
2694internal static int UInt128ToDecChars<TChar>(Span<TChar> buffer, int index, UInt128 value) where TChar : unmanaged, IUtfChar<TChar>
2706internal static int UInt128ToDecChars<TChar>(Span<TChar> buffer, int index, UInt128 value, int digits) where TChar : unmanaged, IUtfChar<TChar>
2727Span<char> buffer = GetFreshStringSpan(result);
2741Span<char> buffer = GetFreshStringSpan(result);
2746private static bool TryUInt128ToDecStr<TChar>(UInt128 value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Grisu3.cs (6)
362private static bool TryRunCounted(in DiyFp w, int requestedDigits, Span<byte> buffer, out int length, out int decimalExponent)
410private static bool TryRunShortest(in DiyFp boundaryMinus, in DiyFp w, in DiyFp boundaryPlus, Span<byte> buffer, out int length, out int decimalExponent)
513private static bool TryDigitGenCounted(in DiyFp w, int requestedDigits, Span<byte> buffer, out int length, out int kappa)
682private static bool TryDigitGenShortest(in DiyFp low, in DiyFp w, in DiyFp high, Span<byte> buffer, out int length, out int kappa)
847private static bool TryRoundWeedCounted(Span<byte> buffer, int length, ulong rest, ulong tenKappa, ulong unit, ref int kappa)
920private static bool TryRoundWeedShortest(Span<byte> buffer, int length, ulong distanceTooHighW, ulong unsafeInterval, ulong rest, ulong tenKappa, ulong unit)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (10)
423public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
429public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
1017/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
1018bool IFloatingPoint<BFloat16>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
1031/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
1032bool IFloatingPoint<BFloat16>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
1045/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
1046bool IFloatingPoint<BFloat16>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
1059/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
1060bool IFloatingPoint<BFloat16>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BigIntegerCalculator.Shared.cs (41)
30public static void InitializeForDebug(Span<nuint> bits)
109public static void RightShiftSelf(Span<nuint> bits, int shift, out nuint carry)
123Span<nuint> remaining = bits;
165internal static void DivideByPowerOfTwo(ReadOnlySpan<nuint> left, int exponent, Span<nuint> quotient)
299internal static nuint Mul1(Span<nuint> result, ReadOnlySpan<nuint> left, nuint multiplier)
350internal static nuint MulAdd1(Span<nuint> result, ReadOnlySpan<nuint> left, nuint multiplier)
405internal static nuint SubMul1(Span<nuint> result, ReadOnlySpan<nuint> right, nuint multiplier)
480private static void CopyTail(ReadOnlySpan<nuint> source, Span<nuint> dest, int start)
485public static void Add(ReadOnlySpan<nuint> left, nuint right, Span<nuint> bits)
493public static void Add(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits)
538Span<nuint> bits)
569Span<nuint> resultMagnitude = bits.Slice(
582public static void AddSelf(Span<nuint> left, ReadOnlySpan<nuint> right)
609public static void Subtract(ReadOnlySpan<nuint> left, nuint right, Span<nuint> bits)
618public static void Subtract(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits)
646public static void SubtractSelf(Span<nuint> left, ReadOnlySpan<nuint> right)
674private static void Add(ReadOnlySpan<nuint> left, Span<nuint> bits, int startIndex, nuint initialCarry)
721private static void Subtract(ReadOnlySpan<nuint> left, Span<nuint> bits, int startIndex, nuint initialBorrow)
768public static void MultiplyNaive(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits)
787internal static void MultiplyNaiveSparse(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits)
823Span<nuint> bits)
915Span<nuint> bits)
936Span<nuint> bits)
1080static void ShiftProduct(Span<nuint> bits, int length, int shift)
1103public static void Multiply(ReadOnlySpan<nuint> left, nuint right, Span<nuint> bits)
1137private static void MultiplyByPowerOfTwo(ReadOnlySpan<nuint> value, int exponent, Span<nuint> bits)
1140Span<nuint> shifted = bits.Slice(limbShift, value.Length);
1162public static void Divide(ReadOnlySpan<nuint> left, nuint right, Span<nuint> quotient, out nuint remainder)
1186public static void Divide(ReadOnlySpan<nuint> left, nuint right, Span<nuint> quotient)
1223Span<nuint> quotient,
1240private static void DivideCore(ReadOnlySpan<nuint> left, nuint right, Span<nuint> quotient, ref nuint carry)
1325Span<nuint> quotient,
1365Span<nuint> quotient,
1512Span<nuint> quotient,
1610internal static void DivideGrammarSchoolSpecial(Span<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> quotient)
1624Span<nuint> reducedLeft = left[commonOffset..];
1648internal static void DivideGrammarSchool(Span<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> quotient)
1739private static nuint AddDivisor(Span<nuint> left, ReadOnlySpan<nuint> right)
1756private static nuint SubtractDivisor(Span<nuint> left, ReadOnlySpan<nuint> right, nuint q)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (12)
329/// <inheritdoc cref="ISpanFormattable.TryFormat(Span{char}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
330public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
335/// <inheritdoc cref="IUtf8SpanFormattable.TryFormat(Span{byte}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
336public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
872/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
873bool IFloatingPoint<Decimal128>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
885/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
886bool IFloatingPoint<Decimal128>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
898/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
899bool IFloatingPoint<Decimal128>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
911/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
912bool IFloatingPoint<Decimal128>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (12)
323/// <inheritdoc cref="ISpanFormattable.TryFormat(Span{char}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
324public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
329/// <inheritdoc cref="IUtf8SpanFormattable.TryFormat(Span{byte}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
330public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
883/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
884bool IFloatingPoint<Decimal32>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
896/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
897bool IFloatingPoint<Decimal32>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
909/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
910bool IFloatingPoint<Decimal32>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
922/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
923bool IFloatingPoint<Decimal32>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (12)
326/// <inheritdoc cref="ISpanFormattable.TryFormat(Span{char}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
327public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
332/// <inheritdoc cref="IUtf8SpanFormattable.TryFormat(Span{byte}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
333public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
876/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
877bool IFloatingPoint<Decimal64>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
889/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
890bool IFloatingPoint<Decimal64>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
902/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
903bool IFloatingPoint<Decimal64>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
915/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
916bool IFloatingPoint<Decimal64>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncProfiler.cs (14)
250Span<byte> payloadSpan = eventBuffer.Data.AsSpan(eventBuffer.Index, maxPayloadLength);
315Span<byte> payloadSpan = eventBuffer.Data.AsSpan(eventBuffer.Index, MaxPayloadLength);
432public static int WriteCompressedInt32(Span<byte> buffer, int value)
438public static int WriteCompressedUInt32(Span<byte> buffer, uint value)
459public static int WriteCompressedInt64(Span<byte> buffer, long value)
465public static int WriteCompressedUInt64(Span<byte> buffer, ulong value)
497Span<byte> headerSpan = eventBuffer.Data.AsSpan(0, MaxEventHeaderSize);
594Span<byte> headerSpan = buffer.AsSpan(index, MaxAsyncEventHeaderSize);
638Span<byte> headerSpan = buffer.AsSpan(index, MaxAsyncEventHeaderSize);
824Span<byte> headerSpan = eventBuffer.Data.AsSpan(0, Serializer.MaxEventHeaderSize);
990Span<byte> payload = eventBuffer.Data.AsSpan(eventBuffer.Index, MaxPayloadLength);
1061Span<byte> payload = eventBuffer.Data.AsSpan(eventBuffer.Index, MaxPayloadLength);
1668Span<byte> callstackSpan = buffer.AsSpan(index);
1846Span<byte> callstackHeaderSpan = eventBuffer.Data.AsSpan(index, MaxCallstackHeaderSize);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SpanMarshaller.cs (17)
13/// Supports marshalling a <see cref="Span{T}"/> from managed value
19/// A <see cref="Span{T}"/> marshalled with this marshaller will match the semantics of <see cref="MemoryMarshal.GetReference{T}(Span{T})"/>.
23[CustomMarshaller(typeof(Span<>), MarshalMode.Default, typeof(SpanMarshaller<,>))]
24[CustomMarshaller(typeof(Span<>), MarshalMode.ManagedToUnmanagedIn, typeof(SpanMarshaller<,>.ManagedToUnmanagedIn))]
35public static TUnmanagedElement* AllocateContainerForUnmanagedElements(Span<T> managed, out int numElements)
57public static ReadOnlySpan<T> GetManagedValuesSource(Span<T> managed)
66public static Span<TUnmanagedElement> GetUnmanagedValuesDestination(TUnmanagedElement* unmanaged, int numElements)
80public static Span<T> AllocateContainerForManagedElements(TUnmanagedElement* unmanaged, int numElements)
93public static Span<T> GetManagedValuesDestination(Span<T> managed)
125private Span<T> _managedArray;
127private Span<TUnmanagedElement> _span;
138public void FromManaged(Span<T> managed, Span<TUnmanagedElement> buffer)
174public Span<TUnmanagedElement> GetUnmanagedValuesDestination() => _span;
203public static ref T GetPinnableReference(Span<T> managed)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (10)
860public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) => _value.TryFormat(destination, out charsWritten, format, provider);
863public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) => _value.TryFormat(utf8Destination, out bytesWritten, format, provider);
1042/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
1043bool IFloatingPoint<NFloat>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
1048/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
1049bool IFloatingPoint<NFloat>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
1054/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
1055bool IFloatingPoint<NFloat>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
1060/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
1061bool IFloatingPoint<NFloat>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (6)
122public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
128public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
431/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
432bool IBinaryInteger<sbyte>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
445/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
446bool IBinaryInteger<sbyte>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (14)
373public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
379public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
716internal bool TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
729/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
730bool IFloatingPoint<float>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
735internal bool TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
748/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
749bool IFloatingPoint<float>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
754internal bool TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
766/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
767bool IFloatingPoint<float>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
772internal bool TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
784/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
785bool IFloatingPoint<float>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (18)
26/// <remarks>In-place conversion is prohibited, please use <see cref="ToUpperInPlace(Span{byte}, out int)"/> for that.</remarks>
28public static OperationStatus ToUpper(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
39/// <remarks>In-place conversion is prohibited, please use <see cref="ToUpperInPlace(Span{char}, out int)"/> for that.</remarks>
41public static OperationStatus ToUpper(ReadOnlySpan<char> source, Span<char> destination, out int charsWritten)
53public static OperationStatus ToUpper(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
65public static OperationStatus ToUpper(ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten)
76/// <remarks>In-place conversion is prohibited, please use <see cref="ToLowerInPlace(Span{byte}, out int)"/> for that.</remarks>
78public static OperationStatus ToLower(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
89/// <remarks>In-place conversion is prohibited, please use <see cref="ToLowerInPlace(Span{char}, out int)"/> for that.</remarks>
91public static OperationStatus ToLower(ReadOnlySpan<char> source, Span<char> destination, out int charsWritten)
103public static OperationStatus ToLower(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
115public static OperationStatus ToLower(ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten)
125public static OperationStatus ToLowerInPlace(Span<byte> value, out int bytesWritten)
135public static OperationStatus ToLowerInPlace(Span<char> value, out int charsWritten)
145public static OperationStatus ToUpperInPlace(Span<byte> value, out int bytesWritten)
155public static OperationStatus ToUpperInPlace(Span<char> value, out int charsWritten)
158private static unsafe OperationStatus ChangeCase<TFrom, TTo, TCasing>(ReadOnlySpan<TFrom> source, Span<TTo> destination, out int destinationElementsWritten)
193private static unsafe OperationStatus ChangeCase<T, TCasing>(Span<T> buffer, out int elementsWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\ASCIIEncoding.cs (7)
315public override unsafe int GetBytes(ReadOnlySpan<char> chars, Span<byte> bytes)
327public override unsafe bool TryGetBytes(ReadOnlySpan<char> chars, Span<byte> bytes, out int bytesWritten)
382private protected sealed override int GetBytesWithFallback(ReadOnlySpan<char> chars, int originalCharsLength, Span<byte> bytes, int originalBytesLength, EncoderNLS? encoder, bool throwForDestinationOverflow = true)
606public override unsafe int GetChars(ReadOnlySpan<byte> bytes, Span<char> chars)
618public override unsafe bool TryGetChars(ReadOnlySpan<byte> bytes, Span<char> chars, out int charsWritten)
671private protected sealed override int GetCharsWithFallback(ReadOnlySpan<byte> bytes, int originalBytesLength, Span<char> chars, int originalCharsLength, DecoderNLS? decoder, bool throwForDestinationOverflow = true)
779internal sealed override OperationStatus EncodeRune(Rune value, Span<byte> bytes, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\DecoderNLS.cs (4)
234Span<byte> combinedBuffer = [0, 0, 0, 0];
278internal int DrainLeftoverDataForGetChars(ReadOnlySpan<byte> bytes, Span<char> chars, out int bytesConsumed)
290Span<byte> combinedBuffer = [0, 0, 0, 0];
377private static int ConcatInto(ReadOnlySpan<byte> srcLeft, ReadOnlySpan<byte> srcRight, Span<byte> dest)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Encoding.Internal.cs (6)
80internal virtual OperationStatus EncodeRune(Rune value, Span<byte> bytes, out int bytesWritten)
513/// after data has been drained, then to call <see cref="GetBytesWithFallback(ReadOnlySpan{char}, int, Span{byte}, int, EncoderNLS, bool)"/>.
533Span<byte> bytes = new Span<byte>(pOriginalBytes, originalByteCount).Slice(bytesWrittenSoFar);
587private protected virtual unsafe int GetBytesWithFallback(ReadOnlySpan<char> chars, int originalCharsLength, Span<byte> bytes, int originalBytesLength, EncoderNLS? encoder, bool throwForDestinationOverflow = true)
1135Span<char> chars = new Span<char>(pOriginalChars, originalCharCount).Slice(charsWrittenSoFar);
1188private protected virtual unsafe int GetCharsWithFallback(ReadOnlySpan<byte> bytes, int originalBytesLength, Span<char> chars, int originalCharsLength, DecoderNLS? decoder, bool throwForDestinationOverflow = true)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (11)
232Span<char> original = stackalloc char[MaxUtf16CharsPerRune];
233Span<char> modified = stackalloc char[MaxUtf16CharsPerRune];
299internal ReadOnlySpan<char> AsSpan(Span<char> buffer)
760public int EncodeToUtf16(Span<char> destination)
778public int EncodeToUtf8(Span<byte> destination)
968bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
971bool IUtf8SpanFormattable.TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
1136public bool TryEncodeToUtf16(Span<char> destination, out int charsWritten)
1143private static bool TryEncodeToUtf16(Rune value, Span<char> destination, out int charsWritten)
1180public bool TryEncodeToUtf8(Span<byte> destination, out int bytesWritten)
1187private static bool TryEncodeToUtf8(Rune value, Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (13)
45public static unsafe OperationStatus FromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsRead, out int bytesWritten, bool replaceInvalidSequences = true, bool isFinalBlock = true)
131public static unsafe OperationStatus ToUtf16(ReadOnlySpan<byte> source, Span<char> destination, out int bytesRead, out int charsWritten, bool replaceInvalidSequences = true, bool isFinalBlock = true)
218internal static unsafe OperationStatus ToUtf16PreservingReplacement(ReadOnlySpan<byte> source, Span<char> destination, out int bytesRead, out int charsWritten, bool replaceInvalidSequences = true, bool isFinalBlock = true)
322public static bool TryWrite(Span<byte> destination, [InterpolatedStringHandlerArgument(nameof(destination))] ref TryWriteInterpolatedStringHandler handler, out int bytesWritten)
342public static bool TryWrite(Span<byte> destination, IFormatProvider? provider, [InterpolatedStringHandlerArgument(nameof(destination), nameof(provider))] ref TryWriteInterpolatedStringHandler handler, out int bytesWritten) =>
353private readonly Span<byte> _destination;
363/// <summary>Creates a handler used to write an interpolated string into a UTF-8 <see cref="Span{Byte}"/>.</summary>
369public TryWriteInterpolatedStringHandler(int literalLength, int formattedCount, Span<byte> destination, out bool shouldAppend)
378/// <summary>Creates a handler used to write an interpolated string into a UTF-8 <see cref="Span{Byte}"/>.</summary>
385public TryWriteInterpolatedStringHandler(int literalLength, int formattedCount, Span<byte> destination, IFormatProvider? provider, out bool shouldAppend)
402Span<byte> dest = _destination.Slice(_pos);
686Span<char> utf16 = stackalloc char[256];
733Span<char> utf16 = stackalloc char[256];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (6)
361public override unsafe int GetBytes(ReadOnlySpan<char> chars, Span<byte> bytes)
373public override unsafe bool TryGetBytes(ReadOnlySpan<char> chars, Span<byte> bytes, out int bytesWritten)
556public override unsafe int GetChars(ReadOnlySpan<byte> bytes, Span<char> chars)
568public override unsafe bool TryGetChars(ReadOnlySpan<byte> bytes, Span<char> chars, out int charsWritten)
634private protected sealed override int GetCharsWithFallback(ReadOnlySpan<byte> bytes, int originalBytesLength, Span<char> chars, int originalCharsLength, DecoderNLS? decoder, bool throwForDestinationOverflow = true)
777internal sealed override OperationStatus EncodeRune(Rune value, Span<byte> bytes, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (3)
1016public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
1020public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
1023private bool TryFormatCore<TChar>(Span<TChar> destination, out int written, [StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] ReadOnlySpan<char> format, IFormatProvider? provider) where TChar : unmanaged, IUtfChar<TChar>
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (6)
121public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
127public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
1212/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
1213bool IBinaryInteger<UInt128>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
1225/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
1226bool IBinaryInteger<UInt128>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (6)
114public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
120public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
379/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
380bool IBinaryInteger<ushort>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
392/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
393bool IBinaryInteger<ushort>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (6)
130public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
136public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
443/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
444bool IBinaryInteger<uint>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
456/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
457bool IBinaryInteger<uint>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (6)
129public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
135public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
450/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
451bool IBinaryInteger<ulong>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
463/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
464bool IBinaryInteger<ulong>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (6)
230public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
234public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
455/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
456bool IBinaryInteger<nuint>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
468/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
469bool IBinaryInteger<nuint>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Version.cs (12)
174Span<char> dest = stackalloc char[(4 * Number.Int32NumberBufferLength) + 3]; // at most 4 Int32s and 3 periods
183public bool TryFormat(Span<char> destination, out int charsWritten) =>
186public bool TryFormat(Span<char> destination, int fieldCount, out int charsWritten) =>
193public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten) =>
201public bool TryFormat(Span<byte> utf8Destination, int fieldCount, out int bytesWritten) =>
204private bool TryFormatCore<TChar>(Span<TChar> destination, int fieldCount, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
253((uint)value).TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(destination), out valueCharsWritten) :
254((uint)value).TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination), out valueCharsWritten, default, CultureInfo.InvariantCulture);
270bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
275bool IUtf8SpanFormattable.TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
System\Reflection\DynamicInvokeInfo.cs (29)
255Span<object?> parameters)
318Span<object?> parameters)
435Span<object?> copyOfParameters = new(ref Unsafe.As<IntPtr, object?>(ref *pStorage), argCount);
436Span<bool> shouldCopyBack = stackalloc bool[argCount];
466IntPtr methodToCall, ref byte thisArg, ref byte ret, ref object? returnObject, Span<object?> parameters)
485Span<object?> copyOfParameters = new(ref Unsafe.As<IntPtr, object?>(ref *pStorage), argCount);
486Span<bool> shouldCopyBack = stackalloc bool[argCount];
514Span<object?> copyOfParameters = argStorage;
519Span<bool> shouldCopyBack = ((Span<bool>)copyBackStorage).Slice(0, _argumentCount);
543IntPtr methodToCall, ref byte thisArg, ref byte ret, ref object? returnObject, Span<object?> parameters)
548Span<object?> copyOfParameters = ((Span<object?>)argStorage).Slice(0, _argumentCount);
552Span<bool> shouldCopyBack = ((Span<bool>)copyBackStorage).Slice(0, _argumentCount);
568IntPtr methodToCall, ref byte thisArg, ref byte ret, ref object? returnObject, Span<object?> parameters)
608Span<object?> copyOfParameters,
612Span<bool> shouldCopyBack)
708Span<object?> copyOfParameters,
710Span<object?> parameters)
715Span<bool> shouldCopyBack = ((Span<bool>)copyBackStorage).Slice(0, parameters.Length);
720Span<object?> copyOfParameters,
722Span<object?> parameters,
723Span<bool> shouldCopyBack)
795private unsafe void CopyBackToArray(ref object? src, object?[] dest, Span<bool> shouldCopyBack)
829private unsafe void CopyBackToSpan(Span<object?> src, Span<object?> dest, Span<bool> shouldCopyBack)
System.Private.CoreLib.Generators (8)
System.Private.DataContractSerialization (30)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System\Xml\XmlBinaryWriter.cs (10)
736Span<byte> span = GetTextNodeBuffer(1 + sizeof(float), out int offset).AsSpan(offset, 1 + sizeof(float));
761Span<byte> span = GetTextNodeBuffer(1 + sizeof(double), out int offset).AsSpan(offset, 1 + sizeof(double));
777Span<int> bits = [0, 0, 0, 0];
781Span<byte> span = GetTextNodeBuffer(1 + sizeof(decimal), out int offset).AsSpan(offset, 1 + sizeof(decimal));
813Span<byte> span = GetTextNodeBuffer(17, out int offset).AsSpan(offset, 17);
924Span<byte> span = GetBuffer(sizeof(float), out int bufferOffset).AsSpan(bufferOffset, sizeof(float));
942Span<byte> span = GetBuffer(sizeof(double), out int bufferOffset).AsSpan(bufferOffset, sizeof(double));
957Span<int> bits = [0, 0, 0, 0];
964Span<byte> span = GetBuffer(16, out int bufferOffset).AsSpan(bufferOffset, 16);
995Span<byte> bytes = GetBuffer(16, out int bufferOffset).AsSpan(bufferOffset, 16);
System.Private.Reflection.Execution (15)
System.Private.StackTraceMetadata (1)
System.Private.TypeLoader (4)
System.Private.Uri (43)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System\Uri.cs (6)
1078Span<char> slashSpan = result.RawChars.Slice(0, result.Length);
1398return string.Create(3, (byte)character, (Span<char> chars, byte b) =>
1589public bool TryFormat(Span<char> destination, out int charsWritten)
1657bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
2722private bool TryRecreateParts(scoped Span<char> span, out int charsWritten, UriComponents parts, ushort nonCanonical, UriFormat formatAs)
4360Span<char> chars = vsb.RawChars.Slice(0, vsb.Length);
System.Private.Windows.Core (143)
Windows\Win32\System\Variant\VARIANT.cs (33)
336Span<VARIANT_BOOL> data = new(psa->pvData, array.Length);
337var result = GetSpan<bool>(array);
348Span<DECIMAL> data = new(psa->pvData, array.Length);
349var result = GetSpan<decimal>(array);
360Span<long> data = new(psa->pvData, array.Length);
361var result = GetSpan<decimal>(array);
372Span<double> data = new(psa->pvData, array.Length);
373var result = GetSpan<DateTime>(array);
384Span<IntPtr> data = new(psa->pvData, array.Length);
385var result = GetSpan<string?>(array);
397Span<IntPtr> data = new(psa->pvData, array.Length);
398var result = GetSpan<object?>(array);
409Span<VARIANT> data = new(psa->pvData, array.Length);
410var result = GetSpan<object?>(array);
461Span<int> indices = stackalloc int[array.Rank];
462Span<int> lower = stackalloc int[array.Rank];
463Span<int> upper = stackalloc int[array.Rank];
475static void InternalTransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType, Span<int> indices, Span<int> lower, Span<int> upper)
512private static void SetArrayValue(SAFEARRAY* psa, Array array, Span<int> indices, Span<int> lowerBounds, VARENUM arrayType)
514static void SetValue<T>(Array array, T value, Span<int> indices, Span<int> lowerBounds)
518var span = GetSpan<T>(array);
768Span<VARIANT_BOOL> data = new(ca.pElems, (int)ca.cElems);
795Span<long> data = new(ca.pElems, (int)ca.cElems);
807Span<double> data = new(ca.pElems, (int)ca.cElems);
819var data = new Span<FILETIME>(ca.pElems, (int)ca.cElems);
834Span<IntPtr> data = new(ca.pElems, (int)ca.cElems);
846Span<IntPtr> data = new(ca.pElems, (int)ca.cElems);
858Span<VARIANT> data = new(ca.pElems, (int)ca.cElems);
875private static Span<T> GetSpan<T>(Array array)
System.Private.Windows.Core.TestUtilities (1)
System.Private.Windows.GdiPlus (14)
Generated\361d1da7f942c932\Windows.Win32.PInvokeGdiPlus.gdiplus.dll.g.cs (12)
997 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateBitmapFromScan0(int width, int height, int stride, int format, [Optional] Span<byte> scan0, out winmdroot.Graphics.GdiPlus.GpBitmap* bitmap)
3613 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipGetFamilyName(in winmdroot.Graphics.GdiPlus.GpFontFamily family, Span<char>name, ushort language)
3895 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipGetImageDecoders(uint numDecoders, Span<byte> decoders)
3952 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipGetImageEncoders(uint numEncoders, Span<byte> encoders)
4747 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipGetPathGradientSurroundColorsWithCount(in winmdroot.Graphics.GdiPlus.GpPathGradient brush, Span<uint> color, ref int count)
4834 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipGetPathTypes(in winmdroot.Graphics.GdiPlus.GpPath path, Span<byte> types)
5338 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipGetRegionData(ref winmdroot.Graphics.GdiPlus.GpRegion region, Span<byte> buffer, out uint sizeFilled)
5354 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipGetRegionData(ref winmdroot.Graphics.GdiPlus.GpRegion region, Span<byte> buffer)
6465 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipPathIterCopyData(ref winmdroot.Graphics.GdiPlus.GpPathIterator iterator, out int resultCount, out winmdroot.Graphics.GdiPlus.PointF points, Span<byte> types, int startIndex, int endIndex)
6487 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipPathIterEnumerate(ref winmdroot.Graphics.GdiPlus.GpPathIterator iterator, out int resultCount, Span<winmdroot.Graphics.GdiPlus.PointF> points, Span<byte> types)
6622 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipPathIterNextPathType(ref winmdroot.Graphics.GdiPlus.GpPathIterator iterator, out int resultCount, Span<byte> pathType, out int startIndex, out int endIndex)
System.Private.Xml (64)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System\Xml\XmlConvert.cs (20)
1639internal static bool TryFormat(bool value, Span<char> destination, out int charsWritten)
1647internal static bool TryFormat(char value, Span<char> destination, out int charsWritten)
1656internal static bool TryFormat(decimal value, Span<char> destination, out int charsWritten)
1661internal static bool TryFormat(sbyte value, Span<char> destination, out int charsWritten)
1666internal static bool TryFormat(short value, Span<char> destination, out int charsWritten)
1671internal static bool TryFormat(int value, Span<char> destination, out int charsWritten)
1676internal static bool TryFormat(long value, Span<char> destination, out int charsWritten)
1681internal static bool TryFormat(byte value, Span<char> destination, out int charsWritten)
1686internal static bool TryFormat(ushort value, Span<char> destination, out int charsWritten)
1691internal static bool TryFormat(uint value, Span<char> destination, out int charsWritten)
1696internal static bool TryFormat(ulong value, Span<char> destination, out int charsWritten)
1701internal static bool TryFormat(float value, Span<char> destination, out int charsWritten)
1725internal static bool TryFormat(double value, Span<char> destination, out int charsWritten)
1749internal static bool TryFormat(TimeSpan value, Span<char> destination, out int charsWritten)
1754internal static bool TryFormat(DateTime value, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string format, Span<char> destination, out int charsWritten)
1759internal static bool TryFormat(DateTime value, Span<char> destination, out int charsWritten)
1764internal static bool TryFormat(DateTime value, XmlDateTimeSerializationMode dateTimeOption, Span<char> destination, out int charsWritten)
1791internal static bool TryFormat(DateTimeOffset value, Span<char> destination, out int charsWritten)
1797internal static bool TryFormat(DateTimeOffset value, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string format, Span<char> destination, out int charsWritten)
1802internal static bool TryFormat(Guid value, Span<char> destination, out int charsWritten)
System.Reflection.Metadata (21)
System.Resources.Extensions (1)
System.Runtime (1)
System.Runtime.InteropServices.JavaScript (37)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JSImports.g.cs (11)
45global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __self_native, __propertyName_native];
98global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __self_native, __propertyName_native];
151global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __self_native, __propertyName_native];
204global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __self_native, __propertyName_native];
257global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __self_native, __propertyName_native];
310global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __self_native, __propertyName_native];
363global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __self_native, __propertyName_native];
416global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __self_native, __propertyName_native];
756global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native];
802global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native];
858global::System.Span<global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument> __arguments_buffer = [____arg_exception_native, ____arg_return_native, __moduleName_native, __moduleUrl_native];
System.Runtime.Numerics (458)
src\runtime\src\libraries\Common\src\System\Number.Formatting.Common.cs (14)
233internal static void WriteTwoDigits<TChar>(uint value, Span<TChar> destination) where TChar : unmanaged, IUtfChar<TChar>
243MemoryMarshal.Write(MemoryMarshal.AsBytes(Unsafe.BitCast<Span<TChar>, Span<char>>(destination)), in pair);
249MemoryMarshal.Write(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination), in pair);
254internal static void WriteTwoDigits<TChar>(uint value, Span<TChar> buffer, int index) where TChar : unmanaged, IUtfChar<TChar>
261internal static void CopyNegativeSign<TChar>(ReadOnlySpan<TChar> sign, Span<TChar> destination)
274internal static int UInt32ToDecChars<TChar>(Span<TChar> buffer, int index, uint value) where TChar : unmanaged, IUtfChar<TChar>
303internal static int UInt32ToDecChars<TChar>(Span<TChar> buffer, int index, uint value, int digits) where TChar : unmanaged, IUtfChar<TChar>
645Span<int> thousandsSepPos = [0, 0, 0, 0];
1033Span<TChar> buffer = vlb.AppendSpan(bufferSize);
1043Span<TChar> groupBuffer = buffer.Slice(groupStartWrite, digitsInGroup);
1250Span<TChar> digits = vlb.AppendSpan(digitCount);
1349Span<byte> dig = number.Digits;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BigIntegerCalculator.Shared.cs (41)
30public static void InitializeForDebug(Span<nuint> bits)
109public static void RightShiftSelf(Span<nuint> bits, int shift, out nuint carry)
123Span<nuint> remaining = bits;
165internal static void DivideByPowerOfTwo(ReadOnlySpan<nuint> left, int exponent, Span<nuint> quotient)
299internal static nuint Mul1(Span<nuint> result, ReadOnlySpan<nuint> left, nuint multiplier)
350internal static nuint MulAdd1(Span<nuint> result, ReadOnlySpan<nuint> left, nuint multiplier)
405internal static nuint SubMul1(Span<nuint> result, ReadOnlySpan<nuint> right, nuint multiplier)
480private static void CopyTail(ReadOnlySpan<nuint> source, Span<nuint> dest, int start)
485public static void Add(ReadOnlySpan<nuint> left, nuint right, Span<nuint> bits)
493public static void Add(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits)
538Span<nuint> bits)
569Span<nuint> resultMagnitude = bits.Slice(
582public static void AddSelf(Span<nuint> left, ReadOnlySpan<nuint> right)
609public static void Subtract(ReadOnlySpan<nuint> left, nuint right, Span<nuint> bits)
618public static void Subtract(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits)
646public static void SubtractSelf(Span<nuint> left, ReadOnlySpan<nuint> right)
674private static void Add(ReadOnlySpan<nuint> left, Span<nuint> bits, int startIndex, nuint initialCarry)
721private static void Subtract(ReadOnlySpan<nuint> left, Span<nuint> bits, int startIndex, nuint initialBorrow)
768public static void MultiplyNaive(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits)
787internal static void MultiplyNaiveSparse(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits)
823Span<nuint> bits)
915Span<nuint> bits)
936Span<nuint> bits)
1080static void ShiftProduct(Span<nuint> bits, int length, int shift)
1103public static void Multiply(ReadOnlySpan<nuint> left, nuint right, Span<nuint> bits)
1137private static void MultiplyByPowerOfTwo(ReadOnlySpan<nuint> value, int exponent, Span<nuint> bits)
1140Span<nuint> shifted = bits.Slice(limbShift, value.Length);
1162public static void Divide(ReadOnlySpan<nuint> left, nuint right, Span<nuint> quotient, out nuint remainder)
1186public static void Divide(ReadOnlySpan<nuint> left, nuint right, Span<nuint> quotient)
1223Span<nuint> quotient,
1240private static void DivideCore(ReadOnlySpan<nuint> left, nuint right, Span<nuint> quotient, ref nuint carry)
1325Span<nuint> quotient,
1365Span<nuint> quotient,
1512Span<nuint> quotient,
1610internal static void DivideGrammarSchoolSpecial(Span<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> quotient)
1624Span<nuint> reducedLeft = left[commonOffset..];
1648internal static void DivideGrammarSchool(Span<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> quotient)
1739private static nuint AddDivisor(Span<nuint> left, ReadOnlySpan<nuint> right)
1756private static nuint SubtractDivisor(Span<nuint> left, ReadOnlySpan<nuint> right, nuint q)
System\Number.BigInteger.cs (50)
102scoped Span<byte> buffer;
300Span<nuint> wholeBlockDestination = bits.AsSpan(0, wholeBlockCount);
392scoped Span<nuint> base1E9;
445Span<nuint> resultBuffer = BigInteger.RentedBuffer.Create(resultLength, out BigInteger.RentedBuffer resultRental);
466static void DivideAndConquer(ReadOnlySpan<nuint> base1E9, int trailingZeroCount, scoped Span<nuint> bits)
477Span<nuint> leading = BigInteger.RentedBuffer.Create(leadingLength, out BigInteger.RentedBuffer leadingBuffer);
492static void Recursive(in PowersOf1e9 powersOf1e9, int powersOf1e9Index, ReadOnlySpan<nuint> base1E9, Span<nuint> bits)
517scoped Span<nuint> buffer = BigInteger.RentedBuffer.Create(bufferLength, out BigInteger.RentedBuffer bufferRental);
522Span<nuint> bitsUpper = bits.Slice(multiplierTrailingZeroCount, buffer2.Length + multiplier.Length);
534static void Naive(ReadOnlySpan<nuint> base1E9, int trailingZeroCount, scoped Span<nuint> bits)
567static int NaiveBase1E9ToBits(ReadOnlySpan<nuint> base1E9, Span<nuint> bits)
589static nuint MultiplyAdd(Span<nuint> bits, nuint multiplier, nuint addValue)
616private static string? FormatBigIntegerToHex<TChar>(bool targetSpan, BigInteger value, char format, int digits, NumberFormatInfo info, Span<TChar> destination, out int charsWritten, out bool spanSuccess)
623Span<byte> bits = stackalloc byte[64]; // arbitrary threshold
663Span<TChar> chars = sb.AppendSpan((cur + 1) * 2);
702private static string? FormatBigIntegerToBinary<TChar>(bool targetSpan, BigInteger value, int digits, Span<TChar> destination, out int charsWritten, out bool spanSuccess)
707Span<byte> bytes = stackalloc byte[64]; // arbitrary threshold
810internal static bool TryFormatBigInteger<TChar>(BigInteger value, ReadOnlySpan<char> format, NumberFormatInfo info, Span<TChar> destination, out int charsWritten)
817private static string? FormatBigInteger<TChar>(bool targetSpan, BigInteger value, string? formatString, ReadOnlySpan<char> formatSpan, NumberFormatInfo info, Span<TChar> destination, out int charsWritten, out bool spanSuccess)
872Span<nuint> base1E9Buffer = BigInteger.RentedBuffer.Create(base1E9BufferLength, out BigInteger.RentedBuffer base1E9Rental);
924BigIntegerToDecChars(Unsafe.BitCast<Span<char>, Span<Utf16Char>>(span.Slice(state.sNegative.Length)), state.base1E9Value, state.digits);
931Span<byte> numberBuffer = valueDigits + 1 <= CharStackBufferSize ?
935BigIntegerToDecChars(Unsafe.BitCast<Span<byte>, Span<Utf8Char>>(number.Digits.Slice(0, valueDigits)), base1E9Value, valueDigits);
992private static void BigIntegerToDecChars<TChar>(Span<TChar> destination, ReadOnlySpan<nuint> base1E9Value, int digits)
1009private static bool TryFormatInt32<TChar>(int value, Span<TChar> destination, ReadOnlySpan<char> format, IFormatProvider? provider, out int charsWritten)
1014return value.TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination), out charsWritten, format, provider);
1018return value.TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(destination), out charsWritten, format, provider);
1040private static void BigIntegerToBase1E9(ReadOnlySpan<nuint> bits, Span<nuint> base1E9Buffer, out int base1E9Written)
1055static void DivideAndConquer(in PowersOf1e9 powersOf1e9, int powersIndex, ReadOnlySpan<nuint> bits, Span<nuint> base1E9Buffer, out int base1E9Written)
1077Span<nuint> upper = BigInteger.RentedBuffer.Create(upperLength, out BigInteger.RentedBuffer upperBuffer);
1080Span<nuint> lower = BigInteger.RentedBuffer.Create(lowerLength, out BigInteger.RentedBuffer lowerBuffer);
1112static void Naive(ReadOnlySpan<nuint> bits, Span<nuint> base1E9Buffer, out int base1E9Written)
1137static void NaiveDigit(uint digit, Span<nuint> base1E9Buffer, ref int base1E9Written)
1179PowersOf1e9 result = new((Span<nuint>)buffer);
1373public PowersOf1e9(Span<nuint> pow1E9)
1396Span<nuint> dst = pow1E9.Slice(toExclusive, src.Length << 1);
1475public void MultiplyPowerOfTen(ReadOnlySpan<nuint> left, int trailingZeroCount, Span<nuint> bits)
1484Span<nuint> powersOfTen = BigInteger.RentedBuffer.Create(bits.Length, out BigInteger.RentedBuffer powersOfTenBuffer);
1485scoped Span<nuint> powersOfTen2 = bits;
1515Span<nuint> src = powersOfTen.Slice(0, curLength);
1516Span<nuint> dst = powersOfTen2.Slice(0, curLength += power.Length);
1520Span<nuint> tmp = powersOfTen;
1532Span<nuint> bits2 = bits.Slice(omittedLength, curLength += left.Length);
1602static virtual bool TryParseWholeBlocks(ReadOnlySpan<TChar> input, Span<nuint> destination)
1633public static bool TryParseWholeBlocks(ReadOnlySpan<TChar> input, Span<nuint> destination)
1635Span<byte> bytes = MemoryMarshal.AsBytes(destination);
System\Numerics\BigInteger.cs (71)
259Span<int> bits = [0, 0, 0, 0];
421Span<byte> limbBytes = MemoryMarshal.AsBytes(val.AsSpan(0, wholeLimbCount));
439Span<nuint> limbSpan = val.AsSpan(0, wholeLimbCount);
581private BigInteger(Span<nuint> value)
942Span<nuint> quotient = RentedBuffer.Create(size, out RentedBuffer quotientBuffer);
975Span<nuint> rest = RentedBuffer.Create(size, out RentedBuffer restBuffer);
978Span<nuint> quotient = RentedBuffer.Create(size, out RentedBuffer quotientBuffer);
980Span<nuint> remainderBits = rest.Slice(commonOffset, dividendBits.Length);
1150Span<nuint> bits = RentedBuffer.Create(leftBits.Length, out RentedBuffer bitsBuffer);
1162Span<nuint> bits = RentedBuffer.Create(leftBits.Length + resultOffset, out RentedBuffer bitsBuffer);
1275Span<nuint> bits = RentedBuffer.Create(limbCount + 1, out RentedBuffer bitsBuffer);
1283private static void ShiftLeftInPlace(Span<nuint> bits, int shift)
1292Span<nuint> shiftedBits = bits.Slice(digitShift, length);
1352Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
1442Span<nuint> genericBits = RentedBuffer.Create(genericSize, out RentedBuffer genericBuffer);
1548Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
1621Span<nuint> firstBits = RentedBuffer.Create(firstSize, out RentedBuffer firstBuffer);
1630Span<nuint> secondBits = RentedBuffer.Create(secondSize, out RentedBuffer secondBuffer);
1666Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
1922public bool TryWriteBytes(Span<byte> destination, out int bytesWritten, bool isUnsigned = false, bool isBigEndian = false)
1934internal bool TryWriteOrCountBytes(Span<byte> destination, out int bytesWritten, bool isUnsigned = false, bool isBigEndian = false)
1940/// <summary>Gets the number of bytes that will be output by <see cref="ToByteArray(bool, bool)"/> and <see cref="TryWriteBytes(Span{byte}, out int, bool, bool)"/>.</summary>
1951/// <summary>Mode used to enable sharing <see cref="TryGetBytes(GetBytesMode, Span{byte}, bool, bool, ref int)"/> for multiple purposes.</summary>
1959/// <summary>Shared logic for <see cref="ToByteArray(bool, bool)"/>, <see cref="TryWriteBytes(Span{byte}, out int, bool, bool)"/>, and <see cref="GetByteCount"/>.</summary>
1975private byte[]? TryGetBytes(GetBytesMode mode, Span<byte> destination, bool isUnsigned, bool isBigEndian, ref int bytesWritten)
2112Span<byte> destBytes = destination.Slice(curByte, srcBytes.Length);
2187private int WriteTo(Span<nuint> buffer)
2322public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
2327public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
2355Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
2366Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
2377Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
2388Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
2433Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
2444Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
2453Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
2464Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
2490Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
2491Span<nuint> reducedBits = bits[commonOffset..];
2526Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
3266Span<nuint> z = RentedBuffer.Create(zLen, out RentedBuffer zBuffer);
3336Span<nuint> zd = z.AsSpan(digitShift, bits.Length);
3437Span<nuint> zd = RentedBuffer.Create(zLength, out RentedBuffer zdBuffer);
3477Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
3486Span<nuint> bits = RentedBuffer.Create(value._bits.Length, out RentedBuffer bitsBuffer);
3512Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
3520Span<nuint> bits = RentedBuffer.Create(value._bits.Length, out RentedBuffer bitsBuffer);
3541Span<nuint> bits = RentedBuffer.Create(value._bits.Length, out RentedBuffer bitsBuffer);
3550Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
3608Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
3619Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
3628Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
3639Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
3671Span<nuint> quotient = RentedBuffer.Create(size, out RentedBuffer quotientBuffer);
3703Span<nuint> quotient = RentedBuffer.Create(size, out RentedBuffer quotientBuffer);
3764Span<nuint> bits = RentedBuffer.Create(size, out RentedBuffer bitsBuffer);
3766Span<nuint> remainderBits = bits.Slice(commonOffset, dividendBits.Length);
4138Span<nuint> zd = RentedBuffer.Create(zLimbCount, out RentedBuffer zdBuffer);
4223Span<uint> words = MemoryMarshal.Cast<nuint, uint>(zd).Slice(0, zWordCount);
4248Span<uint> words = MemoryMarshal.Cast<nuint, uint>(zd).Slice(0, zWordCount);
4289private static void SwapHalvesWithinLimbs(Span<nuint> limbs)
4315Span<nuint> zd = RentedBuffer.Create(zLength, out RentedBuffer zdBuffer);
4429/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
4430bool IBinaryInteger<BigInteger>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
4446Span<byte> dest = destination;
4460Span<byte> dest = destination;
4507/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
4508bool IBinaryInteger<BigInteger>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
4524Span<byte> dest = destination;
4538Span<byte> dest = destination;
6084Span<nuint> zd = RentedBuffer.Create(zLength, out RentedBuffer zdBuffer);
System\Numerics\BigIntegerCalculator.DivRem.cs (48)
18public static void Divide(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> quotient, Span<nuint> remainder)
39public static void Divide(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> quotient)
49Span<nuint> leftCopy = BigInteger.RentedBuffer.Create(left.Length, out BigInteger.RentedBuffer leftCopyBuffer);
62public static void Remainder(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> remainder)
79Span<nuint> quotient = BigInteger.RentedBuffer.Create(quotientLength, out BigInteger.RentedBuffer quotientBuffer);
90Span<nuint> quotient,
91Span<nuint> remainder)
131Span<nuint> quotient)
150Span<nuint> leftCopy = BigInteger.RentedBuffer.Create(
172Span<nuint> remainder)
215private static void DivRem(Span<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> quotient)
239Span<nuint> leftCopy = BigInteger.RentedBuffer.Create(left.Length, out BigInteger.RentedBuffer leftCopyBuffer);
243Span<nuint> quotientAllocated = BigInteger.RentedBuffer.Create(quotientLength, out BigInteger.RentedBuffer quotientActualBuffer);
244Span<nuint> quotientActual = quotient.Length > 0 ? quotient : quotientAllocated;
256Span<nuint> quotient,
257Span<nuint> remainder,
277Span<nuint> quotient,
278Span<nuint> remainder,
288Span<nuint> rented = BigInteger.RentedBuffer.Create(rentedLength, out BigInteger.RentedBuffer sumBuffer);
289Span<nuint> sum = usesScratch
366static void SumChunks(ReadOnlySpan<nuint> value, int chunkLength, Span<nuint> sum)
390static void ReduceSum(Span<nuint> sum)
392Span<nuint> low = sum[..^1];
425private static void DivideBurnikelZiegler(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> quotient, Span<nuint> remainder)
448Span<nuint> b = BigInteger.RentedBuffer.Create(n, out BigInteger.RentedBuffer bBuffer);
461Span<nuint> a = BigInteger.RentedBuffer.Create(aLength, out BigInteger.RentedBuffer aBuffer);
463static void Normalize(ReadOnlySpan<nuint> src, int sigmaDigit, int sigmaSmall, Span<nuint> bits)
469Span<nuint> dst = bits.Slice(sigmaDigit);
497Span<nuint> r = BigInteger.RentedBuffer.Create(n + 1, out BigInteger.RentedBuffer rBuffer);
499Span<nuint> z = BigInteger.RentedBuffer.Create(2 * n, out BigInteger.RentedBuffer zBuffer);
503Span<nuint> quotientUpper = quotient.Slice((t - 2) * n);
506Span<nuint> q = BigInteger.RentedBuffer.Create(n, out BigInteger.RentedBuffer qBuffer);
538Span<nuint> rt = r.Slice(sigmaDigit);
566private static void BurnikelZieglerFallback(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> quotient, Span<nuint> remainder)
613Span<nuint> r1 = BigInteger.RentedBuffer.Create(left.Length, out BigInteger.RentedBuffer r1Buffer);
636private static void BurnikelZieglerD2n1n(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> quotient, Span<nuint> remainder)
653Span<nuint> r1 = BigInteger.RentedBuffer.Create(right.Length + 1, out BigInteger.RentedBuffer r1Buffer);
661private static void BurnikelZieglerD3n2n(ReadOnlySpan<nuint> left12, ReadOnlySpan<nuint> left3, ReadOnlySpan<nuint> right, Span<nuint> quotient, Span<nuint> remainder)
677Span<nuint> r1 = remainder.Slice(n);
678Span<nuint> d = BigInteger.RentedBuffer.Create(right.Length, out BigInteger.RentedBuffer dBuffer);
703Span<nuint> rr = remainder.Slice(0, d.Length + 1);
719static void MultiplyActual(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits)
System\Numerics\BigIntegerCalculator.FastReducer.cs (9)
20private readonly Span<nuint> _q1;
21private readonly Span<nuint> _q2;
23public FastReducer(ReadOnlySpan<nuint> modulus, Span<nuint> r, Span<nuint> mu, Span<nuint> q1, Span<nuint> q2)
45public int Reduce(Span<nuint> value)
71private static int DivMul(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits, int k)
95private static int SubMod(Span<nuint> left, ReadOnlySpan<nuint> right, ReadOnlySpan<nuint> modulus, int k)
System\Numerics\BigIntegerCalculator.GcdInv.cs (13)
88public static void Gcd(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> result)
112Span<nuint> rightCopy = BigInteger.RentedBuffer.Create(right.Length, out BigInteger.RentedBuffer rightCopyBuffer);
120private static void Gcd(Span<nuint> left, Span<nuint> right)
126Span<nuint> result = left; //keep result buffer untouched during computation
213Span<nuint> temp = left;
227Span<nuint> temp = left;
265private static int Overwrite(Span<nuint> buffer, ulong value)
400private static int LehmerCore(Span<nuint> x,
401Span<nuint> y,
435Span<uint> x32 = MemoryMarshal.Cast<nuint, uint>(x);
436Span<uint> y32 = MemoryMarshal.Cast<nuint, uint>(y);
468private static int Refresh(Span<nuint> bits, int maxLength)
System\Numerics\BigIntegerCalculator.PowMod.cs (79)
16public static void Pow(nuint value, nuint power, Span<nuint> bits)
21public static void Pow(ReadOnlySpan<nuint> value, nuint power, Span<nuint> bits)
25Span<nuint> temp = BigInteger.RentedBuffer.Create(bits.Length, out BigInteger.RentedBuffer tempBuffer);
27Span<nuint> valueCopy = BigInteger.RentedBuffer.Create(bits.Length, out BigInteger.RentedBuffer valueCopyBuffer);
31Span<nuint> result = PowCore(valueCopy, value.Length, temp, power, bits);
50Span<nuint> bits)
64Span<nuint> temp = BigInteger.RentedBuffer.Create(bits.Length, out BigInteger.RentedBuffer tempBuffer);
68Span<nuint> result = PowCore(powerIndices, powers, temp, power, smallPower, bits);
74Span<nuint> continuationPower = BigInteger.RentedBuffer.Create(
76Span<nuint> result = PowCore(
86private static Span<nuint> PowCore(
89Span<nuint> temp,
92Span<nuint> result)
123private static Span<nuint> PowCore(
126Span<nuint> value,
127Span<nuint> temp,
130Span<nuint> result)
211private static Span<nuint> PowCore(Span<nuint> value, int valueLength, Span<nuint> temp, nuint power, Span<nuint> result)
239private static int MultiplySelf(ref Span<nuint> left, int leftLength, scoped ReadOnlySpan<nuint> right, ref Span<nuint> temp)
249Span<nuint> t = left;
256private static int SquareSelf(ref Span<nuint> value, int valueLength, ref Span<nuint> temp)
267Span<nuint> t = value;
424ReadOnlySpan<nuint> modulus, Span<nuint> bits)
430ReadOnlySpan<nuint> modulus, Span<nuint> bits)
439Span<nuint> valueCopy = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer valueCopyBuffer);
455Span<nuint> temp = BigInteger.RentedBuffer.Create(bits.Length, out BigInteger.RentedBuffer tempBuffer);
464ReadOnlySpan<nuint> modulus, Span<nuint> bits)
470ReadOnlySpan<nuint> modulus, Span<nuint> bits)
479Span<nuint> valueCopy = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer valueCopyBuffer);
495Span<nuint> temp = BigInteger.RentedBuffer.Create(bits.Length, out BigInteger.RentedBuffer tempBuffer);
511private static void PowCore(Span<nuint> value, int valueLength,
513Span<nuint> temp, Span<nuint> bits)
525Span<nuint> result = PowCore(value, valueLength, power, modulus, bits, 1, temp);
535private static void PowCore(Span<nuint> value, int valueLength,
537Span<nuint> temp, Span<nuint> bits)
549Span<nuint> result = PowCore(value, valueLength, power, modulus, bits, 1, temp);
559private static void PowCoreBarrett(Span<nuint> value, int valueLength,
561Span<nuint> temp, Span<nuint> bits)
564Span<nuint> r = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer rBuffer);
567Span<nuint> mu = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer muBuffer);
570Span<nuint> q1 = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer q1Buffer);
572Span<nuint> q2 = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer q2Buffer);
578Span<nuint> result = PowCore(value, valueLength, power, reducer, bits, 1, temp);
650private static void PowCoreMontgomery(Span<nuint> value, int valueLength,
652Span<nuint> temp, Span<nuint> bits)
660Span<nuint> originalBits = bits;
668Span<nuint> shifted = BigInteger.RentedBuffer.Create(shiftLen, out BigInteger.RentedBuffer shiftedBuffer);
683Span<nuint> rModN = BigInteger.RentedBuffer.Create(k, out BigInteger.RentedBuffer rModNBuffer);
686Span<nuint> oneShifted = BigInteger.RentedBuffer.Create(oneShiftLen, out BigInteger.RentedBuffer oneShiftedBuffer);
725Span<nuint> table = tablePool.AsSpan(0, totalTableLen);
735Span<nuint> prod = BigInteger.RentedBuffer.Create(bufLen, out BigInteger.RentedBuffer prodBuffer);
738Span<nuint> base2 = BigInteger.RentedBuffer.Create(k, out BigInteger.RentedBuffer base2Buffer);
848private static int MontgomeryReduce(Span<nuint> value, ReadOnlySpan<nuint> modulus, nuint n0inv)
890Span<nuint> upper = value.Slice(k, k);
911private static Span<nuint> PowCore(Span<nuint> value, int valueLength,
913Span<nuint> result, int resultLength,
914Span<nuint> temp)
942private static Span<nuint> PowCore(Span<nuint> value, int valueLength,
944Span<nuint> result, int resultLength,
945Span<nuint> temp)
973private static Span<nuint> PowCore(Span<nuint> value, int valueLength,
975Span<nuint> result, int resultLength,
976Span<nuint> temp)
1004private static Span<nuint> PowCore(Span<nuint> value, int valueLength,
1006Span<nuint> result, int resultLength,
1007Span<nuint> temp)
System\Numerics\BigIntegerCalculator.ShiftRot.cs (15)
12public static void RotateLeft(Span<nuint> bits, long rotateLeftAmount)
41private static void RotateLeft(Span<nuint> bits, int digitShift, int smallShift)
56private static void RotateRight(Span<nuint> bits, int digitShift, int smallShift)
71public static void SwapUpperAndLower(Span<nuint> bits, int lowerLength)
78Span<nuint> lower = bits.Slice(0, lowerLength);
79Span<nuint> upper = bits.Slice(lowerLength);
81Span<nuint> lowerDst = bits.Slice(upperLength);
84Span<nuint> tmp = BigInteger.RentedBuffer.Create(tmpLength, out BigInteger.RentedBuffer tmpBuffer);
106public static void SwapUpperAndLower(Span<uint> bits, int lowerLength)
113Span<uint> lower = bits.Slice(0, lowerLength);
114Span<uint> upper = bits.Slice(lowerLength);
116Span<uint> lowerDst = bits.Slice(upperLength);
121Span<nuint> tmpNuint = BigInteger.RentedBuffer.Create(nuintCount, out BigInteger.RentedBuffer tmpBuffer);
122Span<uint> tmp = MemoryMarshal.Cast<nuint, uint>(tmpNuint).Slice(0, tmpLength);
140public static void LeftShiftSelf(Span<nuint> bits, int shift, out nuint carry)
System\Numerics\BigIntegerCalculator.SquMul.cs (67)
27public static void Square(ReadOnlySpan<nuint> value, Span<nuint> bits)
82static void Toom3(ReadOnlySpan<nuint> value, Span<nuint> bits)
102Span<nuint> pAndQAll = pAndQAllFromPool.AsSpan(0, pAndQAllLength);
111Span<nuint> rAndZAll = rAndZAllFromPool.AsSpan(0, rAndZAllLength);
120static void Karatsuba(ReadOnlySpan<nuint> value, Span<nuint> bits)
141Span<nuint> bitsLow = bits.Slice(0, n2);
142Span<nuint> bitsHigh = bits.Slice(n2);
151Span<nuint> fold = BigInteger.RentedBuffer.Create(foldLength, out BigInteger.RentedBuffer foldBuffer);
154Span<nuint> core = BigInteger.RentedBuffer.Create(coreLength, out BigInteger.RentedBuffer coreBuffer);
172static void Naive(ReadOnlySpan<nuint> value, Span<nuint> bits)
245public static void Multiply(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits)
327static void Toom3(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits)
354Span<nuint> pAndQAll = pAndQAllFromPool.AsSpan(0, pAndQAllLength);
364Span<nuint> rAndZAll = rAndZAllFromPool.AsSpan(0, rAndZAllLength);
373static void Toom25(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits, int n)
390Span<nuint> z0 = bits.Slice(0, left0.Length + right0.Length);
391Span<nuint> z3 = bits.Slice(n * 3);
401Span<nuint> pAndQAll = pAndQAllFromPool.AsSpan(0, pAndQAllLength);
404Span<nuint> p1 = pAndQAll.Slice(0, pLength);
405Span<nuint> pm1 = pAndQAll.Slice(pLength, pLength);
406Span<nuint> q1 = pAndQAll.Slice(pLength * 2, pLength);
407Span<nuint> qm1 = pAndQAll.Slice(pLength * 3, pLength);
437Span<nuint> cAll = cAllFromPool.AsSpan(0, cAllLength);
440Span<nuint> z1 = cAll.Slice(0, cLength);
441Span<nuint> c1 = z1.Slice(0, p1.Length + q1.Length);
443Span<nuint> z2 = cAll.Slice(cLength, cLength);
444Span<nuint> cm1 = cAll.Slice(cLength * 2, pm1.Length + qm1.Length);
470static void Karatsuba(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits, int n)
509Span<nuint> bitsLow = bits.Slice(0, n + n);
510Span<nuint> bitsHigh = bits.Slice(n + n);
523Span<nuint> leftFold = BigInteger.RentedBuffer.Create(foldLength, out BigInteger.RentedBuffer leftFoldBuffer);
525Span<nuint> rightFold = BigInteger.RentedBuffer.Create(foldLength, out BigInteger.RentedBuffer rightFoldBuffer);
534Span<nuint> core = BigInteger.RentedBuffer.Create(coreLength, out BigInteger.RentedBuffer coreBuffer);
554static void RightSmall(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> bits, int n)
567Span<nuint> bitsLow = bits.Slice(0, n + right.Length);
568Span<nuint> bitsHigh = bits.Slice(n);
577Span<nuint> carry = BigInteger.RentedBuffer.Create(carryLength, out BigInteger.RentedBuffer carryBuffer);
579Span<nuint> carryOrig = bitsHigh.Slice(0, right.Length);
610public static Toom3Data Build(ReadOnlySpan<nuint> value, int n, Span<nuint> buffer)
633Span<nuint> p1 = buffer.Slice(0, pLength);
634Span<nuint> pm1 = buffer.Slice(pLength, pLength);
652Span<nuint> pm2 = buffer.Slice(pLength + pLength, pLength);
689public void MultiplyOther(in Toom3Data right, int n, Span<nuint> bits, Span<nuint> buffer)
712Span<nuint> r0 = bits.Slice(0, p0.Length + q0.Length);
713Span<nuint> rInf =
718Span<nuint> r1 = buffer.Slice(0, p1.Length + q1.Length);
719Span<nuint> rm1 = buffer.Slice(rLength, pm1.Length + qm1.Length);
720Span<nuint> rm2 = buffer.Slice(rLength * 2, pm2.Length + qm2.Length);
743public void Square(int n, Span<nuint> bits, Span<nuint> buffer)
756Span<nuint> r0 = bits.Slice(0, p0.Length << 1);
757Span<nuint> rInf = bits.Slice(4 * n, pInf.Length << 1);
759Span<nuint> r1 = buffer.Slice(0, p1.Length << 1);
760Span<nuint> rm1 = buffer.Slice(rLength, pm1.Length << 1);
761Span<nuint> rm2 = buffer.Slice(rLength * 2, pm2.Length << 1);
788Span<nuint> z1,
790Span<nuint> z2,
793Span<nuint> z3,
795Span<nuint> bits)
859private static void DivideThreeSelf(Span<nuint> bits)
918private static void SubtractCore(ReadOnlySpan<nuint> left, ReadOnlySpan<nuint> right, Span<nuint> core)
991private static void AddSelf(Span<nuint> left, ref int leftSign, ReadOnlySpan<nuint> right, int rightSign)
1009private static void AddSelf(Span<nuint> left, ref int leftSign, ReadOnlySpan<nuint> right)
1055private static void SubtractSelf(Span<nuint> left, ref int leftSign, ReadOnlySpan<nuint> right)
1099private static void LeftShiftOne(Span<nuint> bits)
1110private static void RightShiftOne(Span<nuint> bits)
System\Numerics\Complex.cs (13)
865/// <inheritdoc cref="ISpanFormattable.TryFormat(Span{char}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
866public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
869/// <inheritdoc cref="IUtf8SpanFormattable.TryFormat(Span{byte}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
870public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
873private bool TryFormat<TChar>(Span<TChar> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
882? m_real.TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination.Slice(1)), out int realChars, format, provider)
883: m_real.TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(destination.Slice(1)), out realChars, format, provider))
892? m_imaginary.TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination.Slice(2)), out int imaginaryChars, format, provider)
893: m_imaginary.TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(destination.Slice(2)), out imaginaryChars, format, provider))
System\Numerics\Complex.Generic.cs (13)
2073/// <inheritdoc cref="ISpanFormattable.TryFormat(Span{char}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
2074public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
2077/// <inheritdoc cref="IUtf8SpanFormattable.TryFormat(Span{byte}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
2078public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
2081private bool TryFormat<TChar>(Span<TChar> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
2090? m_real.TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination.Slice(1)), out int realChars, format, provider)
2091: m_real.TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(destination.Slice(1)), out realChars, format, provider))
2100? m_imaginary.TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination.Slice(2)), out int imaginaryChars, format, provider)
2101: m_imaginary.TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(destination.Slice(2)), out imaginaryChars, format, provider))
System.Security.Cryptography (1188)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (3)
1925internal static partial global::Interop.BCrypt.NTSTATUS BCryptFinishHash(global::Microsoft.Win32.SafeHandles.SafeBCryptHashHandle hHash, global::System.Span<byte> pbOutput, int cbOutput, int dwFlags)
5140internal static unsafe partial global::Interop.NCrypt.ErrorCode NCryptEncrypt(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, global::System.ReadOnlySpan<byte> pbInput, int cbInput, void* pPaddingInfo, global::System.Span<byte> pbOutput, int cbOutput, out int pcbResult, global::Interop.NCrypt.AsymmetricPaddingMode dwFlags)
5182internal static unsafe partial global::Interop.NCrypt.ErrorCode NCryptDecrypt(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, global::System.ReadOnlySpan<byte> pbInput, int cbInput, void* pPaddingInfo, global::System.Span<byte> pbOutput, int cbOutput, out int pcbResult, global::Interop.NCrypt.AsymmetricPaddingMode dwFlags)
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.CryptGetProvParam.cs (1)
56Span<byte> pbData,
src\runtime\src\libraries\Common\src\Interop\Windows\NCrypt\Interop.EncryptDecrypt.cs (2)
14internal static unsafe partial ErrorCode NCryptEncrypt(SafeNCryptKeyHandle hKey, ReadOnlySpan<byte> pbInput, int cbInput, void* pPaddingInfo, Span<byte> pbOutput, int cbOutput, out int pcbResult, AsymmetricPaddingMode dwFlags);
18internal static unsafe partial ErrorCode NCryptDecrypt(SafeNCryptKeyHandle hKey, ReadOnlySpan<byte> pbInput, int cbInput, void* pPaddingInfo, Span<byte> pbOutput, int cbOutput, out int pcbResult, AsymmetricPaddingMode dwFlags);
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (16)
206public int SignData(ReadOnlySpan<byte> data, Span<byte> destination, ReadOnlySpan<byte> context = default)
254protected abstract int SignDataCore(ReadOnlySpan<byte> data, ReadOnlySpan<byte> context, Span<byte> destination);
1191/// <inheritdoc cref="TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan{char}, PbeParameters, Span{byte}, out int)"/>
1198Span<byte> destination,
1245Span<byte> destination,
1305Span<byte> destination,
1388public bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten)
1425protected abstract bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten);
1491public bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten)
1546public int ExportCompositeMLDsaPublicKey(Span<byte> destination)
1583public bool TryExportCompositeMLDsaPublicKey(Span<byte> destination, out int bytesWritten)
1671public int ExportCompositeMLDsaPrivateKey(Span<byte> destination)
1708public bool TryExportCompositeMLDsaPrivateKey(Span<byte> destination, out int bytesWritten)
1764protected abstract int ExportCompositeMLDsaPublicKeyCore(Span<byte> destination);
1781protected abstract int ExportCompositeMLDsaPrivateKeyCore(Span<byte> destination);
1808private protected bool TryExportPkcs8FromExportedPrivateKey(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLKem.cs (19)
176public void Encapsulate(Span<byte> ciphertext, Span<byte> sharedSecret)
225protected abstract void EncapsulateCore(Span<byte> ciphertext, Span<byte> sharedSecret);
299public void Decapsulate(ReadOnlySpan<byte> ciphertext, Span<byte> sharedSecret)
339protected abstract void DecapsulateCore(ReadOnlySpan<byte> ciphertext, Span<byte> sharedSecret);
1494Span<byte> destination,
1541Span<byte> destination,
1601Span<byte> destination,
1691public bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten)
1725protected abstract bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten);
1792public bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten)
1849public int ExportEncapsulationKey(Span<byte> destination)
1886public bool TryExportEncapsulationKey(Span<byte> destination, out int bytesWritten)
1934protected abstract int ExportEncapsulationKeyCore(Span<byte> destination);
1992public int ExportDecapsulationKey(Span<byte> destination)
2031public bool TryExportDecapsulationKey(Span<byte> destination, out int bytesWritten)
2086protected abstract int ExportDecapsulationKeyCore(Span<byte> destination);
2113private protected bool TryExportPkcs8FromExportedDecapsulationKey(Span<byte> destination, out int bytesWritten)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Hpke.cs (14)
330public void ExportDecapsulationKey(Span<byte> destination)
352protected abstract void ExportDecapsulationKeyCore(Span<byte> destination);
390public void ExportEncapsulationKey(Span<byte> destination)
412protected abstract void ExportEncapsulationKeyCore(Span<byte> destination);
573Span<byte> encapsulatedSecret,
574Span<byte> ciphertext,
634Span<byte> encapsulatedSecret,
635Span<byte> ciphertext,
821Span<byte> plaintext,
875Span<byte> plaintext,
946public HpkeSender CreateSender(Span<byte> encapsulatedSecret, ReadOnlySpan<byte> info = default)
981protected abstract HpkeSender CreateSenderCore(Span<byte> encapsulatedSecret, ReadOnlySpan<byte> info);
1216Span<byte> encapsulatedSecret,
1265Span<byte> encapsulatedSecret,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (21)
120public void SignData(ReadOnlySpan<byte> data, Span<byte> destination, ReadOnlySpan<byte> context = default)
302public void SignPreHash(ReadOnlySpan<byte> hash, Span<byte> destination, string hashAlgorithmOid, ReadOnlySpan<byte> context = default)
575public void SignMu(ReadOnlySpan<byte> externalMu, Span<byte> destination)
600protected abstract void SignMuCore(ReadOnlySpan<byte> externalMu, Span<byte> destination);
697public bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten)
773public bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten)
816protected abstract bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten);
980Span<byte> destination,
1040Span<byte> destination,
1059/// <inheritdoc cref="TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan{char}, PbeParameters, Span{byte}, out int)"/>
1066Span<byte> destination,
1210public void ExportMLDsaPublicKey(Span<byte> destination)
1252public void ExportMLDsaPrivateKey(Span<byte> destination)
1292public void ExportMLDsaPrivateSeed(Span<byte> destination)
1954protected abstract void SignDataCore(ReadOnlySpan<byte> data, ReadOnlySpan<byte> context, Span<byte> destination);
1996protected abstract void SignPreHashCore(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> context, string hashAlgorithmOid, Span<byte> destination);
2028protected abstract void ExportMLDsaPublicKeyCore(Span<byte> destination);
2036protected abstract void ExportMLDsaPrivateKeyCore(Span<byte> destination);
2044protected abstract void ExportMLDsaPrivateSeedCore(Span<byte> destination);
2053Span<byte> publicKey = rented.AsSpan(0, publicKeySizeInBytes);
2214Span<byte> buffer = rent.AsSpan(0, privateKeySize);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (19)
109public void Encapsulate(Span<byte> ciphertext, Span<byte> sharedSecret)
173protected abstract void EncapsulateCore(Span<byte> ciphertext, Span<byte> sharedSecret);
201public void Decapsulate(ReadOnlySpan<byte> ciphertext, Span<byte> sharedSecret)
272protected abstract void DecapsulateCore(ReadOnlySpan<byte> ciphertext, Span<byte> sharedSecret);
289public void ExportPrivateSeed(Span<byte> destination)
328protected abstract void ExportPrivateSeedCore(Span<byte> destination);
520public void ExportDecapsulationKey(Span<byte> destination)
559protected abstract void ExportDecapsulationKeyCore(Span<byte> destination);
574public void ExportEncapsulationKey(Span<byte> destination)
611protected abstract void ExportEncapsulationKeyCore(Span<byte> destination);
634public bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten)
701public bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten)
774protected abstract bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten);
815Span<byte> destination,
868Span<byte> destination,
914Span<byte> destination,
1728Span<byte> buffer = rent.AsSpan(0, decapsulationKeySize);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.EncryptDecrypt.cs (7)
27public override bool TryEncrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, out int bytesWritten) =>
31public override bool TryDecrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, out int bytesWritten) =>
61Span<byte> paddedMessage = new Span<byte>(rented, 0, modulusSizeInBytes);
119private unsafe bool TryEncryptOrDecrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, bool encrypt, out int bytesWritten)
143Span<byte> paddedMessage = new Span<byte>(rented, 0, modulusSizeInBytes);
254private static unsafe bool TryEncryptOrDecrypt(SafeNCryptKeyHandle key, ReadOnlySpan<byte> input, Span<byte> output, AsymmetricPaddingMode paddingMode, void* paddingInfo, bool encrypt, out int bytesWritten)
283Span<byte> output,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (28)
120Span<byte> destination)
134Span<byte> mInEM = destination.Slice(destination.Length - source.Length);
135Span<byte> ps = destination.Slice(2, destination.Length - source.Length - 3);
148Span<byte> destination,
252Span<byte> destination)
291Span<byte> destination)
297Span<byte> dbMaskSpan = Span<byte>.Empty;
316Span<byte> seed = destination.Slice(1, hLen);
317Span<byte> db = destination.Slice(1 + hLen);
324Span<byte> lHash = db.Slice(0, hLen);
325Span<byte> mDest = db.Slice(db.Length - source.Length);
326Span<byte> ps = db.Slice(hLen, db.Length - hLen - 1 - mDest.Length);
327Span<byte> psEnd = db.Slice(hLen + ps.Length, 1);
358Span<byte> seedMask = stackalloc byte[hLen];
383internal static unsafe void EncodePss(HashAlgorithmName hashAlgorithmName, ReadOnlySpan<byte> mHash, Span<byte> destination, int keySize)
413Span<byte> em = destination.Slice(destination.Length - emLen, emLen);
417Span<byte> db = em.Slice(0, dbLen);
418Span<byte> hDest = em.Slice(dbLen, hLen);
422Span<byte> dbMask = new Span<byte>(dbMaskRented, 0, dbLen);
429Span<byte> salt = stackalloc byte[sLen];
520Span<byte> dbMask = new Span<byte>(dbMaskRented, 0, maskedDb.Length);
565Span<byte> hPrime = stackalloc byte[hLen];
588private static unsafe void Mgf1(IncrementalHash hasher, ReadOnlySpan<byte> mgfSeed, Span<byte> mask)
591Span<byte> writePtr = mask;
593Span<byte> bigEndianCount = stackalloc byte[sizeof(int)];
615Span<byte> tmp = stackalloc byte[hLen];
635private static void Xor(Span<byte> a, ReadOnlySpan<byte> b)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (17)
130public void SignData(ReadOnlySpan<byte> data, Span<byte> destination, ReadOnlySpan<byte> context = default)
314public void SignPreHash(ReadOnlySpan<byte> hash, Span<byte> destination, string hashAlgorithmOid, ReadOnlySpan<byte> context = default)
534public bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten)
608public bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten)
651protected virtual unsafe bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten)
656Span<byte> privateKey = (stackalloc byte[128])[..privateKeySizeInBytes];
850Span<byte> destination,
910Span<byte> destination,
929/// <inheritdoc cref="TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan{char}, PbeParameters, Span{byte}, out int)"/>
936Span<byte> destination,
1075public void ExportSlhDsaPublicKey(Span<byte> destination)
1126public void ExportSlhDsaPrivateKey(Span<byte> destination)
1783protected abstract void SignDataCore(ReadOnlySpan<byte> data, ReadOnlySpan<byte> context, Span<byte> destination);
1824protected abstract void SignPreHashCore(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> context, string hashAlgorithmOid, Span<byte> destination);
1855protected abstract void ExportSlhDsaPublicKeyCore(Span<byte> destination);
1863protected abstract void ExportSlhDsaPrivateKeyCore(Span<byte> destination);
1870Span<byte> publicKey = (stackalloc byte[64])[..publicKeySizeInBytes];
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdf.cs (8)
272public static void DeriveBytes(ReadOnlySpan<byte> key, HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> label, ReadOnlySpan<byte> context, Span<byte> destination)
352public static void DeriveBytes(ReadOnlySpan<byte> key, HashAlgorithmName hashAlgorithm, ReadOnlySpan<char> label, ReadOnlySpan<char> context, Span<byte> destination)
429public void DeriveKey(ReadOnlySpan<byte> label, ReadOnlySpan<byte> context, Span<byte> destination)
480public void DeriveKey(ReadOnlySpan<char> label, ReadOnlySpan<char> context, Span<byte> destination)
582Span<byte> destination);
589Span<byte> destination);
591private void DeriveKeyCore(ReadOnlySpan<byte> label, ReadOnlySpan<byte> context, Span<byte> destination)
596private void DeriveKeyCore(ReadOnlySpan<char> label, ReadOnlySpan<char> context, Span<byte> destination)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellman.cs (21)
145public void DeriveRawSecretAgreement(X25519DiffieHellman otherParty, Span<byte> destination)
182public void DeriveRawSecretAgreement(ReadOnlySpan<byte> otherPartyPublicKey, Span<byte> destination)
248public void ExportPrivateKey(Span<byte> destination)
293public void ExportPublicKey(Span<byte> destination)
325public bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten)
371Span<byte> spki = stackalloc byte[SpkiSizeInBytes];
402public bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten)
488Span<byte> destination,
537Span<byte> destination,
586Span<byte> destination,
811protected abstract void DeriveRawSecretAgreementCore(X25519DiffieHellman otherParty, Span<byte> destination);
826protected abstract void DeriveRawSecretAgreementCore(ReadOnlySpan<byte> otherPartyPublicKey, Span<byte> destination);
834protected abstract void ExportPrivateKeyCore(Span<byte> destination);
842protected abstract void ExportPublicKeyCore(Span<byte> destination);
861protected abstract bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten);
1434Span<byte> destination,
1464private bool TryExportSubjectPublicKeyInfoCore(Span<byte> destination, out int bytesWritten)
1500private protected bool TryExportPkcs8PrivateKeyImpl(Span<byte> destination, out int bytesWritten)
1510Span<byte> destination,
1537Span<byte> privateKeyBuffer = destination.Slice(pkcs8Preamble.Length, PrivateKeySizeInBytes);
1626private protected delegate void WriteKeyFunc<TState>(TState state, Span<byte> destination)
System\Security\Cryptography\Aes.cs (30)
130public void EncryptKeyWrap(ReadOnlySpan<byte> plaintext, Span<byte> destination)
221public int DecryptKeyWrap(ReadOnlySpan<byte> ciphertext, Span<byte> destination)
254public bool TryDecryptKeyWrap(ReadOnlySpan<byte> ciphertext, Span<byte> destination, out int bytesWritten)
317protected virtual int DecryptKeyWrapCore(ReadOnlySpan<byte> source, Span<byte> destination)
355protected virtual void EncryptKeyWrapCore(ReadOnlySpan<byte> source, Span<byte> destination)
457public void EncryptKeyWrapPadded(ReadOnlySpan<byte> plaintext, Span<byte> destination)
532/// <paramref name="destination"/> has a <see cref="Span{T}.Length"/> that is
544public int DecryptKeyWrapPadded(ReadOnlySpan<byte> ciphertext, Span<byte> destination)
582public bool TryDecryptKeyWrapPadded(ReadOnlySpan<byte> ciphertext, Span<byte> destination, out int bytesWritten)
683protected virtual unsafe int DecryptKeyWrapPaddedCore(ReadOnlySpan<byte> source, Span<byte> destination)
694Span<byte> destination,
696Func<TState, ReadOnlySpan<byte>, Span<byte>, int> decryptEcb)
702Span<byte> decrypt = stackalloc byte[16];
752protected virtual unsafe void EncryptKeyWrapPaddedCore(ReadOnlySpan<byte> source, Span<byte> destination)
763Span<byte> destination,
765Func<TState, ReadOnlySpan<byte>, Span<byte>, int> encryptEcb)
774Span<byte> buf = stackalloc byte[16];
777Span<byte> keyPart = buf.Slice(8);
815Span<byte> destination,
817Func<TState, ReadOnlySpan<byte>, Span<byte>, int> encryptEcb)
823Span<byte> B = stackalloc byte[16];
824Span<byte> A = B.Slice(0, 8);
825Span<byte> ALo = A.Slice(4, 4);
833Span<byte> R = destination.Slice(8);
854Span<byte> destination,
856Func<TState, ReadOnlySpan<byte>, Span<byte>, int> decryptEcb)
858Span<byte> B = stackalloc byte[16];
859Span<byte> A = B.Slice(0, 8);
860Span<byte> ALo = A.Slice(4, 4);
871Span<byte> R = destination.Slice(rOffset);
System\Security\Cryptography\AsymmetricAlgorithm.cs (18)
145Span<byte> destination,
154Span<byte> destination,
160public virtual bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten) =>
163public virtual bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten) =>
425/// <see cref="TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan{char}, PbeParameters, Span{byte}, out int)" /> has not been provided.
478/// <see cref="TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan{byte}, PbeParameters, Span{byte}, out int)" /> has not been provided.
578public bool TryExportSubjectPublicKeyInfoPem(Span<char> destination, out int charsWritten)
580static bool Export(AsymmetricAlgorithm alg, Span<byte> destination, out int bytesWritten)
627public bool TryExportPkcs8PrivateKeyPem(Span<char> destination, out int charsWritten)
629static bool Export(AsymmetricAlgorithm alg, Span<byte> destination, out int bytesWritten)
665/// An implementation for <see cref="TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan{char}, PbeParameters, Span{byte}, out int)" />
688public bool TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<char> password, PbeParameters pbeParameters, Span<char> destination, out int charsWritten)
694Span<byte> destination,
732/// An implementation for <see cref="TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan{byte}, PbeParameters, Span{byte}, out int)" />
750public bool TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters, Span<char> destination, out int charsWritten)
756Span<byte> destination,
774Span<byte> destination,
777private delegate bool TryExport(Span<byte> destination, out int bytesWritten);
System\Security\Cryptography\CryptographicOperations.cs (11)
99public static void ZeroMemory(Span<byte> buffer)
187public static int HashData(HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> source, Span<byte> destination)
223public static bool TryHashData(HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
300public static int HashData(HashAlgorithmName hashAlgorithm, Stream source, Span<byte> destination)
496Span<byte> destination)
537Span<byte> destination,
650public static int HmacData(HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key, Stream source, Span<byte> destination)
843Span<byte> macBuffer = stackalloc byte[MaxStackAlloc];
853Span<byte> mac = macBuffer.Slice(0, written);
935Span<byte> macBuffer = stackalloc byte[MaxStackAlloc];
945Span<byte> mac = macBuffer.Slice(0, written);
System\Security\Cryptography\DSA.cs (16)
227Span<byte> signature = stackalloc byte[SignatureStackSize];
434Span<byte> signature = stackalloc byte[SignatureStackSize];
446public virtual bool TryCreateSignature(ReadOnlySpan<byte> hash, Span<byte> destination, out int bytesWritten)
472Span<byte> destination,
502Span<byte> destination,
521Span<byte> destination,
539Span<byte> destination,
582Span<byte> destination,
615Span<byte> destination,
620Span<byte> tmp = stackalloc byte[HashBufferStackSize];
781Span<byte> tmp = stackalloc byte[HashBufferStackSize];
881Span<byte> tmp)
924Span<byte> destination,
947Span<byte> destination,
967Span<byte> destination,
975Span<byte> destination,
System\Security\Cryptography\ECDsa.cs (24)
141Span<byte> signature = stackalloc byte[SignatureStackBufSize];
363/// <seealso cref="SignHash(ReadOnlySpan{byte}, Span{byte})" />.
364public int SignHash(ReadOnlySpan<byte> hash, Span<byte> destination, DSASignatureFormat signatureFormat)
397/// the signature. To use a different signature format, use <see cref="SignHash(ReadOnlySpan{byte}, Span{byte}, DSASignatureFormat)" />.
399/// <seealso cref="SignHash(ReadOnlySpan{byte}, Span{byte}, DSASignatureFormat)" />.
400public int SignHash(ReadOnlySpan<byte> hash, Span<byte> destination)
423Span<byte> signature = stackalloc byte[SignatureStackBufSize];
464Span<byte> destination,
470Span<byte> hashTmp = stackalloc byte[HashBufferStackSize];
502Span<byte> destination,
535Span<byte> destination,
540Span<byte> hashTmp = stackalloc byte[HashBufferStackSize];
654/// <seealso cref="SignData(ReadOnlySpan{byte}, Span{byte}, HashAlgorithmName)" />
657Span<byte> destination,
704/// <see cref="SignData(ReadOnlySpan{byte}, Span{byte}, HashAlgorithmName, DSASignatureFormat)" />.
706/// <seealso cref="SignData(ReadOnlySpan{byte}, Span{byte}, HashAlgorithmName, DSASignatureFormat)" />
707public int SignData(ReadOnlySpan<byte> data, Span<byte> destination, HashAlgorithmName hashAlgorithm)
845Span<byte> hashTmp = stackalloc byte[HashBufferStackSize];
899Span<byte> hashSpan = stackalloc byte[512 / 8];
998protected virtual bool TryHashData(ReadOnlySpan<byte> data, Span<byte> destination, HashAlgorithmName hashAlgorithm, out int bytesWritten)
1041public virtual bool TrySignHash(ReadOnlySpan<byte> hash, Span<byte> destination, out int bytesWritten)
1067Span<byte> destination,
1097Span<byte> destination,
1201Span<byte> tmp)
System\Security\Cryptography\HKDF.cs (3)
51public static int Extract(HashAlgorithmName hashAlgorithmName, ReadOnlySpan<byte> ikm, ReadOnlySpan<byte> salt, Span<byte> prk)
118public static void Expand(HashAlgorithmName hashAlgorithmName, ReadOnlySpan<byte> prk, Span<byte> output, ReadOnlySpan<byte> info)
175public static void DeriveKey(HashAlgorithmName hashAlgorithmName, ReadOnlySpan<byte> ikm, Span<byte> output, ReadOnlySpan<byte> salt, ReadOnlySpan<byte> info)
System\Security\Cryptography\HKDFManagedImplementation.cs (11)
12internal static unsafe void Extract(HashAlgorithmName hashAlgorithmName, ReadOnlySpan<byte> ikm, ReadOnlySpan<byte> salt, Span<byte> prk)
18internal static unsafe void Expand(HashAlgorithmName hashAlgorithmName, int hashLength, ReadOnlySpan<byte> prk, Span<byte> output, ReadOnlySpan<byte> info)
23var counterSpan = new Span<byte>(ref counter);
24Span<byte> t = Span<byte>.Empty;
25Span<byte> remainingOutput = output;
28Span<byte> tempInfoBuffer = stackalloc byte[MaxStackInfoBuffer];
69Span<byte> lastChunk = stackalloc byte[hashLength];
85internal static unsafe void DeriveKey(HashAlgorithmName hashAlgorithmName, int hashLength, ReadOnlySpan<byte> ikm, Span<byte> output, ReadOnlySpan<byte> salt, ReadOnlySpan<byte> info)
87Span<byte> prk = stackalloc byte[hashLength];
94private static void GetHashAndReset(IncrementalHash hmac, Span<byte> output)
System\Security\Cryptography\HpkeImplementation.Managed.cs (50)
89protected override void ExportDecapsulationKeyCore(Span<byte> destination) =>
92protected override void ExportEncapsulationKeyCore(Span<byte> destination) =>
97Span<byte> encapsulatedSecret,
98Span<byte> ciphertext,
103Span<byte> sharedSecretBuffer = stackalloc byte[MaxStackSecretLength];
104Span<byte> keyBuffer = stackalloc byte[MaxStackSecretLength];
105Span<byte> baseNonceBuffer = stackalloc byte[MaxStackSecretLength];
106Span<byte> exporterSecretBuffer = stackalloc byte[MaxStackSecretLength];
110Span<byte> sharedSecret = sharedSecretBuffer.Slice(0, Suite.KemMetadata.Nsecret);
111Span<byte> key = keyBuffer.Slice(0, Suite.AeadMetadata.Nk);
112Span<byte> baseNonce = baseNonceBuffer.Slice(0, Suite.AeadMetadata.Nn);
113Span<byte> exporterSecret = exporterSecretBuffer.Slice(0, Suite.KdfMetadata.Nh);
149Span<byte> plaintext,
154Span<byte> sharedSecretBuffer = stackalloc byte[MaxStackSecretLength];
155Span<byte> keyBuffer = stackalloc byte[MaxStackSecretLength];
156Span<byte> baseNonceBuffer = stackalloc byte[MaxStackSecretLength];
157Span<byte> exporterSecretBuffer = stackalloc byte[MaxStackSecretLength];
161Span<byte> sharedSecret = sharedSecretBuffer.Slice(0, Suite.KemMetadata.Nsecret);
162Span<byte> key = keyBuffer.Slice(0, Suite.AeadMetadata.Nk);
163Span<byte> baseNonce = baseNonceBuffer.Slice(0, Suite.AeadMetadata.Nn);
164Span<byte> exporterSecret = exporterSecretBuffer.Slice(0, Suite.KdfMetadata.Nh);
197protected override HpkeSender CreateSenderCore(Span<byte> encapsulatedSecret, ReadOnlySpan<byte> info)
203Span<byte> encapsulatedSecret,
213Span<byte> encapsulatedSecret,
219Span<byte> sharedSecretBuffer = stackalloc byte[MaxStackSecretLength];
220Span<byte> keyBuffer = stackalloc byte[MaxStackSecretLength];
221Span<byte> baseNonceBuffer = stackalloc byte[MaxStackSecretLength];
222Span<byte> exporterSecretBuffer = stackalloc byte[MaxStackSecretLength];
226Span<byte> sharedSecret = sharedSecretBuffer.Slice(0, Suite.KemMetadata.Nsecret);
227Span<byte> key = keyBuffer.Slice(0, Suite.AeadMetadata.Nk);
228Span<byte> baseNonce = baseNonceBuffer.Slice(0, Suite.AeadMetadata.Nn);
229Span<byte> exporterSecret = exporterSecretBuffer.Slice(0, Suite.KdfMetadata.Nh);
282Span<byte> sharedSecretBuffer = stackalloc byte[MaxStackSecretLength];
283Span<byte> keyBuffer = stackalloc byte[MaxStackSecretLength];
284Span<byte> baseNonceBuffer = stackalloc byte[MaxStackSecretLength];
285Span<byte> exporterSecretBuffer = stackalloc byte[MaxStackSecretLength];
289Span<byte> sharedSecret = sharedSecretBuffer.Slice(0, Suite.KemMetadata.Nsecret);
290Span<byte> key = keyBuffer.Slice(0, Suite.AeadMetadata.Nk);
291Span<byte> baseNonce = baseNonceBuffer.Slice(0, Suite.AeadMetadata.Nn);
292Span<byte> exporterSecret = exporterSecretBuffer.Slice(0, Suite.KdfMetadata.Nh);
364Span<byte> ciphertext,
376Span<byte> nonceBuffer = stackalloc byte[MaxStackNonceLength];
377Span<byte> nonce = nonceBuffer.Slice(0, _baseNonce.Length);
382Span<byte> sequenceBytes = nonce.Slice(nonce.Length - sizeof(ulong));
397protected override void ExportCore(ReadOnlySpan<byte> exporterContext, Span<byte> destination)
445Span<byte> plaintext,
456Span<byte> nonceBuffer = stackalloc byte[MaxStackNonceLength];
457Span<byte> nonce = nonceBuffer.Slice(0, _baseNonce.Length);
462Span<byte> sequenceBytes = nonce.Slice(nonce.Length - sizeof(ulong));
476protected override void ExportCore(ReadOnlySpan<byte> exporterContext, Span<byte> destination)
System\Security\Cryptography\HpkeManagedKdfAdapter.cs (31)
46Span<byte> key,
47Span<byte> baseNonce,
48Span<byte> exporterSecret)
71Span<byte> destination)
89Span<byte> key,
90Span<byte> baseNonce,
91Span<byte> exporterSecret);
96Span<byte> destination);
119Span<byte> key,
120Span<byte> baseNonce,
121Span<byte> exporterSecret)
126Span<byte> contextBuffer = stackalloc byte[MaxStackContextLength];
127Span<byte> secretBuffer = stackalloc byte[SHA512.HashSizeInBytes];
131Span<byte> context = contextBuffer.Slice(0, 1 + 2 * hashLength);
132Span<byte> secret = secretBuffer.Slice(0, hashLength);
151Span<byte> destination) =>
158Span<byte> prk)
165Span<byte> destination = labeledIkm.Span;
183Span<byte> output)
188Span<byte> buffer = length <= MaxStackInfoLength
219Span<byte> key,
220Span<byte> baseNonce,
221Span<byte> exporterSecret)
233Span<byte> outputBuffer = stackalloc byte[MaxStackOutputLength];
237Span<byte> output = outputBuffer.Slice(0, outputLength);
261Span<byte> destination)
279Span<byte> lengthBytes = stackalloc byte[sizeof(ushort)];
286Span<byte> lengthBytes = stackalloc byte[sizeof(ushort)];
294protected abstract void GetHashAndReset(TShake shake, Span<byte> destination);
308protected override void GetHashAndReset(Shake128 shake, Span<byte> destination) =>
323protected override void GetHashAndReset(Shake256 shake, Span<byte> destination) =>
System\Security\Cryptography\IncrementalHash.cs (13)
146/// <paramref name="destination"/> has a <see cref="Span{T}.Length"/> value less
150public int GetHashAndReset(Span<byte> destination)
159public bool TryGetHashAndReset(Span<byte> destination, out int bytesWritten)
173private int GetHashAndResetCore(Span<byte> destination)
218/// <paramref name="destination"/> has a <see cref="Span{T}.Length"/> value less
222public int GetCurrentHash(Span<byte> destination)
249public bool TryGetCurrentHash(Span<byte> destination, out int bytesWritten)
263private int GetCurrentHashCore(Span<byte> destination)
308VerifyCore(hash, this, static (IncrementalHash ih, Span<byte> buffer) => ih.GetCurrentHashCore(buffer));
339VerifyCore(hash, this, static (IncrementalHash ih, Span<byte> buffer) => ih.GetHashAndResetCore(buffer));
474Func<IncrementalHash, Span<byte>, int> getHashCallback)
482Span<byte> computedBuffer = stackalloc byte[MaxStackAlloc];
495Span<byte> computed = computedBuffer.Slice(0, written);
System\Security\Cryptography\PemEncoding.cs (7)
493public static bool TryWrite(ReadOnlySpan<char> label, ReadOnlySpan<byte> data, Span<char> destination, out int charsWritten)
555Span<byte> destination,
623private static int WriteCore<TChar, T>(ReadOnlySpan<TChar> label, ReadOnlySpan<byte> data, Span<TChar> destination)
627static int Write(ReadOnlySpan<TChar> str, Span<TChar> dest, int offset)
770static abstract int WriteBase64(ReadOnlySpan<byte> bytes, Span<TChar> destination, int offset);
786public static int WriteBase64(ReadOnlySpan<byte> bytes, Span<char> destination, int offset)
813public static int WriteBase64(ReadOnlySpan<byte> bytes, Span<byte> destination, int offset)
System\Security\Cryptography\PemKeyHelpers.cs (8)
12public delegate bool TryExportKeyAction<T>(T arg, Span<byte> destination, out int bytesWritten);
17Span<byte> destination,
25Span<char> destination,
43Span<byte> writtenSpan = new Span<byte>(buffer, 0, bytesWritten);
61Span<char> destination,
79Span<byte> writtenSpan = new Span<byte>(buffer, 0, bytesWritten);
151Span<byte> decodedBase64 = decodeBuffer.AsSpan(0, bytesWritten);
237Span<byte> decodedBase64 = decodeBuffer.AsSpan(0, bytesWritten);
System\Security\Cryptography\RandomNumberGenerator.cs (17)
56public virtual void GetBytes(Span<byte> data)
79public virtual void GetNonZeroBytes(Span<byte> data)
98public static void Fill(Span<byte> data)
129Span<byte> oneUintBytes = MemoryMarshal.AsBytes(new Span<uint>(ref oneUint));
178/// <seealso cref="GetHexString(Span{char}, bool)" />
179public static void GetItems<T>(ReadOnlySpan<T> choices, Span<T> destination)
201/// <seealso cref="GetHexString(Span{char}, bool)" />
226/// <seealso cref="GetItems{T}(ReadOnlySpan{T}, Span{T})" />
228/// <seealso cref="GetHexString(Span{char}, bool)" />
250/// The behavior of this is the same as using <seealso cref="GetItems{T}(ReadOnlySpan{T}, Span{T})" /> and
254public static void GetHexString(Span<char> destination, bool lowercase = false)
289public static void Shuffle<T>(Span<T> values)
306private static unsafe void GetHexStringCore(Span<char> destination, bool lowercase)
311Span<byte> randomBuffer = stackalloc byte[RandomBufferSize];
319Span<byte> remainingRandom = randomBuffer.Slice(0, Math.Min(RandomBufferSize, needed));
349private static unsafe void GetItemsCore<T>(ReadOnlySpan<T> choices, Span<T> destination)
360Span<byte> randomBytes = stackalloc byte[512];
System\Security\Cryptography\RSA.cs (21)
102public virtual bool TryDecrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, out int bytesWritten)
117public virtual bool TryEncrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, out int bytesWritten)
159/// <seealso cref="Encrypt(ReadOnlySpan{byte}, Span{byte}, RSAEncryptionPadding)" />
211public int Encrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding)
246/// <seealso cref="Decrypt(ReadOnlySpan{byte}, Span{byte}, RSAEncryptionPadding)" />
294public int Decrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding)
306protected virtual bool TryHashData(ReadOnlySpan<byte> data, Span<byte> destination, HashAlgorithmName hashAlgorithm, out int bytesWritten)
341public virtual bool TrySignHash(ReadOnlySpan<byte> hash, Span<byte> destination, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding, out int bytesWritten)
411public virtual bool TrySignData(ReadOnlySpan<byte> data, Span<byte> destination, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding, out int bytesWritten)
517Span<byte> destination,
619Span<byte> destination,
705public virtual bool TryExportRSAPrivateKey(Span<byte> destination, out int bytesWritten)
717public virtual bool TryExportRSAPublicKey(Span<byte> destination, out int bytesWritten)
723public override unsafe bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten)
759public override bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten)
804Span<byte> destination,
827Span<byte> destination,
1291public bool TryExportRSAPrivateKeyPem(Span<char> destination, out int charsWritten)
1293static bool Export(RSA alg, Span<byte> destination, out int bytesWritten)
1337public bool TryExportRSAPublicKeyPem(Span<char> destination, out int charsWritten)
1339static bool Export(RSA alg, Span<byte> destination, out int bytesWritten)
System\Security\Cryptography\SymmetricAlgorithm.cs (19)
558public int DecryptEcb(ReadOnlySpan<byte> ciphertext, Span<byte> destination, PaddingMode paddingMode)
587public bool TryDecryptEcb(ReadOnlySpan<byte> ciphertext, Span<byte> destination, PaddingMode paddingMode, out int bytesWritten)
676public int EncryptEcb(ReadOnlySpan<byte> plaintext, Span<byte> destination, PaddingMode paddingMode)
705public bool TryEncryptEcb(ReadOnlySpan<byte> plaintext, Span<byte> destination, PaddingMode paddingMode, out int bytesWritten)
773Span<byte> decryptBuffer = decryptRent.AsSpan(0, ciphertext.Length);
818Span<byte> destination,
857Span<byte> destination,
971Span<byte> destination,
1010Span<byte> destination,
1190Span<byte> destination,
1249Span<byte> destination,
1422Span<byte> destination,
1481Span<byte> destination,
1515Span<byte> destination,
1539Span<byte> destination,
1570Span<byte> destination,
1596Span<byte> destination,
1624Span<byte> destination,
1657Span<byte> destination,
System.Security.Cryptography.Cose (34)
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (7)
312public static bool TrySignDetached(ReadOnlySpan<byte> detachedContent, Span<byte> destination, CoseSigner signer, out int bytesWritten, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, ReadOnlySpan<byte> associatedData = default)
340public static bool TrySignEmbedded(ReadOnlySpan<byte> embeddedContent, Span<byte> destination, CoseSigner signer, out int bytesWritten, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, ReadOnlySpan<byte> associatedData = default)
343private static bool TrySign(ReadOnlySpan<byte> content, Span<byte> destination, CoseSigner signer, CoseHeaderMap? protectedHeaders, CoseHeaderMap? unprotectedHeaders, out int bytesWritten, ReadOnlySpan<byte> associatedData, bool isDetached)
365Span<byte> buffer,
440Span<byte> buffer,
571public override bool TryEncode(Span<byte> destination, out int bytesWritten)
782Span<byte> bufferSpan = buffer;
System\Security\Cryptography\Cose\CoseSign1Message.cs (5)
249public static bool TrySignDetached(ReadOnlySpan<byte> detachedContent, Span<byte> destination, CoseSigner signer, out int bytesWritten, ReadOnlySpan<byte> associatedData = default)
271public static bool TrySignEmbedded(ReadOnlySpan<byte> embeddedContent, Span<byte> destination, CoseSigner signer, out int bytesWritten, ReadOnlySpan<byte> associatedData = default)
274private static bool TrySign(ReadOnlySpan<byte> content, Span<byte> destination, CoseSigner signer, out int bytesWritten, ReadOnlySpan<byte> associatedData, bool isDetached)
306private static int CreateCoseSign1Message(ReadOnlySpan<byte> contentBytes, Stream? contentStream, Span<byte> buffer, CoseSigner signer, ReadOnlySpan<byte> associatedData, bool isDetached)
992public override bool TryEncode(Span<byte> destination, out int bytesWritten)
System.Security.Cryptography.Pkcs (96)
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.CryptGetProvParam.cs (1)
56Span<byte> pbData,
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Security.Cryptography.ProtectedData (7)
System.Security.Cryptography.Xml (8)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Security.Principal.Windows (3)
System.ServiceModel.NetFramingBase (2)
System.ServiceProcess.ServiceController (7)
System.Speech (1)
System.Text.Encoding.CodePages (2)
System.Text.Encodings.Web (51)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System\Text\Encodings\Web\DefaultHtmlEncoder.cs (6)
35private protected override OperationStatus EncodeCore(ReadOnlySpan<char> source, Span<char> destination, out int charsConsumed, out int charsWritten, bool isFinalBlock)
38private protected override OperationStatus EncodeUtf8Core(ReadOnlySpan<byte> utf8Source, Span<byte> utf8Destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock)
67internal override int EncodeUtf8(Rune value, Span<byte> destination)
99static int TryEncodeScalarAsHex(object @this, uint scalarValue, Span<byte> destination)
133internal override int EncodeUtf16(Rune value, Span<char> destination)
165static int TryEncodeScalarAsHex(object @this, uint scalarValue, Span<char> destination)
System\Text\Encodings\Web\DefaultJavaScriptEncoder.cs (6)
47private protected override OperationStatus EncodeCore(ReadOnlySpan<char> source, Span<char> destination, out int charsConsumed, out int charsWritten, bool isFinalBlock)
50private protected override OperationStatus EncodeUtf8Core(ReadOnlySpan<byte> utf8Source, Span<byte> utf8Destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock)
113internal override int EncodeUtf8(Rune value, Span<byte> destination)
129static int TryEncodeScalarAsHex(object @this, Rune value, Span<byte> destination)
164internal override int EncodeUtf16(Rune value, Span<char> destination)
180static int TryEncodeScalarAsHex(object @this, Rune value, Span<char> destination)
System\Text\Encodings\Web\DefaultUrlEncoder.cs (4)
110private protected override OperationStatus EncodeCore(ReadOnlySpan<char> source, Span<char> destination, out int charsConsumed, out int charsWritten, bool isFinalBlock)
113private protected override OperationStatus EncodeUtf8Core(ReadOnlySpan<byte> utf8Source, Span<byte> utf8Destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock)
142internal override int EncodeUtf8(Rune value, Span<byte> destination)
171internal override int EncodeUtf16(Rune value, Span<char> destination)
System\Text\Encodings\Web\TextEncoder.cs (12)
42private unsafe bool TryEncodeUnicodeScalar(uint unicodeScalar, Span<char> buffer, out int charsWritten)
50private bool TryEncodeUnicodeScalarUtf8(uint unicodeScalar, Span<char> utf16ScratchBuffer, Span<byte> utf8Destination, out int bytesWritten)
166Span<char> destBuffer = stringBuilder.AppendSpan(Math.Max(remainingInput.Length, minBufferBumpEachIteration));
279Span<byte> utf8Destination,
324Span<byte> utf8Destination,
333Span<char> utf16ScratchBuffer = stackalloc char[TempUtf16CharBufferLength];
409Span<char> destination,
452private protected virtual OperationStatus EncodeCore(ReadOnlySpan<char> source, Span<char> destination, out int charsConsumed, out int charsWritten, bool isFinalBlock)
522Span<char> scratchBuffer = rentedArray;
576internal static bool TryCopyCharacters(string source, Span<char> destination, out int numberOfCharactersWritten)
596internal static bool TryWriteScalarAsChar(int unicodeScalar, Span<char> destination, out int numberOfCharactersWritten)
System.Text.Json (311)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (16)
18Span<byte> utf8Unescaped = utf8Source.Length <= JsonConstants.StackallocByteThreshold ?
48Span<byte> utf8Unescaped = length <= JsonConstants.StackallocByteThreshold ?
75Span<byte> utf8Unescaped = length <= JsonConstants.StackallocByteThreshold ?
100Span<byte> utf8Unescaped = utf8Source.Length <= JsonConstants.StackallocByteThreshold ?
131Span<byte> utf8Unescaped = length <= JsonConstants.StackallocByteThreshold ?
135Span<byte> utf8Escaped = length <= JsonConstants.StackallocByteThreshold ?
173Span<byte> utf8Unescaped1 = utf8Source1.Length <= JsonConstants.StackallocByteThreshold ?
177Span<byte> utf8Unescaped2 = utf8Source2.Length <= JsonConstants.StackallocByteThreshold ?
206public static bool TryDecodeBase64InPlace(Span<byte> utf8Unescaped, [NotNullWhen(true)] out byte[]? bytes)
222Span<byte> byteSpan = utf8Unescaped.Length <= JsonConstants.StackallocByteThreshold ?
270public static int TranscodeHelper(ReadOnlySpan<byte> utf8Unescaped, Span<char> destination)
334internal static int GetUtf8FromText(ReadOnlySpan<char> text, Span<byte> dest)
356internal static void Unescape(ReadOnlySpan<byte> source, Span<byte> destination, out int written)
367internal static void Unescape(ReadOnlySpan<byte> source, Span<byte> destination, int idx, out int written)
380internal static bool TryUnescape(ReadOnlySpan<byte> source, Span<byte> destination, out int written)
391private static bool TryUnescape(ReadOnlySpan<byte> source, Span<byte> destination, int idx, out int written)
System\Text\Json\Writer\JsonWriterHelper.Escaping.cs (8)
126private static void EscapeString(ReadOnlySpan<byte> value, Span<byte> destination, JavaScriptEncoder encoder, ref int consumed, ref int written, bool isFinalBlock)
146public static void EscapeString(ReadOnlySpan<byte> value, Span<byte> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int written)
149public static void EscapeString(ReadOnlySpan<byte> value, Span<byte> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int consumed, out int written, bool isFinalBlock = true)
198private static void EscapeNextBytes(byte value, Span<byte> destination, ref int totalWritten)
250private static void EscapeString(ReadOnlySpan<char> value, Span<char> destination, JavaScriptEncoder encoder, ref int consumed, ref int written, bool isFinalBlock)
270public static void EscapeString(ReadOnlySpan<char> value, Span<char> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int written)
273public static void EscapeString(ReadOnlySpan<char> value, Span<char> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int consumed, out int written, bool isFinalBlock = true)
322private static void EscapeNextChars(char value, Span<char> destination, ref int totalWritten)
System.Text.Json.SourceGeneration (14)
System.Text.RegularExpressions (53)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Text.RegularExpressions.Generator (53)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (9)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
228Span<char> result = (bytes.Length > 16) ?
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Threading.AccessControl (1)
System.Web.HttpUtility (22)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
75public static void ToBytesBuffer(byte value, Span<byte> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
85public static void ToCharsBuffer(byte value, Span<char> buffer, int startingIndex = 0, Casing casing = Casing.Upper)
187public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
204public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
276public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
288public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
456private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
491private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Windows.Forms (50)
System.Windows.Forms.Design (7)
System.Windows.Forms.Primitives (104)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.PInvoke.KERNEL32.dll.g.cs (4)
220 internal static unsafe uint FormatMessage(winmdroot.System.Diagnostics.Debug.FORMAT_MESSAGE_OPTIONS dwFlags, [Optional] void* lpSource, uint dwMessageId, uint dwLanguageId, Span<char>lpBuffer, uint nSize, in sbyte* Arguments)
383 internal static unsafe int GetLocaleInfoEx([Optional] string lpLocaleName, uint LCType, [Optional] Span<char>lpLCData)
431 internal static unsafe uint GetModuleFileName([Optional] winmdroot.Foundation.HMODULE hModule, Span<char>lpFilename)
547 internal static unsafe uint GetShortPathName(string lpszLongPath, [Optional] Span<char>lpszShortPath)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.PInvoke.USER32.dll.g.cs (6)
855 internal static unsafe int DrawTextEx(winmdroot.Graphics.Gdi.HDC hdc, ref Span<char>lpchText, int cchText, ref winmdroot.Foundation.RECT lprc, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT format, [Optional] winmdroot.Graphics.Gdi.DRAWTEXTPARAMS? lpdtp)
1287 internal static unsafe int GetClassName(winmdroot.Foundation.HWND hWnd, Span<char>lpClassName)
1592 internal static unsafe int GetKeyboardLayoutList([Optional] Span<winmdroot.UI.Input.KeyboardAndMouse.HKL> lpList)
1632 internal static unsafe winmdroot.Foundation.BOOL GetKeyboardState(Span<byte> lpKeyState)
2135 internal static unsafe winmdroot.Foundation.BOOL GetUserObjectInformation(winmdroot.Foundation.HANDLE hObj, winmdroot.System.StationsAndDesktops.USER_OBJECT_INFORMATION_INDEX nIndex, [Optional] Span<byte> pvInfo, out uint lpnLengthNeeded)
2149 internal static unsafe winmdroot.Foundation.BOOL GetUserObjectInformation(winmdroot.Foundation.HANDLE hObj, winmdroot.System.StationsAndDesktops.USER_OBJECT_INFORMATION_INDEX nIndex, [Optional] Span<byte> pvInfo)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.PInvoke.UXTHEME.dll.g.cs (6)
247 internal static unsafe winmdroot.Foundation.HRESULT GetCurrentThemeName(Span<char>pszThemeFileName, [Optional] Span<char>pszColorBuff, [Optional] Span<char>pszSizeBuff)
551 internal static unsafe winmdroot.Foundation.HRESULT GetThemeDocumentationProperty(string pszThemeName, string pszPropertyName, Span<char>pszValueBuff)
639 internal static unsafe winmdroot.Foundation.HRESULT GetThemeFilename(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, Span<char>pszThemeFileName)
941 internal static unsafe winmdroot.Foundation.HRESULT GetThemeString(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, int iPropId, Span<char>pszBuff)