661 instantiations of Span
BuildValidator (3)
GenerateDocumentationAndConfigFiles (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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));
Interop.FunctionalTests (3)
Metrics (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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));
Metrics.Legacy (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.DataProtection (7)
Managed\AesGcmAuthenticatedEncryptor.cs (6)
122var nonce = new Span<byte>(ciphertext.Array, nonceOffset, NONCE_SIZE_IN_BYTES);
123var tag = new Span<byte>(ciphertext.Array, tagOffset, TAG_SIZE_IN_BYTES);
124var encrypted = new Span<byte>(ciphertext.Array, encryptedDataOffset, plaintextBytes);
195var nonce = new Span<byte>(retVal, nonceOffset, NONCE_SIZE_IN_BYTES);
196var tag = new Span<byte>(retVal, tagOffset, TAG_SIZE_IN_BYTES);
197var encrypted = new Span<byte>(retVal, encryptedDataOffset, plaintext.Count);
Microsoft.AspNetCore.Http.Connections.Common (1)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.Server.HttpSys (7)
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (1)
Microsoft.AspNetCore.Server.HttpSys.Tests (13)
RequestHeaderTests.cs (13)
23var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
64var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
105var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
124var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
143var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
190var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
212var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
234var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
255var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
275var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
297var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
319var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
340var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
Microsoft.AspNetCore.Server.IIS (5)
Microsoft.AspNetCore.Server.Kestrel.Core (5)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (20)
BufferWriterTests.cs (6)
51writer.Write(new Span<byte>(array, 0, 0));
52writer.Write(new Span<byte>(array, array.Length, 0));
56writer.Write(new Span<byte>(array, offset, length));
64writer.Write(new Span<byte>(array, 0, array.Length));
80writer.Write(new Span<byte>(array, offset, length));
98writer.Write(new Span<byte>(array, 0, array.Length));
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (6)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (3)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (3)
Microsoft.AspNetCore.Shared.Tests (11)
Microsoft.AspNetCore.SignalR.Common (2)
Microsoft.AspNetCore.SignalR.Protocols.Json (2)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (2)
Microsoft.AspNetCore.WebUtilities (3)
Microsoft.AspNetCore.WebUtilities.Tests (3)
Microsoft.CodeAnalysis (9)
Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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 (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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 (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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.BannedApiAnalyzers (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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 (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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.PerformanceSensitiveAnalyzers (9)
Microsoft.CodeAnalysis.PublicApiAnalyzers (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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 (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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 (10)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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.DotNet.XUnitAssert.Tests (2)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.Extensions.Caching.Hybrid.Tests (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)
PresentationCore (1)
PresentationFramework (4)
Roslyn.Diagnostics.Analyzers (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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));
Shared (1)
System.Collections.Immutable (4)
System.ComponentModel.TypeConverter (1)
System.Console (3)
System.Data.Common (1)
System.Diagnostics.DiagnosticSource (1)
System.Diagnostics.Process (2)
System.Drawing.Common (6)
System.Formats.Asn1 (5)
System.Formats.Cbor (1)
System.Formats.Tar (1)
System.IO.Compression (6)
System.IO.Compression.Brotli (4)
System.IO.Hashing (9)
System\IO\Hashing\XxHashShared.cs (9)
117Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
168DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes));
251source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length));
266source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize));
305source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
318source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes));
322Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex);
381new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes));
382new 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 (1)
System.Memory.Data (2)
System.Net.Http (6)
System.Net.Mail (1)
System.Net.NameResolution (2)
System.Net.Ping (2)
System.Net.Primitives (4)
System.Net.Quic (10)
System.Net.Requests (1)
System.Net.Security (11)
System.Net.ServerSentEvents (1)
System.Net.Sockets (9)
System\Net\Sockets\SocketAsyncContext.Unix.cs (2)
547bool completed = SocketPal.TryCompleteReceiveFrom(context._socket, new Span<byte>(BufferPtr, Length), null, Flags, SocketAddress.Span, out int socketAddressLen, out BytesTransferred, out ReceivedFlags, out ErrorCode);
604bool 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 (5)
792received = SysReceive(socket, flags | SocketFlags.Peek, new Span<byte>(&oneBytePeekBuffer, 1), out errno);
860received = SysReceive(socket, flags | SocketFlags.Peek, new Span<byte>(&oneBytePeekBuffer, 1), socketAddress, out receivedSocketAddressLength, out receivedFlags, out errno);
1288bool completed = TryCompleteReceive(handle, new Span<byte>(buffer, offset, count), socketFlags, out bytesTransferred, out errorCode);
1318if (!TryCompleteReceiveMessageFrom(handle, new Span<byte>(buffer, offset, count), null, socketFlags, socketAddress.Buffer, out socketAddressLen, isIPv4, isIPv6, out bytesTransferred, out socketFlags, out ipPacketInformation, out errorCode))
1363bool completed = TryCompleteReceiveFrom(handle, new Span<byte>(buffer, offset, count), socketFlags, socketAddress.Span, out socketAddressLen, out bytesTransferred, out socketFlags, out errorCode);
System.Net.WebClient (1)
System.Net.WebSockets (4)
System.Private.CoreLib (170)
src\libraries\System.Private.CoreLib\src\System\Array.cs (8)
1482new Span<T>(array).Fill(value);
1513new Span<T>(ref first, count).Fill(value);
2498var span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(array), array.Length);
2547var span = new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index), length);
2571var spanKeys = new Span<TKey>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(keys), index), length);
2572var spanItems = new Span<TValue>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(items), index), length);
2589var span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(array), array.Length);
3056new Span<T>(ref Unsafe.As<byte, T>(ref MemoryMarshal.GetArrayDataReference(array)), array.Length).Slice(adjustedIndex, length);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (6)
933TryFormatS(dateTime, new Span<char>(ref str.GetRawStringData(), str.Length), out int charsWritten);
940TryFormatInvariantG(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out int charsWritten);
959TryFormatInvariantG(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out int charsWritten);
985TryFormatR(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out charsWritten);
992TryFormatS(dateTime, new Span<char>(ref str.GetRawStringData(), str.Length), out charsWritten);
999TryFormatu(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out charsWritten);
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);
3697return new Span<T>(array);
3715return new Span<T>(array, start, length);
3724return new Span<T>(segment.Array, segment.Offset, segment.Count);
3744return new Span<T>(segment.Array, segment.Offset + start, segment.Count - start);
3780return new Span<T>(segment.Array, segment.Offset + start, length);
3792return new Span<T>(segment.Array, segment.Offset + start, length);
src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (14)
343var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize));
371var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize));
715var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize));
774var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize));
829var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize));
886var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize));
945var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize));
1006var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize));
1061var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize));
1118var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize));
1179var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize));
1240var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize));
1297var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize));
1354var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize));
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));
1018s.CopyTo(new Span<char>((char*)ptr, s.Length));
1036int nbWritten = Encoding.UTF8.GetBytes(s, new Span<byte>(pbMem, nb));
1059s.CopyTo(new Span<char>((char*)ptr, s.Length));
1077int nbWritten = Encoding.UTF8.GetBytes(s, new Span<byte>(pbMem, nb));
1290s.CopyTo(new Span<char>((char*)bstr, s.Length)); // AllocBSTR already included the null terminator
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (4)
372CopyTo(startIndex, new Span<char>(ref result.GetRawStringData(), result.Length), result.Length);
852value.CopyTo(startIndex, new Span<char>(m_ChunkChars, m_ChunkLength, length), length);
881CopyTo(sourceIndex, new Span<char>(destination).Slice(destinationIndex), count);
2523get => 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)
284new Span<sbyte>(psa->pvData, array.Length)
288new Span<byte>(psa->pvData, array.Length)
292new Span<short>(psa->pvData, array.Length)
296new Span<ushort>(psa->pvData, array.Length)
301new Span<int>(psa->pvData, array.Length)
307new Span<uint>(psa->pvData, array.Length)
311new Span<long>(psa->pvData, array.Length)
315new Span<ulong>(psa->pvData, array.Length)
319new Span<float>(psa->pvData, array.Length)
323new Span<double>(psa->pvData, array.Length)
328Span<VARIANT_BOOL> data = new(psa->pvData, array.Length);
340Span<DECIMAL> data = new(psa->pvData, array.Length);
352Span<long> data = new(psa->pvData, array.Length);
364Span<double> data = new(psa->pvData, array.Length);
376Span<IntPtr> data = new(psa->pvData, array.Length);
389Span<IntPtr> data = new(psa->pvData, array.Length);
401Span<VARIANT> data = new(psa->pvData, array.Length);
751return new Span<sbyte>(ca.pElems, (int)ca.cElems).ToArray();
753return new Span<byte>(ca.pElems, (int)ca.cElems).ToArray();
755return new Span<short>(ca.pElems, (int)ca.cElems).ToArray();
757return new Span<ushort>(ca.pElems, (int)ca.cElems).ToArray();
760Span<VARIANT_BOOL> data = new(ca.pElems, (int)ca.cElems);
772return new Span<int>(ca.pElems, (int)ca.cElems).ToArray();
776return new Span<uint>(ca.pElems, (int)ca.cElems).ToArray();
778return new Span<long>(ca.pElems, (int)ca.cElems).ToArray();
780return new Span<ulong>(ca.pElems, (int)ca.cElems).ToArray();
782return new Span<float>(ca.pElems, (int)ca.cElems).ToArray();
784return new Span<double>(ca.pElems, (int)ca.cElems).ToArray();
787Span<long> data = new(ca.pElems, (int)ca.cElems);
799Span<double> data = new(ca.pElems, (int)ca.cElems);
811var data = new Span<FILETIME>(ca.pElems, (int)ca.cElems);
822return new Span<Guid>(ca.pElems, (int)ca.cElems).ToArray();
826Span<IntPtr> data = new(ca.pElems, (int)ca.cElems);
838Span<IntPtr> data = new(ca.pElems, (int)ca.cElems);
850Span<VARIANT> data = new(ca.pElems, (int)ca.cElems);
System.Private.Xml (1)
System.Reflection.Metadata (3)
System.Runtime.Numerics (1)
System.Security.Cryptography (22)
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 (5)
System.Security.Cryptography.ProtectedData (1)
System.Text.Encoding.CodePages (1)
System.Text.Encodings.Web (2)
System.Text.Json (6)
System.Windows.Forms (5)
System.Windows.Forms.Design (1)
System.Windows.Forms.Primitives (6)
System.Windows.Forms.Primitives.Tests (2)
Test.Utilities (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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));
Text.Analyzers (9)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
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));
8492 references to Span
aspire (1)
Aspire.Dashboard (4)
Aspire.Hosting (5)
Aspire.Hosting.Docker (1)
Aspire.Playground.Tests (3)
BuildValidator (3)
GenerateDocumentationAndConfigFiles (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
http2cat (55)
src\Shared\Http2cat\HPackHeaderWriter.cs (5)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
86private static bool EncodeHeader(string name, string value, Span<byte> buffer, out int length)
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 =
IIS.FunctionalTests (55)
src\Shared\Http2cat\HPackHeaderWriter.cs (5)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
86private static bool EncodeHeader(string name, string value, Span<byte> buffer, out int length)
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 =
IIS.LongTests (55)
src\Shared\Http2cat\HPackHeaderWriter.cs (5)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
86private static bool EncodeHeader(string name, string value, Span<byte> buffer, out int length)
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 =
IIS.NewHandler.FunctionalTests (55)
src\Shared\Http2cat\HPackHeaderWriter.cs (5)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
86private static bool EncodeHeader(string name, string value, Span<byte> buffer, out int length)
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 =
IIS.NewShim.FunctionalTests (55)
src\Shared\Http2cat\HPackHeaderWriter.cs (5)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
86private static bool EncodeHeader(string name, string value, Span<byte> buffer, out int length)
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 =
IIS.ShadowCopy.Tests (10)
IISExpress.FunctionalTests (55)
src\Shared\Http2cat\HPackHeaderWriter.cs (5)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
86private static bool EncodeHeader(string name, string value, Span<byte> buffer, out int length)
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 =
illink (6)
ILLink.RoslynAnalyzer (16)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
222Span<char> result = (bytes.Length > 16) ?
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
InMemory.FunctionalTests (36)
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)
Interop.FunctionalTests (5)
Metrics (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
Metrics.Legacy (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
Microsoft.AspNetCore.App.Analyzers (1)
Microsoft.AspNetCore.Authentication.Certificate (2)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
Microsoft.AspNetCore.Components (24)
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 (12)
Microsoft.AspNetCore.Components.Forms (3)
Microsoft.AspNetCore.Components.Forms.Tests (5)
Microsoft.AspNetCore.Components.Server (83)
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.Server.Tests (10)
Microsoft.AspNetCore.Components.Web (3)
Microsoft.AspNetCore.DataProtection (40)
Managed\AesGcmAuthenticatedEncryptor.cs (8)
119validationSubkey: Span<byte>.Empty /* filling in derivedKey only */ );
122var nonce = new Span<byte>(ciphertext.Array, nonceOffset, NONCE_SIZE_IN_BYTES);
123var tag = new Span<byte>(ciphertext.Array, tagOffset, TAG_SIZE_IN_BYTES);
124var encrypted = new Span<byte>(ciphertext.Array, encryptedDataOffset, plaintextBytes);
192validationSubkey: Span<byte>.Empty /* filling in derivedKey only */ );
195var nonce = new Span<byte>(retVal, nonceOffset, NONCE_SIZE_IN_BYTES);
196var tag = new Span<byte>(retVal, tagOffset, TAG_SIZE_IN_BYTES);
197var encrypted = new Span<byte>(retVal, encryptedDataOffset, plaintext.Count);
Microsoft.AspNetCore.DataProtection.Abstractions (2)
Microsoft.AspNetCore.DataProtection.Tests (2)
Microsoft.AspNetCore.Diagnostics.Middleware (4)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Abstractions (18)
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 (5)
Microsoft.AspNetCore.Http.Connections.Common (3)
Microsoft.AspNetCore.Http.Extensions (13)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.HttpLogging (11)
Microsoft.AspNetCore.Identity (3)
Microsoft.AspNetCore.Identity.FunctionalTests (6)
Microsoft.AspNetCore.Localization (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.OpenApi (5)
Microsoft.AspNetCore.OutputCaching (6)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (2)
Microsoft.AspNetCore.Razor.Runtime (1)
Microsoft.AspNetCore.ResponseCaching (1)
Microsoft.AspNetCore.Rewrite (1)
Microsoft.AspNetCore.Routing (14)
Microsoft.AspNetCore.Routing.Microbenchmarks (4)
Microsoft.AspNetCore.Routing.Tests (8)
Microsoft.AspNetCore.Server.HttpSys (39)
RequestProcessing\ResponseBody.cs (7)
144Span<GCHandle> pinnedBuffers = default;
147BuildDataChunks(ref allocator, endOfRequest, data, out var dataChunks, out pinnedBuffers);
190private unsafe void BuildDataChunks(scoped ref UnmanagedBufferAllocator allocator, bool endOfRequest, ArraySegment<byte> data, out Span<HTTP_DATA_CHUNK> dataChunks, out Span<GCHandle> pins)
276Span<HTTP_DATA_CHUNK> chunks,
286Span<HTTP_DATA_CHUNK> chunks,
299private static void FreeDataBuffers(Span<GCHandle> pinnedBuffers)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (54)
src\Shared\Http2cat\HPackHeaderWriter.cs (5)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length)
59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
86private static bool EncodeHeader(string name, string value, Span<byte> buffer, out int length)
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 =
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (9)
Microsoft.AspNetCore.Server.HttpSys.Tests (32)
RequestHeaderTests.cs (32)
23var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
44Span<byte> nativeMemory = buffer.Span;
64var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
85Span<byte> nativeMemory = buffer.Span;
105var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
124var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
143var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
146var remainingMemory = SetUnknownHeaders(nativeMemory, ref requestStructure, new[] { (CustomHeader1, "1"), (CustomHeader2, null) });
167Span<byte> nativeMemory = buffer.Span;
170var remainingMemory = SetUnknownHeaders(nativeMemory, ref requestStructure, new[] { (CustomHeader1, "1"), (CustomHeader2, null) });
190var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
212var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
234var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
255var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
275var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
297var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
319var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
340var nativeMemory = new Span<byte>(nativeContext.NativeRequest, (int)nativeContext.Size + 8);
356private static unsafe Span<byte> SetHostAndContentTypeHeaders(Span<byte> nativeMemory, ref HTTP_REQUEST_V1 requestStructure)
359var dataDestination = nativeMemory.Slice(Marshal.SizeOf<HTTP_REQUEST_V1>());
380private static unsafe Span<byte> SetInvalidHostHeader(Span<byte> nativeMemory, ref HTTP_REQUEST_V1 requestStructure)
383var dataDestination = nativeMemory.Slice(Marshal.SizeOf<HTTP_REQUEST_V1>());
400private static unsafe Span<byte> SetUnknownHeaders(Span<byte> nativeMemory, ref HTTP_REQUEST_V1 requestStructure, IReadOnlyCollection<(string Key, string Value)> headerNames)
402var unknownHeaderStructureDestination = nativeMemory.Slice(Marshal.SizeOf<HTTP_REQUEST_V1>());
410var dataDestination = unknownHeaderStructureDestination.Slice(unknownHeadersSize * headerNames.Count);
438private static unsafe Span<byte> SetInvalidUnknownHeaders(Span<byte> nativeMemory, ref HTTP_REQUEST_V1 requestStructure, IReadOnlyCollection<string> headerNames)
440var unknownHeaderStructureDestination = nativeMemory.Slice(Marshal.SizeOf<HTTP_REQUEST_V1>());
450var dataDestination = unknownHeaderStructureDestination.Slice(unknownHeadersSize * headerNames.Count);
Microsoft.AspNetCore.Server.IIS (31)
Microsoft.AspNetCore.Server.Kestrel.Core (148)
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\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\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\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\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\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.Core.Tests (80)
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)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (30)
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)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (5)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (7)
Microsoft.AspNetCore.Session (1)
Microsoft.AspNetCore.Shared.Tests (105)
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\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\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\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.SignalR.Client.Core (1)
Microsoft.AspNetCore.SignalR.Client.Tests (3)
Microsoft.AspNetCore.SignalR.Common (7)
Microsoft.AspNetCore.SignalR.Common.Tests (3)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.AspNetCore.SignalR.Microbenchmarks (4)
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.StaticAssets.Tests (1)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.WebSockets (15)
Microsoft.AspNetCore.WebUtilities (22)
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.WebUtilities.Tests (2)
Microsoft.CodeAnalysis (51)
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 (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
Microsoft.CodeAnalysis.AnalyzerUtilities (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
Microsoft.CodeAnalysis.BannedApiAnalyzers (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
Microsoft.CodeAnalysis.CodeStyle (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
Microsoft.CodeAnalysis.Collections.Package (27)
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.CSharp (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
44nameof(Span<>),
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (6)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
44nameof(Span<>),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Microsoft.CodeAnalysis.Extensions.Package (29)
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.InteractiveHost (27)
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.LanguageServer.Protocol (3)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (49)
Microsoft.CodeAnalysis.PublicApiAnalyzers (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
Microsoft.CodeAnalysis.Remote.Workspaces (3)
Microsoft.CodeAnalysis.ResxSourceGenerator (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
Microsoft.CodeAnalysis.Threading.Package (27)
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.Workspaces (73)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (27)
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.Workspaces.UnitTests (6)
Microsoft.Data.Analysis (655)
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.netstandard.cs (440)
28protected override void And(ReadOnlySpan<bool> x, ReadOnlySpan<bool> y, Span<bool> destination)
39protected override void And(ReadOnlySpan<bool> x, bool y, Span<bool> destination)
50protected override void And(bool x, ReadOnlySpan<bool> y, Span<bool> destination)
61protected override void Or(ReadOnlySpan<bool> x, ReadOnlySpan<bool> y, Span<bool> destination)
72protected override void Or(ReadOnlySpan<bool> x, bool y, Span<bool> destination)
83protected override void Or(bool x, ReadOnlySpan<bool> y, Span<bool> destination)
94protected override void Xor(ReadOnlySpan<bool> x, ReadOnlySpan<bool> y, Span<bool> destination)
105protected override void Xor(ReadOnlySpan<bool> x, bool y, Span<bool> destination)
116protected override void Xor(bool x, ReadOnlySpan<bool> y, Span<bool> destination)
127protected override void ElementwiseEquals(ReadOnlySpan<bool> x, ReadOnlySpan<bool> y, Span<bool> destination)
135protected override void ElementwiseEquals(ReadOnlySpan<bool> x, bool y, Span<bool> destination)
143protected override void ElementwiseNotEquals(ReadOnlySpan<bool> x, ReadOnlySpan<bool> y, Span<bool> destination)
151protected override void ElementwiseNotEquals(ReadOnlySpan<bool> x, bool y, Span<bool> destination)
162protected override void Add(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<byte> destination)
194protected override void Add(ReadOnlySpan<byte> x, byte y, Span<byte> destination)
205protected override void Add(byte x, ReadOnlySpan<byte> y, Span<byte> destination)
216protected override void Subtract(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<byte> destination)
248protected override void Subtract(ReadOnlySpan<byte> x, byte y, Span<byte> destination)
259protected override void Subtract(byte x, ReadOnlySpan<byte> y, Span<byte> destination)
270protected override void Multiply(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<byte> destination)
302protected override void Multiply(ReadOnlySpan<byte> x, byte y, Span<byte> destination)
313protected override void Multiply(byte x, ReadOnlySpan<byte> y, Span<byte> destination)
329protected override void Divide(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<byte> destination)
361protected override void Divide(ReadOnlySpan<byte> x, byte y, Span<byte> destination)
372protected override void Divide(byte x, ReadOnlySpan<byte> y, Span<byte> destination)
388protected override void Modulo(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<byte> destination)
399protected override void Modulo(ReadOnlySpan<byte> x, byte y, Span<byte> destination)
410protected override void Modulo(byte x, ReadOnlySpan<byte> y, Span<byte> destination)
421protected override void And(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<byte> destination)
432protected override void And(ReadOnlySpan<byte> x, byte y, Span<byte> destination)
443protected override void And(byte x, ReadOnlySpan<byte> y, Span<byte> destination)
454protected override void Or(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<byte> destination)
465protected override void Or(ReadOnlySpan<byte> x, byte y, Span<byte> destination)
476protected override void Or(byte x, ReadOnlySpan<byte> y, Span<byte> destination)
487protected override void Xor(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<byte> destination)
498protected override void Xor(ReadOnlySpan<byte> x, byte y, Span<byte> destination)
509protected override void Xor(byte x, ReadOnlySpan<byte> y, Span<byte> destination)
520protected override void LeftShift(ReadOnlySpan<byte> x, int y, Span<byte> destination)
526protected override void RightShift(ReadOnlySpan<byte> x, int y, Span<byte> destination)
532protected override void ElementwiseEquals(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<bool> destination)
540protected override void ElementwiseEquals(ReadOnlySpan<byte> x, byte y, Span<bool> destination)
548protected override void ElementwiseNotEquals(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<bool> destination)
556protected override void ElementwiseNotEquals(ReadOnlySpan<byte> x, byte y, Span<bool> destination)
564protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<bool> destination)
572protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<byte> x, byte y, Span<bool> destination)
580protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<bool> destination)
588protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<byte> x, byte y, Span<bool> destination)
596protected override void ElementwiseGreaterThan(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<bool> destination)
604protected override void ElementwiseGreaterThan(ReadOnlySpan<byte> x, byte y, Span<bool> destination)
612protected override void ElementwiseLessThan(ReadOnlySpan<byte> x, ReadOnlySpan<byte> y, Span<bool> destination)
620protected override void ElementwiseLessThan(ReadOnlySpan<byte> x, byte y, Span<bool> destination)
631protected override void Add(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<char> destination)
663protected override void Add(ReadOnlySpan<char> x, char y, Span<char> destination)
674protected override void Add(char x, ReadOnlySpan<char> y, Span<char> destination)
685protected override void Subtract(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<char> destination)
717protected override void Subtract(ReadOnlySpan<char> x, char y, Span<char> destination)
728protected override void Subtract(char x, ReadOnlySpan<char> y, Span<char> destination)
739protected override void Multiply(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<char> destination)
771protected override void Multiply(ReadOnlySpan<char> x, char y, Span<char> destination)
782protected override void Multiply(char x, ReadOnlySpan<char> y, Span<char> destination)
798protected override void Divide(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<char> destination)
830protected override void Divide(ReadOnlySpan<char> x, char y, Span<char> destination)
841protected override void Divide(char x, ReadOnlySpan<char> y, Span<char> destination)
857protected override void Modulo(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<char> destination)
868protected override void Modulo(ReadOnlySpan<char> x, char y, Span<char> destination)
879protected override void Modulo(char x, ReadOnlySpan<char> y, Span<char> destination)
890protected override void And(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<char> destination)
901protected override void And(ReadOnlySpan<char> x, char y, Span<char> destination)
912protected override void And(char x, ReadOnlySpan<char> y, Span<char> destination)
923protected override void Or(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<char> destination)
934protected override void Or(ReadOnlySpan<char> x, char y, Span<char> destination)
945protected override void Or(char x, ReadOnlySpan<char> y, Span<char> destination)
956protected override void Xor(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<char> destination)
967protected override void Xor(ReadOnlySpan<char> x, char y, Span<char> destination)
978protected override void Xor(char x, ReadOnlySpan<char> y, Span<char> destination)
989protected override void LeftShift(ReadOnlySpan<char> x, int y, Span<char> destination)
995protected override void RightShift(ReadOnlySpan<char> x, int y, Span<char> destination)
1001protected override void ElementwiseEquals(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<bool> destination)
1009protected override void ElementwiseEquals(ReadOnlySpan<char> x, char y, Span<bool> destination)
1017protected override void ElementwiseNotEquals(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<bool> destination)
1025protected override void ElementwiseNotEquals(ReadOnlySpan<char> x, char y, Span<bool> destination)
1033protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<bool> destination)
1041protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<char> x, char y, Span<bool> destination)
1049protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<bool> destination)
1057protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<char> x, char y, Span<bool> destination)
1065protected override void ElementwiseGreaterThan(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<bool> destination)
1073protected override void ElementwiseGreaterThan(ReadOnlySpan<char> x, char y, Span<bool> destination)
1081protected override void ElementwiseLessThan(ReadOnlySpan<char> x, ReadOnlySpan<char> y, Span<bool> destination)
1089protected override void ElementwiseLessThan(ReadOnlySpan<char> x, char y, Span<bool> destination)
1100protected override void Add(ReadOnlySpan<decimal> x, ReadOnlySpan<decimal> y, Span<decimal> destination)
1111protected override void Add(ReadOnlySpan<decimal> x, decimal y, Span<decimal> destination)
1122protected override void Add(decimal x, ReadOnlySpan<decimal> y, Span<decimal> destination)
1133protected override void Subtract(ReadOnlySpan<decimal> x, ReadOnlySpan<decimal> y, Span<decimal> destination)
1144protected override void Subtract(ReadOnlySpan<decimal> x, decimal y, Span<decimal> destination)
1155protected override void Subtract(decimal x, ReadOnlySpan<decimal> y, Span<decimal> destination)
1166protected override void Multiply(ReadOnlySpan<decimal> x, ReadOnlySpan<decimal> y, Span<decimal> destination)
1177protected override void Multiply(ReadOnlySpan<decimal> x, decimal y, Span<decimal> destination)
1188protected override void Multiply(decimal x, ReadOnlySpan<decimal> y, Span<decimal> destination)
1204protected override void Divide(ReadOnlySpan<decimal> x, ReadOnlySpan<decimal> y, Span<decimal> destination)
1215protected override void Divide(ReadOnlySpan<decimal> x, decimal y, Span<decimal> destination)
1226protected override void Divide(decimal x, ReadOnlySpan<decimal> y, Span<decimal> destination)
1242protected override void Modulo(ReadOnlySpan<decimal> x, ReadOnlySpan<decimal> y, Span<decimal> destination)
1253protected override void Modulo(ReadOnlySpan<decimal> x, decimal y, Span<decimal> destination)
1264protected override void Modulo(decimal x, ReadOnlySpan<decimal> y, Span<decimal> destination)
1275protected override void ElementwiseEquals(ReadOnlySpan<decimal> x, ReadOnlySpan<decimal> y, Span<bool> destination)
1283protected override void ElementwiseEquals(ReadOnlySpan<decimal> x, decimal y, Span<bool> destination)
1291protected override void ElementwiseNotEquals(ReadOnlySpan<decimal> x, ReadOnlySpan<decimal> y, Span<bool> destination)
1299protected override void ElementwiseNotEquals(ReadOnlySpan<decimal> x, decimal y, Span<bool> destination)
1307protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<decimal> x, ReadOnlySpan<decimal> y, Span<bool> destination)
1315protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<decimal> x, decimal y, Span<bool> destination)
1323protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<decimal> x, ReadOnlySpan<decimal> y, Span<bool> destination)
1331protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<decimal> x, decimal y, Span<bool> destination)
1339protected override void ElementwiseGreaterThan(ReadOnlySpan<decimal> x, ReadOnlySpan<decimal> y, Span<bool> destination)
1347protected override void ElementwiseGreaterThan(ReadOnlySpan<decimal> x, decimal y, Span<bool> destination)
1355protected override void ElementwiseLessThan(ReadOnlySpan<decimal> x, ReadOnlySpan<decimal> y, Span<bool> destination)
1363protected override void ElementwiseLessThan(ReadOnlySpan<decimal> x, decimal y, Span<bool> destination)
1374protected override void Add(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Span<double> destination)
1406protected override void Add(ReadOnlySpan<double> x, double y, Span<double> destination)
1417protected override void Add(double x, ReadOnlySpan<double> y, Span<double> destination)
1428protected override void Subtract(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Span<double> destination)
1460protected override void Subtract(ReadOnlySpan<double> x, double y, Span<double> destination)
1471protected override void Subtract(double x, ReadOnlySpan<double> y, Span<double> destination)
1482protected override void Multiply(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Span<double> destination)
1514protected override void Multiply(ReadOnlySpan<double> x, double y, Span<double> destination)
1525protected override void Multiply(double x, ReadOnlySpan<double> y, Span<double> destination)
1541protected override void Divide(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Span<double> destination)
1573protected override void Divide(ReadOnlySpan<double> x, double y, Span<double> destination)
1584protected override void Divide(double x, ReadOnlySpan<double> y, Span<double> destination)
1600protected override void Modulo(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Span<double> destination)
1611protected override void Modulo(ReadOnlySpan<double> x, double y, Span<double> destination)
1622protected override void Modulo(double x, ReadOnlySpan<double> y, Span<double> destination)
1633protected override void ElementwiseEquals(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Span<bool> destination)
1641protected override void ElementwiseEquals(ReadOnlySpan<double> x, double y, Span<bool> destination)
1649protected override void ElementwiseNotEquals(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Span<bool> destination)
1657protected override void ElementwiseNotEquals(ReadOnlySpan<double> x, double y, Span<bool> destination)
1665protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Span<bool> destination)
1673protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<double> x, double y, Span<bool> destination)
1681protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Span<bool> destination)
1689protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<double> x, double y, Span<bool> destination)
1697protected override void ElementwiseGreaterThan(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Span<bool> destination)
1705protected override void ElementwiseGreaterThan(ReadOnlySpan<double> x, double y, Span<bool> destination)
1713protected override void ElementwiseLessThan(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Span<bool> destination)
1721protected override void ElementwiseLessThan(ReadOnlySpan<double> x, double y, Span<bool> destination)
1732protected override void Add(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination)
1764protected override void Add(ReadOnlySpan<float> x, float y, Span<float> destination)
1775protected override void Add(float x, ReadOnlySpan<float> y, Span<float> destination)
1786protected override void Subtract(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination)
1818protected override void Subtract(ReadOnlySpan<float> x, float y, Span<float> destination)
1829protected override void Subtract(float x, ReadOnlySpan<float> y, Span<float> destination)
1840protected override void Multiply(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination)
1872protected override void Multiply(ReadOnlySpan<float> x, float y, Span<float> destination)
1883protected override void Multiply(float x, ReadOnlySpan<float> y, Span<float> destination)
1899protected override void Divide(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination)
1931protected override void Divide(ReadOnlySpan<float> x, float y, Span<float> destination)
1942protected override void Divide(float x, ReadOnlySpan<float> y, Span<float> destination)
1958protected override void Modulo(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination)
1969protected override void Modulo(ReadOnlySpan<float> x, float y, Span<float> destination)
1980protected override void Modulo(float x, ReadOnlySpan<float> y, Span<float> destination)
1991protected override void ElementwiseEquals(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<bool> destination)
1999protected override void ElementwiseEquals(ReadOnlySpan<float> x, float y, Span<bool> destination)
2007protected override void ElementwiseNotEquals(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<bool> destination)
2015protected override void ElementwiseNotEquals(ReadOnlySpan<float> x, float y, Span<bool> destination)
2023protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<bool> destination)
2031protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<float> x, float y, Span<bool> destination)
2039protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<bool> destination)
2047protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<float> x, float y, Span<bool> destination)
2055protected override void ElementwiseGreaterThan(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<bool> destination)
2063protected override void ElementwiseGreaterThan(ReadOnlySpan<float> x, float y, Span<bool> destination)
2071protected override void ElementwiseLessThan(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<bool> destination)
2079protected override void ElementwiseLessThan(ReadOnlySpan<float> x, float y, Span<bool> destination)
2090protected override void Add(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<int> destination)
2122protected override void Add(ReadOnlySpan<int> x, int y, Span<int> destination)
2133protected override void Add(int x, ReadOnlySpan<int> y, Span<int> destination)
2144protected override void Subtract(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<int> destination)
2176protected override void Subtract(ReadOnlySpan<int> x, int y, Span<int> destination)
2187protected override void Subtract(int x, ReadOnlySpan<int> y, Span<int> destination)
2198protected override void Multiply(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<int> destination)
2230protected override void Multiply(ReadOnlySpan<int> x, int y, Span<int> destination)
2241protected override void Multiply(int x, ReadOnlySpan<int> y, Span<int> destination)
2257protected override void Divide(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<int> destination)
2289protected override void Divide(ReadOnlySpan<int> x, int y, Span<int> destination)
2300protected override void Divide(int x, ReadOnlySpan<int> y, Span<int> destination)
2316protected override void Modulo(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<int> destination)
2327protected override void Modulo(ReadOnlySpan<int> x, int y, Span<int> destination)
2338protected override void Modulo(int x, ReadOnlySpan<int> y, Span<int> destination)
2349protected override void And(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<int> destination)
2360protected override void And(ReadOnlySpan<int> x, int y, Span<int> destination)
2371protected override void And(int x, ReadOnlySpan<int> y, Span<int> destination)
2382protected override void Or(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<int> destination)
2393protected override void Or(ReadOnlySpan<int> x, int y, Span<int> destination)
2404protected override void Or(int x, ReadOnlySpan<int> y, Span<int> destination)
2415protected override void Xor(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<int> destination)
2426protected override void Xor(ReadOnlySpan<int> x, int y, Span<int> destination)
2437protected override void Xor(int x, ReadOnlySpan<int> y, Span<int> destination)
2448protected override void LeftShift(ReadOnlySpan<int> x, int y, Span<int> destination)
2454protected override void RightShift(ReadOnlySpan<int> x, int y, Span<int> destination)
2460protected override void ElementwiseEquals(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<bool> destination)
2468protected override void ElementwiseEquals(ReadOnlySpan<int> x, int y, Span<bool> destination)
2476protected override void ElementwiseNotEquals(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<bool> destination)
2484protected override void ElementwiseNotEquals(ReadOnlySpan<int> x, int y, Span<bool> destination)
2492protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<bool> destination)
2500protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<int> x, int y, Span<bool> destination)
2508protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<bool> destination)
2516protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<int> x, int y, Span<bool> destination)
2524protected override void ElementwiseGreaterThan(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<bool> destination)
2532protected override void ElementwiseGreaterThan(ReadOnlySpan<int> x, int y, Span<bool> destination)
2540protected override void ElementwiseLessThan(ReadOnlySpan<int> x, ReadOnlySpan<int> y, Span<bool> destination)
2548protected override void ElementwiseLessThan(ReadOnlySpan<int> x, int y, Span<bool> destination)
2559protected override void Add(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<long> destination)
2591protected override void Add(ReadOnlySpan<long> x, long y, Span<long> destination)
2602protected override void Add(long x, ReadOnlySpan<long> y, Span<long> destination)
2613protected override void Subtract(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<long> destination)
2645protected override void Subtract(ReadOnlySpan<long> x, long y, Span<long> destination)
2656protected override void Subtract(long x, ReadOnlySpan<long> y, Span<long> destination)
2667protected override void Multiply(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<long> destination)
2699protected override void Multiply(ReadOnlySpan<long> x, long y, Span<long> destination)
2710protected override void Multiply(long x, ReadOnlySpan<long> y, Span<long> destination)
2726protected override void Divide(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<long> destination)
2758protected override void Divide(ReadOnlySpan<long> x, long y, Span<long> destination)
2769protected override void Divide(long x, ReadOnlySpan<long> y, Span<long> destination)
2785protected override void Modulo(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<long> destination)
2796protected override void Modulo(ReadOnlySpan<long> x, long y, Span<long> destination)
2807protected override void Modulo(long x, ReadOnlySpan<long> y, Span<long> destination)
2818protected override void And(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<long> destination)
2829protected override void And(ReadOnlySpan<long> x, long y, Span<long> destination)
2840protected override void And(long x, ReadOnlySpan<long> y, Span<long> destination)
2851protected override void Or(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<long> destination)
2862protected override void Or(ReadOnlySpan<long> x, long y, Span<long> destination)
2873protected override void Or(long x, ReadOnlySpan<long> y, Span<long> destination)
2884protected override void Xor(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<long> destination)
2895protected override void Xor(ReadOnlySpan<long> x, long y, Span<long> destination)
2906protected override void Xor(long x, ReadOnlySpan<long> y, Span<long> destination)
2917protected override void LeftShift(ReadOnlySpan<long> x, int y, Span<long> destination)
2923protected override void RightShift(ReadOnlySpan<long> x, int y, Span<long> destination)
2929protected override void ElementwiseEquals(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<bool> destination)
2937protected override void ElementwiseEquals(ReadOnlySpan<long> x, long y, Span<bool> destination)
2945protected override void ElementwiseNotEquals(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<bool> destination)
2953protected override void ElementwiseNotEquals(ReadOnlySpan<long> x, long y, Span<bool> destination)
2961protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<bool> destination)
2969protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<long> x, long y, Span<bool> destination)
2977protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<bool> destination)
2985protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<long> x, long y, Span<bool> destination)
2993protected override void ElementwiseGreaterThan(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<bool> destination)
3001protected override void ElementwiseGreaterThan(ReadOnlySpan<long> x, long y, Span<bool> destination)
3009protected override void ElementwiseLessThan(ReadOnlySpan<long> x, ReadOnlySpan<long> y, Span<bool> destination)
3017protected override void ElementwiseLessThan(ReadOnlySpan<long> x, long y, Span<bool> destination)
3028protected override void Add(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3060protected override void Add(ReadOnlySpan<sbyte> x, sbyte y, Span<sbyte> destination)
3071protected override void Add(sbyte x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3082protected override void Subtract(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3114protected override void Subtract(ReadOnlySpan<sbyte> x, sbyte y, Span<sbyte> destination)
3125protected override void Subtract(sbyte x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3136protected override void Multiply(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3168protected override void Multiply(ReadOnlySpan<sbyte> x, sbyte y, Span<sbyte> destination)
3179protected override void Multiply(sbyte x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3195protected override void Divide(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3227protected override void Divide(ReadOnlySpan<sbyte> x, sbyte y, Span<sbyte> destination)
3238protected override void Divide(sbyte x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3254protected override void Modulo(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3265protected override void Modulo(ReadOnlySpan<sbyte> x, sbyte y, Span<sbyte> destination)
3276protected override void Modulo(sbyte x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3287protected override void And(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3298protected override void And(ReadOnlySpan<sbyte> x, sbyte y, Span<sbyte> destination)
3309protected override void And(sbyte x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3320protected override void Or(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3331protected override void Or(ReadOnlySpan<sbyte> x, sbyte y, Span<sbyte> destination)
3342protected override void Or(sbyte x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3353protected override void Xor(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3364protected override void Xor(ReadOnlySpan<sbyte> x, sbyte y, Span<sbyte> destination)
3375protected override void Xor(sbyte x, ReadOnlySpan<sbyte> y, Span<sbyte> destination)
3386protected override void LeftShift(ReadOnlySpan<sbyte> x, int y, Span<sbyte> destination)
3392protected override void RightShift(ReadOnlySpan<sbyte> x, int y, Span<sbyte> destination)
3398protected override void ElementwiseEquals(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<bool> destination)
3406protected override void ElementwiseEquals(ReadOnlySpan<sbyte> x, sbyte y, Span<bool> destination)
3414protected override void ElementwiseNotEquals(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<bool> destination)
3422protected override void ElementwiseNotEquals(ReadOnlySpan<sbyte> x, sbyte y, Span<bool> destination)
3430protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<bool> destination)
3438protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<sbyte> x, sbyte y, Span<bool> destination)
3446protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<bool> destination)
3454protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<sbyte> x, sbyte y, Span<bool> destination)
3462protected override void ElementwiseGreaterThan(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<bool> destination)
3470protected override void ElementwiseGreaterThan(ReadOnlySpan<sbyte> x, sbyte y, Span<bool> destination)
3478protected override void ElementwiseLessThan(ReadOnlySpan<sbyte> x, ReadOnlySpan<sbyte> y, Span<bool> destination)
3486protected override void ElementwiseLessThan(ReadOnlySpan<sbyte> x, sbyte y, Span<bool> destination)
3497protected override void Add(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<short> destination)
3529protected override void Add(ReadOnlySpan<short> x, short y, Span<short> destination)
3540protected override void Add(short x, ReadOnlySpan<short> y, Span<short> destination)
3551protected override void Subtract(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<short> destination)
3583protected override void Subtract(ReadOnlySpan<short> x, short y, Span<short> destination)
3594protected override void Subtract(short x, ReadOnlySpan<short> y, Span<short> destination)
3605protected override void Multiply(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<short> destination)
3637protected override void Multiply(ReadOnlySpan<short> x, short y, Span<short> destination)
3648protected override void Multiply(short x, ReadOnlySpan<short> y, Span<short> destination)
3664protected override void Divide(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<short> destination)
3696protected override void Divide(ReadOnlySpan<short> x, short y, Span<short> destination)
3707protected override void Divide(short x, ReadOnlySpan<short> y, Span<short> destination)
3723protected override void Modulo(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<short> destination)
3734protected override void Modulo(ReadOnlySpan<short> x, short y, Span<short> destination)
3745protected override void Modulo(short x, ReadOnlySpan<short> y, Span<short> destination)
3756protected override void And(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<short> destination)
3767protected override void And(ReadOnlySpan<short> x, short y, Span<short> destination)
3778protected override void And(short x, ReadOnlySpan<short> y, Span<short> destination)
3789protected override void Or(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<short> destination)
3800protected override void Or(ReadOnlySpan<short> x, short y, Span<short> destination)
3811protected override void Or(short x, ReadOnlySpan<short> y, Span<short> destination)
3822protected override void Xor(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<short> destination)
3833protected override void Xor(ReadOnlySpan<short> x, short y, Span<short> destination)
3844protected override void Xor(short x, ReadOnlySpan<short> y, Span<short> destination)
3855protected override void LeftShift(ReadOnlySpan<short> x, int y, Span<short> destination)
3861protected override void RightShift(ReadOnlySpan<short> x, int y, Span<short> destination)
3867protected override void ElementwiseEquals(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<bool> destination)
3875protected override void ElementwiseEquals(ReadOnlySpan<short> x, short y, Span<bool> destination)
3883protected override void ElementwiseNotEquals(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<bool> destination)
3891protected override void ElementwiseNotEquals(ReadOnlySpan<short> x, short y, Span<bool> destination)
3899protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<bool> destination)
3907protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<short> x, short y, Span<bool> destination)
3915protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<bool> destination)
3923protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<short> x, short y, Span<bool> destination)
3931protected override void ElementwiseGreaterThan(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<bool> destination)
3939protected override void ElementwiseGreaterThan(ReadOnlySpan<short> x, short y, Span<bool> destination)
3947protected override void ElementwiseLessThan(ReadOnlySpan<short> x, ReadOnlySpan<short> y, Span<bool> destination)
3955protected override void ElementwiseLessThan(ReadOnlySpan<short> x, short y, Span<bool> destination)
3966protected override void Add(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<uint> destination)
3998protected override void Add(ReadOnlySpan<uint> x, uint y, Span<uint> destination)
4009protected override void Add(uint x, ReadOnlySpan<uint> y, Span<uint> destination)
4020protected override void Subtract(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<uint> destination)
4052protected override void Subtract(ReadOnlySpan<uint> x, uint y, Span<uint> destination)
4063protected override void Subtract(uint x, ReadOnlySpan<uint> y, Span<uint> destination)
4074protected override void Multiply(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<uint> destination)
4106protected override void Multiply(ReadOnlySpan<uint> x, uint y, Span<uint> destination)
4117protected override void Multiply(uint x, ReadOnlySpan<uint> y, Span<uint> destination)
4133protected override void Divide(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<uint> destination)
4165protected override void Divide(ReadOnlySpan<uint> x, uint y, Span<uint> destination)
4176protected override void Divide(uint x, ReadOnlySpan<uint> y, Span<uint> destination)
4192protected override void Modulo(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<uint> destination)
4203protected override void Modulo(ReadOnlySpan<uint> x, uint y, Span<uint> destination)
4214protected override void Modulo(uint x, ReadOnlySpan<uint> y, Span<uint> destination)
4225protected override void And(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<uint> destination)
4236protected override void And(ReadOnlySpan<uint> x, uint y, Span<uint> destination)
4247protected override void And(uint x, ReadOnlySpan<uint> y, Span<uint> destination)
4258protected override void Or(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<uint> destination)
4269protected override void Or(ReadOnlySpan<uint> x, uint y, Span<uint> destination)
4280protected override void Or(uint x, ReadOnlySpan<uint> y, Span<uint> destination)
4291protected override void Xor(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<uint> destination)
4302protected override void Xor(ReadOnlySpan<uint> x, uint y, Span<uint> destination)
4313protected override void Xor(uint x, ReadOnlySpan<uint> y, Span<uint> destination)
4324protected override void LeftShift(ReadOnlySpan<uint> x, int y, Span<uint> destination)
4330protected override void RightShift(ReadOnlySpan<uint> x, int y, Span<uint> destination)
4336protected override void ElementwiseEquals(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<bool> destination)
4344protected override void ElementwiseEquals(ReadOnlySpan<uint> x, uint y, Span<bool> destination)
4352protected override void ElementwiseNotEquals(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<bool> destination)
4360protected override void ElementwiseNotEquals(ReadOnlySpan<uint> x, uint y, Span<bool> destination)
4368protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<bool> destination)
4376protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<uint> x, uint y, Span<bool> destination)
4384protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<bool> destination)
4392protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<uint> x, uint y, Span<bool> destination)
4400protected override void ElementwiseGreaterThan(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<bool> destination)
4408protected override void ElementwiseGreaterThan(ReadOnlySpan<uint> x, uint y, Span<bool> destination)
4416protected override void ElementwiseLessThan(ReadOnlySpan<uint> x, ReadOnlySpan<uint> y, Span<bool> destination)
4424protected override void ElementwiseLessThan(ReadOnlySpan<uint> x, uint y, Span<bool> destination)
4435protected override void Add(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4467protected override void Add(ReadOnlySpan<ulong> x, ulong y, Span<ulong> destination)
4478protected override void Add(ulong x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4489protected override void Subtract(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4521protected override void Subtract(ReadOnlySpan<ulong> x, ulong y, Span<ulong> destination)
4532protected override void Subtract(ulong x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4543protected override void Multiply(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4575protected override void Multiply(ReadOnlySpan<ulong> x, ulong y, Span<ulong> destination)
4586protected override void Multiply(ulong x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4602protected override void Divide(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4634protected override void Divide(ReadOnlySpan<ulong> x, ulong y, Span<ulong> destination)
4645protected override void Divide(ulong x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4661protected override void Modulo(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4672protected override void Modulo(ReadOnlySpan<ulong> x, ulong y, Span<ulong> destination)
4683protected override void Modulo(ulong x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4694protected override void And(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4705protected override void And(ReadOnlySpan<ulong> x, ulong y, Span<ulong> destination)
4716protected override void And(ulong x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4727protected override void Or(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4738protected override void Or(ReadOnlySpan<ulong> x, ulong y, Span<ulong> destination)
4749protected override void Or(ulong x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4760protected override void Xor(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4771protected override void Xor(ReadOnlySpan<ulong> x, ulong y, Span<ulong> destination)
4782protected override void Xor(ulong x, ReadOnlySpan<ulong> y, Span<ulong> destination)
4793protected override void LeftShift(ReadOnlySpan<ulong> x, int y, Span<ulong> destination)
4799protected override void RightShift(ReadOnlySpan<ulong> x, int y, Span<ulong> destination)
4805protected override void ElementwiseEquals(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<bool> destination)
4813protected override void ElementwiseEquals(ReadOnlySpan<ulong> x, ulong y, Span<bool> destination)
4821protected override void ElementwiseNotEquals(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<bool> destination)
4829protected override void ElementwiseNotEquals(ReadOnlySpan<ulong> x, ulong y, Span<bool> destination)
4837protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<bool> destination)
4845protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<ulong> x, ulong y, Span<bool> destination)
4853protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<bool> destination)
4861protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<ulong> x, ulong y, Span<bool> destination)
4869protected override void ElementwiseGreaterThan(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<bool> destination)
4877protected override void ElementwiseGreaterThan(ReadOnlySpan<ulong> x, ulong y, Span<bool> destination)
4885protected override void ElementwiseLessThan(ReadOnlySpan<ulong> x, ReadOnlySpan<ulong> y, Span<bool> destination)
4893protected override void ElementwiseLessThan(ReadOnlySpan<ulong> x, ulong y, Span<bool> destination)
4904protected override void Add(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<ushort> destination)
4936protected override void Add(ReadOnlySpan<ushort> x, ushort y, Span<ushort> destination)
4947protected override void Add(ushort x, ReadOnlySpan<ushort> y, Span<ushort> destination)
4958protected override void Subtract(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<ushort> destination)
4990protected override void Subtract(ReadOnlySpan<ushort> x, ushort y, Span<ushort> destination)
5001protected override void Subtract(ushort x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5012protected override void Multiply(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5044protected override void Multiply(ReadOnlySpan<ushort> x, ushort y, Span<ushort> destination)
5055protected override void Multiply(ushort x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5071protected override void Divide(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5103protected override void Divide(ReadOnlySpan<ushort> x, ushort y, Span<ushort> destination)
5114protected override void Divide(ushort x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5130protected override void Modulo(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5141protected override void Modulo(ReadOnlySpan<ushort> x, ushort y, Span<ushort> destination)
5152protected override void Modulo(ushort x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5163protected override void And(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5174protected override void And(ReadOnlySpan<ushort> x, ushort y, Span<ushort> destination)
5185protected override void And(ushort x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5196protected override void Or(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5207protected override void Or(ReadOnlySpan<ushort> x, ushort y, Span<ushort> destination)
5218protected override void Or(ushort x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5229protected override void Xor(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5240protected override void Xor(ReadOnlySpan<ushort> x, ushort y, Span<ushort> destination)
5251protected override void Xor(ushort x, ReadOnlySpan<ushort> y, Span<ushort> destination)
5262protected override void LeftShift(ReadOnlySpan<ushort> x, int y, Span<ushort> destination)
5268protected override void RightShift(ReadOnlySpan<ushort> x, int y, Span<ushort> destination)
5274protected override void ElementwiseEquals(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<bool> destination)
5282protected override void ElementwiseEquals(ReadOnlySpan<ushort> x, ushort y, Span<bool> destination)
5290protected override void ElementwiseNotEquals(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<bool> destination)
5298protected override void ElementwiseNotEquals(ReadOnlySpan<ushort> x, ushort y, Span<bool> destination)
5306protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<bool> destination)
5314protected override void ElementwiseGreaterThanOrEqual(ReadOnlySpan<ushort> x, ushort y, Span<bool> destination)
5322protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<bool> destination)
5330protected override void ElementwiseLessThanOrEqual(ReadOnlySpan<ushort> x, ushort y, Span<bool> destination)
5338protected override void ElementwiseGreaterThan(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<bool> destination)
5346protected override void ElementwiseGreaterThan(ReadOnlySpan<ushort> x, ushort y, Span<bool> destination)
5354protected override void ElementwiseLessThan(ReadOnlySpan<ushort> x, ReadOnlySpan<ushort> y, Span<bool> destination)
5362protected override void ElementwiseLessThan(ReadOnlySpan<ushort> x, ushort y, Span<bool> destination)
5373protected override void ElementwiseEquals(ReadOnlySpan<DateTime> x, ReadOnlySpan<DateTime> y, Span<bool> destination)
5381protected override void ElementwiseEquals(ReadOnlySpan<DateTime> x, DateTime y, Span<bool> destination)
5389protected override void ElementwiseNotEquals(ReadOnlySpan<DateTime> x, ReadOnlySpan<DateTime> y, Span<bool> destination)
5397protected override void ElementwiseNotEquals(ReadOnlySpan<DateTime> x, DateTime 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);
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.DotNet.Build.Tasks.Installers (3)
Microsoft.DotNet.XUnitAssert.Tests (17)
Sdk\CollectionTrackerTests.cs (9)
80 var span = new[] { 42, 2112 }.AsSpan();
92 var span = new[] { 42, 2112 }.AsSpan();
104 var span = new[] { 1, 2, 3, 4, 5, 6, 7 }.AsSpan();
116 var span = new[] { 1, 2, 3, 4, 5, 6, 7 }.AsSpan();
128 var span = new[] { 1, 2, 3, 4, 5, 6, 7 }.AsSpan();
231 var span = new object[0].AsSpan();
239 var span = new object[0].AsSpan();
251 var span = new object[] { 1, 2.3M, "Hello, world!" }.AsSpan();
263 var span = new object[] { 1, 2.3M, "Hello, world!", 42, 2112, new object() }.AsSpan();
Microsoft.Extensions.AI.Abstractions (3)
Microsoft.Extensions.AI.AzureAIInference (1)
Microsoft.Extensions.AI.OpenAI (5)
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.DependencyInjection.Abstractions (6)
Microsoft.Extensions.Diagnostics (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (9)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Microsoft.Extensions.FileProviders.Physical (1)
Microsoft.Extensions.Http.Diagnostics (5)
Microsoft.Extensions.Identity.Core (7)
Microsoft.Extensions.Logging.Abstractions (6)
Microsoft.Extensions.Logging.Console (4)
Microsoft.Extensions.Logging.Generators (16)
Microsoft.Extensions.ServiceDiscovery.Dns (4)
Microsoft.Extensions.Telemetry (5)
Microsoft.Extensions.Telemetry.Tests (1)
Microsoft.Gen.Logging.Generated.Tests (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 (128)
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)
883public override OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, out int idsConsumed, out int charsWritten)
895public OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, bool considerSpecialTokens, out int idsConsumed, out int charsWritten)
910Span<char> buffer = destination;
976private OperationStatus DecodeByteLevel(IEnumerable<int> ids, Span<char> destination, bool considerSpecialTokens, out int idsConsumed, out int charsWritten)
982Span<char> vocabBuffer = stackalloc char[128];
985Span<byte> utf8bytes = stackalloc byte[256];
994Span<char> buffer = destination;
1040Span<byte> current = utf8bytes.Slice(incompleteUtf8BytesInBufferIndex + incompleteUtf8BytesInBuffer);
1192Span<char> buffer = stackalloc char[256];
1312scoped Span<char> token;
1313scoped Span<int> mapping = Span<int>.Empty;
1425scoped Span<char> token;
1426scoped Span<int> mapping = Span<int>.Empty;
1505scoped Span<char> token;
1506scoped 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)
368public virtual OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, bool considerSpecialTokens, out int idsConsumed, out int charsWritten)
384Span<char> buffer = destination;
576static OperationStatus TryDecodeAsSpecialToken(SentencePieceBaseModel model, int id, bool considerSpecialTokens, Span<char> buffer, ref int charsWritten, out bool isSpecialToken)
613static bool FlushBytes(ref int bytesCount, ref byte[]? bytesPoolArray, ref char[]? charPoolArray, Span<char> buffer, ref int charsWritten, ref int idsConsumed)
642static bool EncodeByte(int id, int oneByteUtf8EncodingMaxId, int byteCodeToIdOffset, ref int bytesCount, Span<char> buffer, ref int charsWritten, ref int idsConsumed, ref byte[]? bytesPoolArray)
665static 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)
672Span<char> buffer = destination.Slice(charsConsumed);
Model\SentencePieceTokenizer.cs (5)
140=> _model.EncodeToTokens(text, Span<char>.Empty, out normalizedText, addBeginningOfSentence, addEndOfSentence, considerNormalization);
183=> _model.EncodeToIds(text, Span<char>.Empty, addBeginningOfSentence, addEndOfSentence, considerNormalization, out _, out _);
210=> _model.EncodeToIds(text, Span<char>.Empty, addBeginningOfSentence, addEndOfSentence, considerNormalization, out normalizedText, out charsConsumed, maxTokenCount);
419public override OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, out int idsConsumed, out int charsWritten)
431public OperationStatus Decode(IEnumerable<int> ids, Span<char> destination, bool considerSpecialTokens, out int idsConsumed, out int charsWritten)
Model\SentencePieceUnigramModel.cs (11)
181Span<char> utf16NormalizedString = normalizedString.AsSpan().Slice(normalizedStringIndex);
195Span<char> normalizedUtf16Span = normalizedString.AsSpan().Slice(normalizedStringIndex);
292out Span<byte> normalizationSpan)
295Span<byte> byteSpan = MemoryMarshal.AsBytes(buffer.AsSpan());
339NormalizeText(text, considerNormalization, buffer, out byte[]? normalizedArrayPool, out Span<byte> normalizationSpan);
414Span<byte> destination = stackalloc byte[4];
471private void Encode(ReadOnlySpan<byte> normalized, Span<BestPathNode> bestPathEndsAt)
623NormalizeText(text, considerNormalization, buffer, out byte[]? normalizedArrayPool, out Span<byte> normalizationSpan);
779NormalizeText(text, considerNormalization, buffer, out byte[]? normalizedArrayPool, out Span<byte> normalizationSpan);
1110NormalizeText(text, considerNormalization, buffer, out byte[]? normalizedArrayPool, out Span<byte> normalizationSpan);
1361NormalizeText(text, considerNormalization, buffer, out byte[]? normalizedArrayPool, out Span<byte> normalizationSpan);
Normalizer\SentencePieceNormalizer.cs (7)
129Span<char> span = stackalloc char[512];
201private void InsertDummyPrefix(ReadOnlySpan<char> original, ref int startIndex, int endIndex, Span<char> span, ref int bufferIndex)
231private void InsertDummyPrefixAtEnd(Span<char> span, ref int bufferIndex)
285Span<DoubleArrayResultPair> trieResults = stackalloc DoubleArrayResultPair[MaxTrieResultsSize];
335internal int Normalize(ReadOnlySpan<byte> input, ref Span<byte> normalized, ref byte[]? poolArray)
440Span<byte> space = EscapeWhiteSpaces ? _spaceSymbol : _space;
463static 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)
Microsoft.ML.Tokenizers.Tests (30)
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)
src\Microsoft.ML.Tokenizers\Utils\Helpers.netcoreapp.cs (6)
55internal static unsafe int GetUtf8Bytes(ReadOnlySpan<char> source, Span<byte> destination)
58internal static unsafe bool TryGetUtf8Bytes(ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten)
64internal static int GetChars(ReadOnlySpan<byte> bytes, Span<char> chars)
67internal static void Replace(Span<char> span, char oldValue, char newValue) => span.Replace(oldValue, newValue);
69internal static void Replace(ReadOnlySpan<char> source, Span<char> destination, char oldValue, char newValue) => source.Replace(destination, oldValue, newValue);
85Span<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 (3)
Microsoft.Net.Http.Headers (4)
mscorlib (1)
netstandard (1)
PresentationCore (16)
PresentationCore.Tests (5)
PresentationFramework (11)
ReachFramework (1)
Roslyn.Diagnostics.Analyzers (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
Shared (11)
Sockets.FunctionalTests (2)
System.Collections (4)
System.Collections.Immutable (20)
System.ComponentModel.Annotations (1)
System.ComponentModel.TypeConverter (6)
System.Console (21)
System.Data.Common (34)
System\Data\SQLTypes\SQLDecimal.cs (25)
493Span<int> bits = stackalloc int[4];
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)
2095Span<uint> rgulU = [_data1, _data2, _data3, _data4];
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.Diagnostics.DiagnosticSource (43)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Diagnostics.FileVersionInfo (1)
System.Diagnostics.Process (14)
System.Diagnostics.TextWriterTraceListener (3)
System.Diagnostics.TraceSource (1)
System.DirectoryServices.Protocols (4)
System.Drawing.Common (23)
System.Drawing.Common.Tests (3)
System.Drawing.Primitives (1)
System.Formats.Asn1 (63)
System.Formats.Cbor (25)
System.Formats.Nrbf (6)
System.Formats.Tar (47)
System.IO.Compression (51)
System\IO\Compression\ZipArchiveEntry.cs (11)
572private void WriteCentralDirectoryFileHeaderPrepare(Span<byte> cdStaticHeader, uint compressedSizeTruncated, uint uncompressedSizeTruncated, ushort extraFieldLength, uint offsetOfLocalHeaderTruncated)
617Span<byte> cdStaticHeader = stackalloc byte[ZipCentralDirectoryFileHeader.BlockConstantSectionSize];
1061private void WriteLocalFileHeaderPrepare(Span<byte> lfStaticHeader, uint compressedSizeTruncated, uint uncompressedSizeTruncated, ushort extraFieldLength)
1080Span<byte> lfStaticHeader = stackalloc byte[ZipLocalFileHeader.SizeOfLocalHeader];
1167Span<byte> writeBuffer = stackalloc byte[Zip64DataDescriptorCrcAndSizesBufferLength];
1226private void WriteCrcAndSizesInLocalHeaderPrepareForZip64PretendStreaming(Span<byte> writeBuffer)
1240private void WriteCrcAndSizesInLocalHeaderPrepareFor32bitValuesWriting(bool pretendStreaming, Span<byte> writeBuffer, uint compressedSizeTruncated, uint uncompressedSizeTruncated)
1260private void WriteCrcAndSizesInLocalHeaderPrepareForWritingWhenZip64HeaderUsed(Span<byte> writeBuffer)
1272private void WriteCrcAndSizesInLocalHeaderPrepareForWritingDataDescriptor(Span<byte> writeBuffer)
1290Span<byte> dataDescriptor = stackalloc byte[MaxSizeOfDataDescriptor];
1295private int PrepareToWriteDataDescriptor(Span<byte> dataDescriptor)
System\IO\Compression\ZipBlocks.cs (24)
32Span<byte> extraFieldHeader = stackalloc byte[SizeOfHeader];
38private void WriteBlockCore(Span<byte> extraFieldHeader)
367public void WriteBlockCore(Span<byte> extraFieldData)
400Span<byte> extraFieldData = stackalloc byte[TotalSize];
419private static bool TryReadBlockCore(Span<byte> blockContents, int bytesRead, [NotNullWhen(returnValue: true)] out Zip64EndOfCentralDirectoryLocator? zip64EOCDLocator)
439Span<byte> blockContents = stackalloc byte[TotalSize];
448private static void WriteBlockCore(Span<byte> blockContents, long zip64EOCDRecordStart)
461Span<byte> blockContents = stackalloc byte[TotalSize];
487private static bool TryReadBlockCore(Span<byte> blockContents, int bytesRead, [NotNullWhen(returnValue: true)] out Zip64EndOfCentralDirectoryRecord? zip64EOCDRecord)
518Span<byte> blockContents = stackalloc byte[BlockConstantSectionSize];
528private static void WriteBlockCore(Span<byte> blockContents, long numberOfEntries, long startOfCentralDirectory, long sizeOfCentralDirectory)
550Span<byte> blockContents = stackalloc byte[BlockConstantSectionSize];
572private static void GetExtraFieldsCore(Span<byte> fixedHeaderBuffer, int relativeFilenameLengthLocation, int relativeExtraFieldLengthLocation, out ushort filenameLength, out ushort extraFieldLength)
578private static List<ZipGenericExtraField> GetExtraFieldPostReadWork(Span<byte> extraFieldBuffer, out byte[] trailingData)
590Span<byte> fixedHeaderBuffer = stackalloc byte[FieldLengths.FilenameLength + FieldLengths.ExtraFieldLength];
599Span<byte> extraFieldBuffer = extraFieldLength <= StackAllocationThreshold ? stackalloc byte[StackAllocationThreshold].Slice(0, extraFieldLength) : arrayPoolBuffer.AsSpan(0, extraFieldLength);
616private static bool TrySkipBlockCore(Stream stream, Span<byte> blockBytes, int bytesRead, long currPosition)
638private static bool TrySkipBlockFinalize(Stream stream, Span<byte> blockBytes, int bytesRead)
663Span<byte> blockBytes = stackalloc byte[FieldLengths.Signature];
818Span<byte> collatedHeader = dynamicHeaderSize <= StackAllocationThreshold ? stackalloc byte[StackAllocationThreshold].Slice(0, dynamicHeaderSize) : arrayPoolBuffer.AsSpan(0, dynamicHeaderSize);
872private static void WriteBlockInitialize(Span<byte> blockContents, long numberOfEntries, long startOfCentralDirectory, long sizeOfCentralDirectory, byte[] archiveComment)
902Span<byte> blockContents = stackalloc byte[TotalSize];
913private static bool TryReadBlockInitialize(Stream stream, Span<byte> blockContents, int bytesRead, [NotNullWhen(returnValue: true)] out ZipEndOfCentralDirectoryBlock? eocdBlock, out bool readComment)
961Span<byte> blockContents = stackalloc byte[TotalSize];
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.Watcher (6)
System.IO.Hashing (28)
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.Expressions (1)
System.Memory (27)
System.Memory.Data (2)
System.Net.Http (114)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
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\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.HttpListener (9)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Net.Mail (31)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Net.NameResolution (9)
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 (19)
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\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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
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)
321public bool TryWriteBytes(Span<byte> destination, out int bytesWritten)
350private void WriteIPv6Bytes(Span<byte> destination)
378private void WriteIPv4Bytes(Span<byte> destination)
464Span<char> span = stackalloc char[IPAddressParser.MaxIPv6StringLength];
479public bool TryFormat(Span<char> destination, out int charsWritten) =>
486public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten) =>
490bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
495bool IUtf8SpanFormattable.TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
499private bool TryFormatCore<TChar>(Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IBinaryInteger<TChar>
518Span<TChar> tmpDestination = stackalloc TChar[IPAddressParser.MaxIPv6StringLength];
System\Net\IPAddressParser.cs (7)
46Span<ushort> numbers = stackalloc ushort[IPAddressParserStatics.IPv6AddressShorts];
90private static unsafe bool TryParseIPv6<TChar>(ReadOnlySpan<TChar> ipSpan, Span<ushort> numbers, int numbersLength, out uint scope)
149internal static int FormatIPv4Address<TChar>(uint address, Span<TChar> addressString)
165static int FormatByte(uint number, Span<TChar> addressString)
194internal static int FormatIPv6Address<TChar>(ushort[] address, uint scopeId, Span<TChar> destination)
238static void AppendSections(ReadOnlySpan<ushort> address, Span<TChar> destination, ref int offset)
277static void AppendHex(ushort value, Span<TChar> destination, ref int offset)
System.Net.Quic (55)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
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 (92)
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\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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
src\libraries\Common\src\System\Net\Security\MD4.cs (13)
63internal static 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 void MD4Transform(Span<uint> state, ReadOnlySpan<byte> block)
195Span<uint> x = stackalloc uint[16];
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (26)
295private static unsafe void CreateNtlmNegotiateMessage(Span<byte> asBytes, Flags requiredFlags)
341Span<byte> span = MemoryMarshal.AsBytes(new Span<MessageField>(ref field));
347private static void AddToPayload(ref MessageField field, ReadOnlySpan<byte> data, Span<byte> payload, ref int offset)
354private static void AddToPayload(ref MessageField field, ReadOnlySpan<char> data, Span<byte> payload, ref int offset)
365private static void makeNtlm2Hash(string domain, string userName, ReadOnlySpan<char> password, Span<byte> hash)
374Span<byte> pwHash = stackalloc byte[DigestLength];
375Span<byte> pwBytes = stackalloc byte[Encoding.Unicode.GetByteCount(password)];
398private 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)
404Span<byte> blob = payload.Slice(payloadOffset, sizeof(NtChallengeResponse) + serverInfo.Length);
429private unsafe void WriteChannelBindingHash(Span<byte> hashBuffer)
440Span<byte> prefix = stackalloc byte[sizeof(uint) * 5];
620Span<byte> responseAsSpan = new Span<byte>(responseBytes);
624Span<byte> payload = responseAsSpan;
635Span<byte> ntlm2hash = stackalloc byte[DigestLength];
639Span<byte> clientChallenge = stackalloc byte[ChallengeLength];
657Span<byte> exportedSessionKey = stackalloc byte[16];
664Span<byte> sessionBaseKey = stackalloc byte[HMACMD5.HashSizeInBytes];
671Span<byte> encryptedRandomSessionKey = payload.Slice(payloadOffset, 16);
718Span<byte> signature)
726Span<byte> hmacResult = stackalloc byte[hmac.HashLengthInBytes];
743Span<byte> expectedSignature = stackalloc byte[SignatureLength];
756Span<byte> signatureBuffer = signature.GetSpan(SignatureLength);
769Span<byte> output = outputWriter.GetSpan(input.Length + SignatureLength);
794Span<byte> output = outputWriter.GetSpan(input.Length - SignatureLength);
807public override NegotiateAuthenticationStatusCode UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
System.Net.ServerSentEvents (6)
System.Net.Sockets (77)
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)
141Span<byte> buffer = stackalloc byte[SocketPal.MaximumAddressSize];
164Span<byte> address = stackalloc byte[IPAddressParserStatics.IPv6AddressBytes];
198Span<byte> address = stackalloc byte[IPAddressParserStatics.IPv6AddressBytes];
309Span<byte> buffer = stackalloc byte[SocketAddress.GetMaximumAddressSize(_addressFamily)];
357Span<byte> buffer = stackalloc byte[SocketAddress.GetMaximumAddressSize(_addressFamily)];
1565public int Receive(Span<byte> buffer) => Receive(buffer, SocketFlags.None);
1567public int Receive(Span<byte> buffer, SocketFlags socketFlags)
1577public int Receive(Span<byte> buffer, SocketFlags socketFlags, out SocketError errorCode)
1720/// An <see cref="Span{T}"/> of type <see cref="byte"/> that is the storage location for received data.
1737/// <see cref="Socket.ReceiveMessageFrom(Span{byte}, ref SocketFlags, ref EndPoint, out IPPacketInformation)"/>
1742public int ReceiveMessageFrom(Span<byte> buffer, ref SocketFlags socketFlags, ref EndPoint remoteEP, out IPPacketInformation ipPacketInformation)
1915public int ReceiveFrom(Span<byte> buffer, ref EndPoint remoteEP)
1930public int ReceiveFrom(Span<byte> buffer, SocketFlags socketFlags, ref EndPoint remoteEP)
2013public int ReceiveFrom(Span<byte> buffer, SocketFlags socketFlags, SocketAddress receivedAddress)
2287public int GetRawSocketOption(int optionLevel, int optionName, Span<byte> optionValue)
System\Net\Sockets\SocketAsyncContext.Unix.cs (4)
513bool completed = SocketPal.TryCompleteReceiveFrom(context._socket, default(Span<byte>), Buffers, Flags, SocketAddress.Span, out int socketAddressLen, out BytesTransferred, out ReceivedFlags, out ErrorCode);
1594public SocketError Receive(Span<byte> buffer, SocketFlags flags, int timeout, out int bytesReceived)
1637public unsafe SocketError ReceiveFrom(Span<byte> buffer, ref SocketFlags flags, Memory<byte> socketAddress, out int socketAddressLen, int timeout, out int bytesReceived)
1855Span<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);
773public static unsafe bool TryCompleteReceive(SafeSocketHandle socket, Span<byte> buffer, SocketFlags flags, out int bytesReceived, out SocketError errorCode)
832public 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)
903public 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)
949public 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)
1107public static unsafe SocketError GetPeerName(SafeSocketHandle handle, Span<byte> buffer, ref int nameLen)
1271if (!TryCompleteReceiveFrom(handle, buffers, socketFlags, Span<byte>.Empty, out int _, out bytesTransferred, out _, out errorCode))
1292public static SocketError Receive(SafeSocketHandle handle, Span<byte> buffer, SocketFlags socketFlags, out int bytesTransferred)
1330public static SocketError ReceiveMessageFrom(Socket socket, SafeSocketHandle handle, Span<byte> buffer, ref SocketFlags socketFlags, SocketAddress socketAddress, out SocketAddress receiveAddress, out IPPacketInformation ipPacketInformation, out int bytesTransferred)
1367public static SocketError ReceiveFrom(SafeSocketHandle handle, Span<byte> buffer, SocketFlags socketFlags, Memory<byte> socketAddress, out int socketAddressLen, out int bytesTransferred)
1684public static unsafe SocketError GetRawSockOpt(SafeSocketHandle handle, int optionLevel, int optionName, Span<byte> optionValue, ref int optionLength)
1838Span<int> readFDs = checkRead?.Count > MaxStackAllocCount ? new int[checkRead.Count] : stackalloc int[checkRead?.Count ?? 0];
1839Span<int> writeFDs = checkWrite?.Count > MaxStackAllocCount ? new int[checkWrite.Count] : stackalloc int[checkWrite?.Count ?? 0];
1840Span<int> errorFDs = checkError?.Count > MaxStackAllocCount ? new int[checkError.Count] : stackalloc int[checkError?.Count ?? 0];
1887private static void AddDesriptors(Span<int> buffer, IList? socketList, ref int refsAdded, ref int maxFd)
1916private static void FilterSelectList(IList? socketList, Span<int> results)
System.Net.WebClient (9)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Net.WebProxy (1)
System.Net.WebSockets (10)
System.Net.WebSockets.Client (1)
System.Numerics.Tensors (518)
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)
175ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination1, Span<T> destination2)
364ReadOnlySpan<T> x, T y, Span<T> destination1, Span<T> destination2)
546T x, ReadOnlySpan<T> y, Span<T> destination1, Span<T> destination2)
System\Numerics\Tensors\netcore\Tensor.cs (25)
240Span<T> dstSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)totalLength);
252Span<NRange> ranges = TensorOperation.RentedBuffer.CreateUninitialized(destination.Rank, out TensorOperation.RentedBuffer<NRange> rentedBuffer);
350Span<T> span = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.LinearLength);
373Span<T> span = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.LinearLength);
1279scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
1280scoped Span<nint> newStrides = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
1553Span<T> ospan = MemoryMarshal.CreateSpan(ref output.AsTensorSpan()._reference, (int)output.FlattenedLength);
1593Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.LinearLength);
1657Span<NRange> srcIndexes = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank, out TensorOperation.RentedBuffer<NRange> srcIndexesRentedBuffer);
1658Span<NRange> dstIndexes = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank, out TensorOperation.RentedBuffer<NRange> dstIndexesRentedBuffer);
1762scoped Span<NRange> sliceDims = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank, out TensorOperation.RentedBuffer<NRange> lengthsRentedBuffer);
1808scoped Span<nint> lengths = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
1809scoped Span<nint> strides = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
1875scoped Span<nint> lengths = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
1876scoped Span<nint> strides = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
1942scoped Span<nint> lengths = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
1943scoped Span<nint> strides = TensorOperation.RentedBuffer.CreateUninitialized(rank, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
2220scoped Span<nint> lengths = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
2221scoped Span<nint> strides = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
2296scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank + 1, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
2302Span<nint> newStrides = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank + 1, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
2333scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank + 1, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
2339Span<nint> newStrides = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank + 1, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
2370scoped Span<nint> newLengths = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank + 1, out TensorOperation.RentedBuffer<nint> lengthsRentedBuffer);
2376Span<nint> newStrides = TensorOperation.RentedBuffer.CreateUninitialized(tensor.Rank + 1, out TensorOperation.RentedBuffer<nint> stridesRentedBuffer);
System\Numerics\Tensors\netcore\Tensor_1.cs (10)
175/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.FlattenTo(Span{T})" />
176public void FlattenTo(scoped Span<T> destination)
201public Span<T> GetSpan(scoped ReadOnlySpan<nint> startIndexes, int length) => AsTensorSpan().GetSpan(startIndexes, length);
204public Span<T> GetSpan(scoped ReadOnlySpan<NIndex> startIndexes, int length) => AsTensorSpan().GetSpan(startIndexes, length);
276/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.TryFlattenTo(Span{T})" />
277public bool TryFlattenTo(scoped Span<T> destination) => AsReadOnlyTensorSpan().TryFlattenTo(destination);
279/// <inheritdoc cref="ITensor{TSelf, T}.TryGetSpan(ReadOnlySpan{nint}, int, out Span{T})" />
280public bool TryGetSpan(scoped ReadOnlySpan<nint> startIndexes, int length, out Span<T> span) => AsTensorSpan().TryGetSpan(startIndexes, length, out span);
282/// <inheritdoc cref="ITensor{TSelf, T}.TryGetSpan(ReadOnlySpan{NIndex}, int, out Span{T})" />
283public bool TryGetSpan(scoped ReadOnlySpan<NIndex> startIndexes, int length, out Span<T> span) => AsTensorSpan().TryGetSpan(startIndexes, length, out span);
System\Numerics\Tensors\netcore\TensorOperation.cs (171)
16scoped Span<nint> indexes = RentedBuffer.Create(x.Rank, x.Strides, out nint linearOffset, out RentedBuffer<nint> rentedBuffer);
35scoped Span<nint> xIndexes = RentedBuffer.Create(destinationShape.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
36scoped Span<nint> yIndexes = RentedBuffer.Create(destinationShape.Rank, y.Strides, out nint yLinearOffset, out RentedBuffer<nint> yRentedBuffer);
66scoped Span<nint> xIndexes = RentedBuffer.Create(x.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
92scoped Span<nint> indexes = RentedBuffer.Create(destination.Rank, destination.Strides, out nint linearOffset, out RentedBuffer<nint> rentedBuffer);
109scoped Span<nint> xIndexes = RentedBuffer.Create(destination.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
110scoped Span<nint> destinationIndexes = RentedBuffer.Create(destination.Rank, destination.Strides, out nint destinationLinearOffset, out RentedBuffer<nint> destinationRentedBuffer);
130scoped Span<nint> xIndexes = RentedBuffer.Create(destination.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
131scoped Span<nint> destinationIndexes = RentedBuffer.Create(destination.Rank, destination.Strides, out nint _, out RentedBuffer<nint> destinationRentedBuffer);
156public static void Invoke<TOperation, TArg, TResult>(in ReadOnlyTensorSpan<TArg> x, in Span<TResult> destination)
159scoped Span<nint> xIndexes = RentedBuffer.Create(x.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
179scoped Span<nint> xIndexes = RentedBuffer.Create(x.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
197scoped Span<nint> xIndexes = RentedBuffer.Create(destination.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
198scoped Span<nint> yIndexes = RentedBuffer.Create(destination.Rank, y.Strides, out nint yLinearOffset, out RentedBuffer<nint> yRentedBuffer);
199scoped Span<nint> destinationIndexes = RentedBuffer.Create(destination.Rank, destination.Strides, out nint destinationLinearOffset, out RentedBuffer<nint> destinationRentedBuffer);
228scoped Span<nint> xIndexes = RentedBuffer.Create(destinationShape.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
229scoped Span<nint> yIndexes = RentedBuffer.Create(destinationShape.Rank, y.Strides, out nint yLinearOffset, out RentedBuffer<nint> yRentedBuffer);
258scoped Span<nint> xIndexes = RentedBuffer.Create(destination.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
259scoped Span<nint> destinationIndexes = RentedBuffer.Create(destination.Rank, destination.Strides, out nint destinationLinearOffset, out RentedBuffer<nint> destinationRentedBuffer);
280scoped Span<nint> xIndexes = RentedBuffer.Create(destination.Rank, y.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
281scoped Span<nint> destinationIndexes = RentedBuffer.Create(destination.Rank, destination.Strides, out nint destinationLinearOffset, out RentedBuffer<nint> destinationRentedBuffer);
302scoped Span<nint> xIndexes = RentedBuffer.Create(x.Rank, x.Strides, out nint xLinearOffset, out RentedBuffer<nint> xRentedBuffer);
386public static void Invoke(Span<T> destination)
400public static void Invoke(ReadOnlySpan<T> source, Span<T> destination)
421public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
429public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
458public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
476public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
505public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
520public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
535public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
550public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
566public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
576public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
591public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
606public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
621public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
636public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
652public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
665public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
681public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
694public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
709public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
724public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
740public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
750public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
766public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
776public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
791public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
806public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
822public static void Invoke(ReadOnlySpan<TFrom> x, Span<TTo> destination)
838public static void Invoke(ReadOnlySpan<TFrom> x, Span<TTo> destination)
854public static void Invoke(ReadOnlySpan<TFrom> x, Span<TTo> destination)
870public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
880public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
895public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
910public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
929public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<(T, T, T)> destination)
946public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
962public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
977public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
994public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1004public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1013public static void Invoke(T x, ReadOnlySpan<T> y, Span<T> destination)
1028public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1043public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1058public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1073public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1088public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1103public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1118public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1133public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1148public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1165public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1175public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1184public static void Invoke(T x, ReadOnlySpan<T> y, Span<T> destination)
1199public static void Invoke(ReadOnlySpan<T> x, Span<int> destination)
1215public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1230public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1247public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1257public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1267public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1282public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1297public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1312public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1327public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1342public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1369public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1379public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1406public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1416public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1443public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1453public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1480public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1490public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1517public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1527public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1554public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1564public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1591public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1601public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1628public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1638public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1654public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1664public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1679public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1694public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1709public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1726public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
1736public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
1746public static void Invoke(T x, ReadOnlySpan<T> y, Span<T> destination)
1776public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1791public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1806public static void Invoke(ReadOnlySpan<T> x, int y, Span<T> destination)
1820public static void Invoke(ReadOnlySpan<T> x, int y, Span<T> destination)
1834public static void Invoke(ReadOnlySpan<T> x, int y, Span<T> destination)
1850public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1860public static void Invoke(ReadOnlySpan<T> x, Tuple<int, MidpointRounding> y, Span<T> destination)
1875public static void Invoke(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination)
1890public static void Invoke(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination)
1905public static void Invoke(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination)
1920public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1935public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1950public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1965public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
1999public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2017public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2034public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2044public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2054public static void Invoke(T x, ReadOnlySpan<T> y, Span<T> destination)
2084public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2097public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2116public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2150public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2165public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2180public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2195public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2210public static void Invoke(ReadOnlySpan<T> x, Span<T> destination)
2226public static void Invoke(ReadOnlySpan<T> x, T y, Span<T> destination)
2236public static void Invoke(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination)
2252public static void Invoke(Span<T> destination, T value)
2269public static void Invoke(ReadOnlySpan<bool> x, ReadOnlySpan<T> y, Span<T> destination)
2288public static void Invoke(ReadOnlySpan<bool> x, T y, Span<T> destination)
2315public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
2323public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
2352public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
2370public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
2404public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
2412public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
2441public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
2459public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
2493public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
2501public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
2530public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
2548public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
2582public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
2590public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
2619public static void Invoke(ReadOnlySpan<T> left, T right, Span<bool> destination)
2637public static void Invoke(ReadOnlySpan<T> left, ReadOnlySpan<T> right, Span<bool> destination)
2669static abstract void Invoke(ReadOnlySpan<T1> x, T2 y, Span<TResult> destination);
2675static abstract void Invoke(T1 x, ReadOnlySpan<T2> y, Span<TResult> destination);
2681static abstract void Invoke(ReadOnlySpan<T1> x, ReadOnlySpan<T2> y, Span<TResult> destination);
2692static abstract void Invoke(Span<T> destination);
2698static abstract void Invoke(Span<TResult> destination, T x);
2704static abstract void Invoke(ReadOnlySpan<T> x, Span<TResult> destination);
2715public static Span<T> Create<T>(int rank, ReadOnlySpan<nint> strides, out nint linearOffset, [UnscopedRef] out RentedBuffer<T> rentedBuffer)
2718Span<T> output = RentedBuffer<T>.Create(rank, out rentedBuffer);
2725public static Span<T> CreateUninitialized<T>(int rank, [UnscopedRef] out RentedBuffer<T> rentedBuffer)
2734public static Span<T> Create(int rank, [UnscopedRef] out RentedBuffer<T> rentedBuffer)
2741Span<T> resultBuffer = rentedBuffer._array.AsSpan(0, rank);
2750return ((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)
176public static void Clamp<T>(T x, ReadOnlySpan<T> min, T max, Span<T> destination)
203public 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)
77public TensorSpan(Span<T> span)
85public TensorSpan(Span<T> span, scoped ReadOnlySpan<nint> lengths)
89public TensorSpan(Span<T> span, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
250/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.FlattenTo(Span{T})" />
251public void FlattenTo(scoped Span<T> destination)
282public Span<T> GetSpan(scoped ReadOnlySpan<nint> startIndexes, int length)
284if (!TryGetSpan(startIndexes, length, out Span<T> span))
292public Span<T> GetSpan(scoped ReadOnlySpan<NIndex> startIndexes, int length)
294if (!TryGetSpan(startIndexes, length, out Span<T> span))
340/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.TryFlattenTo(Span{T})" />
341public bool TryFlattenTo(scoped Span<T> destination) => AsReadOnlyTensorSpan().TryFlattenTo(destination);
343/// <inheritdoc cref="ITensor{TSelf, T}.TryGetSpan(ReadOnlySpan{nint}, int, out Span{T})" />
344public bool TryGetSpan(scoped ReadOnlySpan<nint> startIndexes, int length, out Span<T> span)
359/// <inheritdoc cref="ITensor{TSelf, T}.TryGetSpan(ReadOnlySpan{NIndex}, int, out Span{T})" />
360public 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 (1207)
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)
118private static void EncodeTo_Vector128<TChar>(ReadOnlySpan<byte> source, Span<TChar> destination, Casing casing)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
209EncodeTo_Vector128(source, Unsafe.BitCast<Span<char>, Span<ushort>>(destination), casing);
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
309public static bool TryDecodeFrom_Vector128<TChar>(ReadOnlySpan<TChar> source, Span<byte> destination, out int elementsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
src\libraries\System.Private.CoreLib\src\System\Array.cs (7)
2475Span<T> keysSpan = UnsafeArrayAsSpan<T>(keys, adjustedIndex, length);
2498var span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(array), array.Length);
2547var span = new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index), length);
2571var spanKeys = new Span<TKey>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(keys), index), length);
2572var spanItems = new Span<TValue>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(items), index), length);
2589var span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(array), array.Length);
3055private static Span<T> UnsafeArrayAsSpan<T>(Array array, int adjustedIndex, int length) =>
src\libraries\System.Private.CoreLib\src\System\BitConverter.cs (14)
41public static bool TryWriteBytes(Span<byte> destination, bool value)
69public static bool TryWriteBytes(Span<byte> destination, char value)
97public static bool TryWriteBytes(Span<byte> destination, short value)
125public static bool TryWriteBytes(Span<byte> destination, int value)
153public static bool TryWriteBytes(Span<byte> destination, long value)
181public static bool TryWriteBytes(Span<byte> destination, Int128 value)
211public static bool TryWriteBytes(Span<byte> destination, ushort value)
241public static bool TryWriteBytes(Span<byte> destination, uint value)
271public static bool TryWriteBytes(Span<byte> destination, ulong value)
301public static bool TryWriteBytes(Span<byte> destination, UInt128 value)
329public static unsafe bool TryWriteBytes(Span<byte> destination, Half value)
357public static bool TryWriteBytes(Span<byte> destination, float value)
385public static bool TryWriteBytes(Span<byte> destination, double value)
816var dst = new Span<char>(ref result.GetRawStringData(), result.Length);
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\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.WriteBigEndian.cs (26)
21public static void WriteDoubleBigEndian(Span<byte> destination, double value)
44public static void WriteHalfBigEndian(Span<byte> destination, Half value)
67public static void WriteInt16BigEndian(Span<byte> destination, short value)
90public static void WriteInt32BigEndian(Span<byte> destination, int value)
113public static void WriteInt64BigEndian(Span<byte> destination, long value)
136public static void WriteInt128BigEndian(Span<byte> destination, Int128 value)
159public static void WriteIntPtrBigEndian(Span<byte> destination, nint value)
182public static void WriteSingleBigEndian(Span<byte> destination, float value)
206public static void WriteUInt16BigEndian(Span<byte> destination, ushort value)
230public static void WriteUInt32BigEndian(Span<byte> destination, uint value)
254public static void WriteUInt64BigEndian(Span<byte> destination, ulong value)
278public static void WriteUInt128BigEndian(Span<byte> destination, UInt128 value)
302public static void WriteUIntPtrBigEndian(Span<byte> destination, nuint value)
325public static bool TryWriteDoubleBigEndian(Span<byte> destination, double value)
346public static bool TryWriteHalfBigEndian(Span<byte> destination, Half value)
367public static bool TryWriteInt16BigEndian(Span<byte> destination, short value)
388public static bool TryWriteInt32BigEndian(Span<byte> destination, int value)
409public static bool TryWriteInt64BigEndian(Span<byte> destination, long value)
430public static bool TryWriteInt128BigEndian(Span<byte> destination, Int128 value)
451public static bool TryWriteIntPtrBigEndian(Span<byte> destination, nint value)
472public static bool TryWriteSingleBigEndian(Span<byte> destination, float value)
494public static bool TryWriteUInt16BigEndian(Span<byte> destination, ushort value)
516public static bool TryWriteUInt32BigEndian(Span<byte> destination, uint value)
538public static bool TryWriteUInt64BigEndian(Span<byte> destination, ulong value)
560public static bool TryWriteUInt128BigEndian(Span<byte> destination, UInt128 value)
582public static bool TryWriteUIntPtrBigEndian(Span<byte> destination, nuint value)
src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.WriteLittleEndian.cs (26)
21public static void WriteDoubleLittleEndian(Span<byte> destination, double value)
44public static void WriteHalfLittleEndian(Span<byte> destination, Half value)
67public static void WriteInt16LittleEndian(Span<byte> destination, short value)
90public static void WriteInt32LittleEndian(Span<byte> destination, int value)
113public static void WriteInt64LittleEndian(Span<byte> destination, long value)
136public static void WriteInt128LittleEndian(Span<byte> destination, Int128 value)
159public static void WriteIntPtrLittleEndian(Span<byte> destination, nint value)
182public static void WriteSingleLittleEndian(Span<byte> destination, float value)
206public static void WriteUInt16LittleEndian(Span<byte> destination, ushort value)
230public static void WriteUInt32LittleEndian(Span<byte> destination, uint value)
254public static void WriteUInt64LittleEndian(Span<byte> destination, ulong value)
278public static void WriteUInt128LittleEndian(Span<byte> destination, UInt128 value)
302public static void WriteUIntPtrLittleEndian(Span<byte> destination, nuint value)
325public static bool TryWriteDoubleLittleEndian(Span<byte> destination, double value)
346public static bool TryWriteHalfLittleEndian(Span<byte> destination, Half value)
367public static bool TryWriteInt16LittleEndian(Span<byte> destination, short value)
388public static bool TryWriteInt32LittleEndian(Span<byte> destination, int value)
409public static bool TryWriteInt64LittleEndian(Span<byte> destination, long value)
430public static bool TryWriteInt128LittleEndian(Span<byte> destination, Int128 value)
451public static bool TryWriteIntPtrLittleEndian(Span<byte> destination, nint value)
472public static bool TryWriteSingleLittleEndian(Span<byte> destination, float value)
494public static bool TryWriteUInt16LittleEndian(Span<byte> destination, ushort value)
516public static bool TryWriteUInt32LittleEndian(Span<byte> destination, uint value)
538public static bool TryWriteUInt64LittleEndian(Span<byte> destination, ulong value)
560public static bool TryWriteUInt128LittleEndian(Span<byte> destination, UInt128 value)
582public static bool TryWriteUIntPtrLittleEndian(Span<byte> destination, nuint value)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (8)
17internal static unsafe OperationStatus DecodeFrom<TBase64Decoder, T>(TBase64Decoder decoder, ReadOnlySpan<T> source, Span<byte> bytes,
266static OperationStatus InvalidDataFallback(TBase64Decoder decoder, ReadOnlySpan<T> source, Span<byte> bytes, ref int bytesConsumed, ref int bytesWritten, bool isFinalBlock)
317internal static unsafe OperationStatus DecodeFromUtf8InPlace<TBase64Decoder>(TBase64Decoder decoder, Span<byte> buffer, out int bytesWritten, bool ignoreWhiteSpace)
449internal static OperationStatus DecodeWithWhiteSpaceBlockwise<TBase64Decoder>(TBase64Decoder decoder, ReadOnlySpan<byte> source, Span<byte> bytes, ref int bytesConsumed, ref int bytesWritten, bool isFinalBlock = true)
453Span<byte> buffer = stackalloc byte[BlockSize];
566private static OperationStatus DecodeWithWhiteSpaceFromUtf8InPlace<TBase64Decoder>(TBase64Decoder decoder, Span<byte> source, ref int destIndex, uint sourceIndex)
570Span<byte> buffer = stackalloc byte[BlockSize];
1466Span<byte> bytes, ref int bytesConsumed, ref int bytesWritten, bool isFinalBlock = true)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (13)
66public static OperationStatus DecodeFromUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true) =>
84public static int DecodeFromUtf8InPlace(Span<byte> buffer)
115public static int DecodeFromUtf8(ReadOnlySpan<byte> source, Span<byte> destination)
142public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
167Span<byte> destination = (uint)upperBound <= MaxStackallocThreshold
200public static OperationStatus DecodeFromChars(ReadOnlySpan<char> source, Span<byte> destination,
206ReadOnlySpan<ushort> source, Span<byte> bytes, ref int bytesConsumed, ref int bytesWritten, bool isFinalBlock = true)
210Span<ushort> buffer = stackalloc ushort[BlockSize];
332public static int DecodeFromChars(ReadOnlySpan<char> source, Span<byte> destination)
359public static bool TryDecodeFromChars(ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten)
383Span<byte> destination = (uint)upperBound <= MaxStackallocThreshold
605public OperationStatus DecodeWithWhiteSpaceBlockwiseWrapper<TBase64Decoder>(TBase64Decoder decoder, ReadOnlySpan<byte> utf8, Span<byte> bytes,
853public OperationStatus DecodeWithWhiteSpaceBlockwiseWrapper<TBase64Decoder>(TBase64Decoder decoder, ReadOnlySpan<ushort> source, Span<byte> bytes,
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (7)
30Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true) =>
67public static int EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> destination)
106public static OperationStatus EncodeToChars(ReadOnlySpan<byte> source, Span<char> destination,
118public static int EncodeToChars(ReadOnlySpan<byte> source, Span<char> destination)
180public static bool TryEncodeToChars(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
195public static bool TryEncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
213public static bool TryEncodeToUtf8InPlace(Span<byte> buffer, int dataLength, out int bytesWritten)
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\libraries\System.Private.CoreLib\src\System\Byte.cs (6)
162public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
168public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
368/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
369bool IBinaryInteger<byte>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
386/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
387bool IBinaryInteger<byte>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Char.cs (6)
178bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
192bool IUtf8SpanFormattable.TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
1314/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
1315bool IBinaryInteger<char>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
1327/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
1328bool IBinaryInteger<char>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (15)
99BinaryPrimitives.ReverseEndianness(array, MemoryMarshal.Cast<byte, int>((Span<byte>)_array));
121MemoryMarshal.Cast<byte, int>((Span<byte>)_array)[(int)index] &= ReverseIfBE((1 << (int)extraBits) - 1);
253BinaryPrimitives.ReverseEndianness(values, MemoryMarshal.Cast<byte, int>((Span<byte>)_array));
441Span<int> thisRemaining = MemoryMarshal.Cast<byte, int>(((Span<byte>)thisArray).Slice(i, roundedBytesRemaining));
442Span<int> valueRemaining = MemoryMarshal.Cast<byte, int>(((Span<byte>)valueArray).Slice(i, roundedBytesRemaining));
517Span<int> intSpan = MemoryMarshal.Cast<byte, int>((Span<byte>)_array);
580Span<int> intSpan = MemoryMarshal.Cast<byte, int>((Span<byte>)_array);
681Span<int> source = MemoryMarshal.Cast<byte, int>((Span<byte>)_array).Slice(0, intLength);
733Span<int> in32Span = MemoryMarshal.Cast<byte, int>((Span<byte>)_array);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (53)
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
src\libraries\System.Private.CoreLib\src\System\Convert.cs (14)
2300Span<char> chars = stackalloc char[22]; // max length of a ulong in octal
2429public static unsafe bool TryToBase64Chars(ReadOnlySpan<byte> bytes, Span<char> chars, out int charsWritten, Base64FormattingOptions options = Base64FormattingOptions.None)
2473private static void ToBase64CharsLargeNoLineBreaks(ReadOnlySpan<byte> bytes, Span<char> chars, int charLengthRequired)
2659public static bool TryFromBase64String(string s, Span<byte> bytes, out int bytesWritten)
2669public static bool TryFromBase64Chars(ReadOnlySpan<char> chars, Span<byte> bytes, out int bytesWritten)
2673Span<char> tempBuffer = stackalloc char[4]; // Note: The tempBuffer size could be made larger than 4 but the size must be a multiple of 4.
2763private static void CopyToTempBufferWithoutWhiteSpace(ReadOnlySpan<char> chars, Span<char> tempBuffer, out int consumed, out int charsWritten)
2996public static OperationStatus FromHexString(string source, Span<byte> destination, out int charsConsumed, out int bytesWritten)
3012public static OperationStatus FromHexString(ReadOnlySpan<char> source, Span<byte> destination, out int charsConsumed, out int bytesWritten)
3068public static OperationStatus FromHexString(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesConsumed, out int bytesWritten)
3168public static bool TryToHexString(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
3191public static bool TryToHexString(ReadOnlySpan<byte> source, Span<byte> utf8Destination, out int bytesWritten)
3263public static bool TryToHexStringLower(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
3286public static bool TryToHexStringLower(ReadOnlySpan<byte> source, Span<byte> utf8Destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (13)
502public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
508public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
591public static int GetBits(decimal d, Span<int> destination)
612public static bool TryGetBits(decimal d, Span<int> destination, out int valuesWritten)
628internal static void GetBytes(in decimal d, Span<byte> buffer)
1145/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
1146bool IFloatingPoint<decimal>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
1159/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
1160bool IFloatingPoint<decimal>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
1173/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
1174bool IFloatingPoint<decimal>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
1202/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
1203bool IFloatingPoint<decimal>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Double.cs (10)
375public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
381public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
722/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
723bool IFloatingPoint<double>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
735/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
736bool IFloatingPoint<double>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
748/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
749bool IFloatingPoint<double>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
761/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
762bool IFloatingPoint<double>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (12)
1553private static unsafe bool TryFormatNumberAsHex<TStorage>(ref byte data, Span<char> destination, out int charsWritten) where TStorage : struct
1687bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
1747public static unsafe bool TryFormat<TEnum>(TEnum value, Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.EnumFormat)] ReadOnlySpan<char> format = default) where TEnum : struct
1803internal static unsafe bool TryFormatUnconstrained<TEnum>(TEnum value, Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.EnumFormat)] ReadOnlySpan<char> format = default)
1856private static bool TryFormatPrimitiveDefault<TUnderlying, TStorage>(RuntimeType enumType, TUnderlying value, Span<char> destination, out int charsWritten)
1891private static bool TryFormatPrimitiveNonDefault<TUnderlying, TStorage>(RuntimeType enumType, TUnderlying value, Span<char> destination, out int charsWritten, ReadOnlySpan<char> format)
1942Span<int> foundItems = stackalloc int[64];
1961private static bool TryFormatFlagNames<TStorage>(EnumInfo<TStorage> enumInfo, TStorage resultValue, Span<char> destination, out int charsWritten, ref bool isDestinationTooSmall)
1986Span<int> foundItems = stackalloc int[64];
2061private static bool TryFindFlagsNames<TStorage>(TStorage resultValue, string[] names, TStorage[] values, int index, Span<int> foundItems, out int resultLength, out int foundItemsCount)
2107private static void WriteMultipleFoundFlagsNames(string[] names, ReadOnlySpan<int> foundItems, Span<char> destination)
2116Span<char> afterSeparator = destination.Slice(2); // done before copying ", " to eliminate those two bounds checks
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (19)
771Encoding.UTF8.GetBytes(s, Unsafe.BitCast<Span<TChar>, Span<byte>>(result.AppendSpan(Encoding.UTF8.GetByteCount(s))));
777Span<TChar> chars = stackalloc TChar[11];
780fraction.TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(chars), out charCount, fractionFormat, CultureInfo.InvariantCulture) :
781fraction.TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(chars), out charCount, fractionFormat, CultureInfo.InvariantCulture);
977Span<char> span = stackalloc char[FormatOMaxLength];
1029internal static bool TryFormat<TChar>(DateTime dateTime, Span<TChar> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) where TChar : unmanaged, IUtfChar<TChar> =>
1032internal static bool TryFormat<TChar>(DateTime dateTime, Span<TChar> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider, TimeSpan offset) where TChar : unmanaged, IUtfChar<TChar>
1316internal static unsafe bool TryFormatTimeOnlyO<TChar>(TimeOnly value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1344internal static unsafe bool TryFormatTimeOnlyR<TChar>(TimeOnly value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1371internal static unsafe bool TryFormatDateOnlyO<TChar>(DateOnly value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1398internal static unsafe bool TryFormatDateOnlyR<TChar>(DateOnly value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1442internal static unsafe bool TryFormatO<TChar>(DateTime dateTime, TimeSpan offset, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1522internal static unsafe bool TryFormatS<TChar>(DateTime dateTime, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1557internal static unsafe bool TryFormatu<TChar>(DateTime dateTime, TimeSpan offset, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1598internal static unsafe bool TryFormatR<TChar>(DateTime dateTime, TimeSpan offset, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1663internal static unsafe bool TryFormatInvariantG<TChar>(DateTime value, TimeSpan offset, Span<TChar> destination, out int bytesWritten) where TChar : unmanaged, IUtfChar<TChar>
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (4)
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 unsafe bool TryFormatStandard<TChar>(TimeSpan value, StandardFormat format, ReadOnlySpan<TChar> decimalSeparator, Span<TChar> destination, out int written) where TChar : unmanaged, IUtfChar<TChar>
src\libraries\System.Private.CoreLib\src\System\Guid.cs (13)
518Span<byte> bytes = MemoryMarshal.AsBytes(new Span<GuidResult>(ref result));
606Span<byte> bytes = MemoryMarshal.AsBytes(new Span<GuidResult>(ref result));
952Span<byte> destUtf8Span = new byte[srcUtf8Span.Length];
1024public bool TryWriteBytes(Span<byte> destination)
1043public bool TryWriteBytes(Span<byte> destination, bool bigEndian, out int bytesWritten)
1246public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.GuidFormat)] ReadOnlySpan<char> format = default) =>
1249bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.GuidFormat)] ReadOnlySpan<char> format, IFormatProvider? provider) =>
1253public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.GuidFormat)] ReadOnlySpan<char> format = default) =>
1256bool IUtf8SpanFormattable.TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.GuidFormat)] ReadOnlySpan<char> format, IFormatProvider? provider) =>
1269private bool TryFormatCore<TChar>(Span<TChar> destination, out int charsWritten, ReadOnlySpan<char> format) where TChar : unmanaged, IUtfChar<TChar>
1316internal unsafe bool TryFormatCore<TChar>(Span<TChar> destination, out int charsWritten, int flags) where TChar : unmanaged, IUtfChar<TChar>
1441private bool TryFormatX<TChar>(Span<TChar> dest, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1491static void WriteHex(Span<TChar> dest, int offset, int val, bool appendComma = true)
src\libraries\System.Private.CoreLib\src\System\Half.cs (10)
543public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
549public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
1365/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
1366bool IFloatingPoint<Half>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
1379/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
1380bool IFloatingPoint<Half>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
1393/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
1394bool IFloatingPoint<Half>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
1406/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
1407bool IFloatingPoint<Half>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Int128.cs (6)
118public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
124public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
936/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
937bool IBinaryInteger<Int128>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
949/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
950bool IBinaryInteger<Int128>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Int16.cs (6)
118public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
124public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
465/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
466bool IBinaryInteger<short>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
478/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
479bool IBinaryInteger<short>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Int32.cs (6)
134public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
140public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
504/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
505bool IBinaryInteger<int>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
517/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
518bool IBinaryInteger<int>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Int64.cs (6)
131public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
137public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
501/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
502bool IBinaryInteger<long>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
514/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
515bool IBinaryInteger<long>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (6)
229public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
233public 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\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> =>
701public static int IndexOf<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
711public static int IndexOf<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>? =>
721public static int LastIndexOf<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
731public static int LastIndexOf<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>? =>
743public static int IndexOfAnyExcept<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
756public static int IndexOfAnyExcept<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>? =>
770public static int IndexOfAnyExcept<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>? =>
782public static int IndexOfAnyExcept<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>? =>
795public static int IndexOfAnyExcept<T>(this Span<T> span, SearchValues<T> values) where T : IEquatable<T>? =>
1321public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
1334public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>? =>
1348public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>? =>
1360public static int LastIndexOfAnyExcept<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>? =>
1373public static int LastIndexOfAnyExcept<T>(this Span<T> span, SearchValues<T> values) where T : IEquatable<T>? =>
1895public static int IndexOfAnyInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> =>
1960public static int IndexOfAnyExceptInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> =>
2025public static int LastIndexOfAnyInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> =>
2090public static int LastIndexOfAnyExceptInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> =>
2166public static bool SequenceEqual<T>(this Span<T> span, ReadOnlySpan<T> other) where T : IEquatable<T>? =>
2173public static int SequenceCompareTo<T>(this Span<T> span, ReadOnlySpan<T> other) where T : IComparable<T>? =>
2588public static int IndexOfAny<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>? =>
2600public static int IndexOfAny<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>? =>
2610public static int IndexOfAny<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>? =>
2620public static int IndexOfAny<T>(this Span<T> span, SearchValues<T> values) where T : IEquatable<T>? =>
2630public static int IndexOfAny(this Span<char> span, SearchValues<string> values) =>
3018public static int LastIndexOfAny<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>? =>
3030public static int LastIndexOfAny<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>? =>
3040public static int LastIndexOfAny<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>? =>
3050public static int LastIndexOfAny<T>(this Span<T> span, SearchValues<T> values) where T : IEquatable<T>? =>
3444public static bool SequenceEqual<T>(this Span<T> span, ReadOnlySpan<T> other, IEqualityComparer<T>? comparer = null) =>
3553public static bool StartsWith<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>? =>
3593public static bool EndsWith<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>? =>
3683public static void Reverse<T>(this Span<T> span)
3695public static Span<T> AsSpan<T>(this T[]? array)
3713public static Span<T> AsSpan<T>(this T[]? array, int start, int length)
3722public static Span<T> AsSpan<T>(this ArraySegment<T> segment)
3739public static Span<T> AsSpan<T>(this ArraySegment<T> segment, int start)
3754public static Span<T> AsSpan<T>(this ArraySegment<T> segment, Index startIndex)
3773public static Span<T> AsSpan<T>(this ArraySegment<T> segment, int start, int length)
3789public static Span<T> AsSpan<T>(this ArraySegment<T> segment, Range range)
3922public static void CopyTo<T>(this T[]? source, Span<T> destination)
4076public static bool Overlaps<T>(this Span<T> span, ReadOnlySpan<T> other) =>
4084public static bool Overlaps<T>(this Span<T> span, ReadOnlySpan<T> other, out int elementOffset) =>
4137/// Searches an entire sorted <see cref="Span{T}"/> for a value
4141/// <param name="span">The sorted <see cref="Span{T}"/> to search.</param>
4147/// no larger element, the bitwise complement of <see cref="Span{T}.Length"/>.
4154public static int BinarySearch<T>(this Span<T> span, IComparable<T> comparable) =>
4158/// Searches an entire sorted <see cref="Span{T}"/> for a value
4163/// <param name="span">The sorted <see cref="Span{T}"/> to search.</param>
4169/// no larger element, the bitwise complement of <see cref="Span{T}.Length"/>.
4177this Span<T> span, TComparable comparable)
4182/// Searches an entire sorted <see cref="Span{T}"/> for the specified <paramref name="value"/>
4187/// <param name="span">The sorted <see cref="Span{T}"/> to search.</param>
4194/// no larger element, the bitwise complement of <see cref="Span{T}.Length"/>.
4202this Span<T> span, T value, TComparer comparer)
4284/// Sorts the elements in the entire <see cref="Span{T}" /> using the <see cref="IComparable{T}" /> implementation
4285/// of each element of the <see cref= "Span{T}" />
4288/// <param name="span">The <see cref="Span{T}"/> to sort.</param>
4292public static void Sort<T>(this Span<T> span) =>
4296/// Sorts the elements in the entire <see cref="Span{T}" /> using the <typeparamref name="TComparer" />.
4300/// <param name="span">The <see cref="Span{T}"/> to sort.</param>
4312public static void Sort<T, TComparer>(this Span<T> span, TComparer comparer) where TComparer : IComparer<T>?
4321/// Sorts the elements in the entire <see cref="Span{T}" /> using the specified <see cref="Comparison{T}" />.
4324/// <param name="span">The <see cref="Span{T}"/> to sort.</param>
4327public static void Sort<T>(this Span<T> span, Comparison<T> comparison)
4340/// based on the keys in the first <see cref="Span{TKey}" /> using the <see cref="IComparable{T}" />
4353public static void Sort<TKey, TValue>(this Span<TKey> keys, Span<TValue> items) =>
4358/// based on the keys in the first <see cref="Span{TKey}" /> using the specified comparer.
4376public static void Sort<TKey, TValue, TComparer>(this Span<TKey> keys, Span<TValue> items, TComparer comparer) where TComparer : IComparer<TKey>?
4389/// based on the keys in the first <see cref="Span{TKey}" /> using the specified comparison.
4400public static void Sort<TKey, TValue>(this Span<TKey> keys, Span<TValue> items, Comparison<TKey> comparison)
4421public static unsafe void Replace<T>(this Span<T> span, T oldValue, T newValue) where T : IEquatable<T>?
4487public static unsafe void Replace<T>(this Span<T> span, T oldValue, T newValue, IEqualityComparer<T>? comparer = null)
4541static void ReplaceDefaultComparer(Span<T> span, T oldValue, T newValue)
4555static void ReplaceComparer(Span<T> span, T oldValue, T newValue, IEqualityComparer<T>? comparer)
4580public static unsafe void Replace<T>(this ReadOnlySpan<T> source, Span<T> destination, T oldValue, T newValue) where T : IEquatable<T>?
4664public static unsafe void Replace<T>(this ReadOnlySpan<T> source, Span<T> destination, T oldValue, T newValue, IEqualityComparer<T>? comparer = null)
4736static void ReplaceDefaultComparer(ReadOnlySpan<T> source, Span<T> destination, T oldValue, T newValue)
4747static void ReplaceComparer(ReadOnlySpan<T> source, Span<T> destination, T oldValue, T newValue, IEqualityComparer<T>? comparer)
4772public static void ReplaceAny<T>(this ReadOnlySpan<T> source, Span<T> destination, SearchValues<T> values, T newValue) where T : IEquatable<T>?
4798public static void ReplaceAny<T>(this Span<T> span, SearchValues<T> values, T newValue) where T : IEquatable<T>?
4822public static void ReplaceAnyExcept<T>(this ReadOnlySpan<T> source, Span<T> destination, SearchValues<T> values, T newValue) where T : IEquatable<T>?
4847public static void ReplaceAnyExcept<T>(this Span<T> span, SearchValues<T> values, T newValue) where T : IEquatable<T>?
4863public static int CommonPrefixLength<T>(this Span<T> span, ReadOnlySpan<T> other) =>
4873public static int CommonPrefixLength<T>(this Span<T> span, ReadOnlySpan<T> other, IEqualityComparer<T>? comparer) =>
5004/// or when <see cref="SplitAny(ReadOnlySpan{char}, Span{Range}, ReadOnlySpan{char}, StringSplitOptions)"/>
5054public static int Split(this ReadOnlySpan<char> source, Span<Range> destination, char separator, StringSplitOptions options = StringSplitOptions.None)
5088public static int Split(this ReadOnlySpan<char> source, Span<Range> destination, ReadOnlySpan<char> separator, StringSplitOptions options = StringSplitOptions.None)
5144public static int SplitAny(this ReadOnlySpan<char> source, Span<Range> destination, ReadOnlySpan<char> separators, StringSplitOptions options = StringSplitOptions.None)
5185public static int SplitAny(this ReadOnlySpan<char> source, Span<Range> destination, ReadOnlySpan<string> separators, StringSplitOptions options = StringSplitOptions.None)
5209ReadOnlySpan<char> source, Span<Range> destination,
5282Span<Range> destinationMinusOne = destination.Slice(0, destination.Length - 1);
5366public static int Count<T>(this Span<T> span, T value) where T : IEquatable<T>? =>
5500public static int Count<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>? =>
5633public static bool TryWrite(this Span<char> destination, [InterpolatedStringHandlerArgument(nameof(destination))] ref TryWriteInterpolatedStringHandler handler, out int charsWritten)
5653public static bool TryWrite(this Span<char> destination, IFormatProvider? provider, [InterpolatedStringHandlerArgument(nameof(destination), nameof(provider))] ref TryWriteInterpolatedStringHandler handler, out int charsWritten) =>
5671public static bool TryWrite<TArg0>(this Span<char> destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, TArg0 arg0)
5693public static bool TryWrite<TArg0, TArg1>(this Span<char> destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, TArg0 arg0, TArg1 arg1)
5717public static bool TryWrite<TArg0, TArg1, TArg2>(this Span<char> destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, TArg0 arg0, TArg1 arg1, TArg2 arg2)
5737public static bool TryWrite(this Span<char> destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, params object?[] args)
5756public static bool TryWrite(this Span<char> destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, params ReadOnlySpan<object?> args)
5769private 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)
6012private readonly Span<char> _destination;
6029/// <summary>Creates a handler used to write an interpolated string into a <see cref="Span{Char}"/>.</summary>
6035public TryWriteInterpolatedStringHandler(int literalLength, int formattedCount, Span<char> destination, out bool shouldAppend)
6044/// <summary>Creates a handler used to write an interpolated string into a <see cref="Span{Char}"/>.</summary>
6051public TryWriteInterpolatedStringHandler(int literalLength, int formattedCount, Span<char> destination, IFormatProvider? provider, out bool shouldAppend)
src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (33)
359public static unsafe bool TryFormatDecimal<TChar>(decimal value, ReadOnlySpan<char> format, NumberFormatInfo info, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
538public static bool TryFormatFloat<TNumber, TChar>(TNumber value, ReadOnlySpan<char> format, NumberFormatInfo info, Span<TChar> destination, out int charsWritten)
645private static bool TryCopyTo<TChar>(string source, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
652if (source.TryCopyTo(Unsafe.BitCast<Span<TChar>, Span<char>>(destination)))
663return Encoding.UTF8.TryGetBytes(source, Unsafe.BitCast<Span<TChar>, Span<byte>>(destination), out charsWritten);
734public static bool TryFormatInt32<TChar>(int value, int hexMask, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
746static unsafe bool TryFormatInt32Slow(int value, int hexMask, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
848public static bool TryFormatUInt32<TChar>(uint value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
860static unsafe bool TryFormatUInt32Slow(uint value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
964public static bool TryFormatInt64<TChar>(long value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
978static unsafe bool TryFormatInt64Slow(long value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
1080public static bool TryFormatUInt64<TChar>(ulong value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1092static unsafe bool TryFormatUInt64Slow(ulong value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
1197public static bool TryFormatInt128<TChar>(Int128 value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1211static unsafe bool TryFormatInt128Slow(Int128 value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
1315public static bool TryFormatUInt128<TChar>(UInt128 value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1327static unsafe bool TryFormatUInt128Slow(UInt128 value, ReadOnlySpan<char> format, IFormatProvider? provider, Span<TChar> destination, out int charsWritten)
1435internal static unsafe bool TryNegativeInt32ToDecStr<TChar>(int value, int digits, ReadOnlySpan<TChar> sNegative, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1484internal static unsafe bool TryInt32ToHexStr<TChar>(int value, char hexBase, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1540private static unsafe bool TryUInt32ToBinaryStr<TChar>(uint value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1759internal static unsafe bool TryUInt32ToDecStr<TChar>(uint value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1779internal static unsafe bool TryUInt32ToDecStr<TChar>(uint value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1868internal static unsafe bool TryNegativeInt64ToDecStr<TChar>(long value, int digits, ReadOnlySpan<TChar> sNegative, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1917internal static unsafe bool TryInt64ToHexStr<TChar>(long value, char hexBase, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
1989private static unsafe bool TryUInt64ToBinaryStr<TChar>(ulong value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2187internal static unsafe bool TryUInt64ToDecStr<TChar>(ulong value, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2208internal static unsafe bool TryUInt64ToDecStr<TChar>(ulong value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2296private static unsafe bool TryNegativeInt128ToDecStr<TChar>(Int128 value, int digits, ReadOnlySpan<TChar> sNegative, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2349private static unsafe bool TryInt128ToHexStr<TChar>(Int128 value, char hexBase, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2412private static unsafe bool TryUInt128ToBinaryStr<TChar>(Int128 value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
2549private static unsafe bool TryUInt128ToDecStr<TChar>(UInt128 value, int digits, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
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\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (15)
78Span<object?> copyOfArgs = new(ref copyOfArg);
81Span<bool> shouldCopyBack = new(ref copyBack);
121Span<object?> copyOfArgs = ((Span<object?>)stackArgStorage._args).Slice(0, _argCount);
122Span<bool> shouldCopyBack = ((Span<bool>)stackArgStorage._shouldCopyBack).Slice(0, _argCount);
153internal unsafe object? InvokeDirectByRefWithFewArgs(object? obj, Span<object?> copyOfArgs, BindingFlags invokeAttr)
191Span<object?> copyOfArgs;
194Span<bool> shouldCopyBack;
292Span<object?> copyOfArgs = new(ref copyOfArg, 1);
295Span<bool> shouldCopyBack = new(ref copyBack, 1); // Not used for setters
324internal void CopyBack(object?[] dest, Span<object?> copyOfParameters, Span<bool> shouldCopyBack)
347Span<object?> copyOfParameters,
348Span<bool> shouldCopyBack,
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (14)
239public object? Invoke(object? obj, Span<object?> arguments)
296internal object? InvokeWithFewArgs(object? obj, Span<object?> arguments)
301Span<object?> copyOfArgs = ((Span<object?>)stackArgStorage._args).Slice(0, _argCount);
302scoped Span<bool> shouldCopyBack = ((Span<bool>)stackArgStorage._shouldCopyBack).Slice(0, _argCount);
335return InvokeDirectByRefWithFewArgs(obj, ((Span<object?>)stackStorage._args).Slice(0, _argCount));
338internal unsafe object? InvokeDirectByRefWithFewArgs(object? obj, Span<object?> copyOfArgs)
358internal unsafe object? InvokeWithManyArgs(object? obj, Span<object?> arguments)
360Span<object?> copyOfArgs;
407scoped Span<bool> shouldCopyBack = stackalloc bool[_argCount];
442internal void CopyBack(Span<object?> dest, Span<object?> copyOfParameters, Span<bool> shouldCopyBack)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SpanMarshaller.cs (17)
12/// Supports marshalling a <see cref="Span{T}"/> from managed value
18/// A <see cref="Span{T}"/> marshalled with this marshaller will match the semantics of <see cref="MemoryMarshal.GetReference{T}(Span{T})"/>.
22[CustomMarshaller(typeof(Span<>), MarshalMode.Default, typeof(SpanMarshaller<,>))]
23[CustomMarshaller(typeof(Span<>), MarshalMode.ManagedToUnmanagedIn, typeof(SpanMarshaller<,>.ManagedToUnmanagedIn))]
34public static TUnmanagedElement* AllocateContainerForUnmanagedElements(Span<T> managed, out int numElements)
56public static ReadOnlySpan<T> GetManagedValuesSource(Span<T> managed)
65public static Span<TUnmanagedElement> GetUnmanagedValuesDestination(TUnmanagedElement* unmanaged, int numElements)
79public static Span<T> AllocateContainerForManagedElements(TUnmanagedElement* unmanaged, int numElements)
92public static Span<T> GetManagedValuesDestination(Span<T> managed)
124private Span<T> _managedArray;
126private Span<TUnmanagedElement> _span;
137public void FromManaged(Span<T> managed, Span<TUnmanagedElement> buffer)
173public Span<TUnmanagedElement> GetUnmanagedValuesDestination() => _span;
202public static ref T GetPinnableReference(Span<T> managed)
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);
1040/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
1041bool IFloatingPoint<NFloat>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
1064/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
1065bool IFloatingPoint<NFloat>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
1088/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
1089bool IFloatingPoint<NFloat>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
1112/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
1113bool IFloatingPoint<NFloat>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\SByte.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)
426/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
427bool IBinaryInteger<sbyte>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
440/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
441bool IBinaryInteger<sbyte>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Single.cs (10)
370public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
376public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
717/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" />
718bool IFloatingPoint<float>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten)
731/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" />
732bool IFloatingPoint<float>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten)
745/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" />
746bool IFloatingPoint<float>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten)
758/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" />
759bool IFloatingPoint<float>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (18)
25/// <remarks>In-place conversion is prohibited, please use <see cref="ToUpperInPlace(Span{byte}, out int)"/> for that.</remarks>
27public static OperationStatus ToUpper(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
38/// <remarks>In-place conversion is prohibited, please use <see cref="ToUpperInPlace(Span{char}, out int)"/> for that.</remarks>
40public static OperationStatus ToUpper(ReadOnlySpan<char> source, Span<char> destination, out int charsWritten)
52public static OperationStatus ToUpper(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
64public static OperationStatus ToUpper(ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten)
75/// <remarks>In-place conversion is prohibited, please use <see cref="ToLowerInPlace(Span{byte}, out int)"/> for that.</remarks>
77public static OperationStatus ToLower(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
88/// <remarks>In-place conversion is prohibited, please use <see cref="ToLowerInPlace(Span{char}, out int)"/> for that.</remarks>
90public static OperationStatus ToLower(ReadOnlySpan<char> source, Span<char> destination, out int charsWritten)
102public static OperationStatus ToLower(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
114public static OperationStatus ToLower(ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten)
124public static OperationStatus ToLowerInPlace(Span<byte> value, out int bytesWritten)
134public static OperationStatus ToLowerInPlace(Span<char> value, out int charsWritten)
144public static OperationStatus ToUpperInPlace(Span<byte> value, out int bytesWritten)
154public static OperationStatus ToUpperInPlace(Span<char> value, out int charsWritten)
157private static unsafe OperationStatus ChangeCase<TFrom, TTo, TCasing>(ReadOnlySpan<TFrom> source, Span<TTo> destination, out int destinationElementsWritten)
192private static unsafe OperationStatus ChangeCase<T, TCasing>(Span<T> buffer, out int elementsWritten)
src\libraries\System.Private.CoreLib\src\System\Text\ASCIIEncoding.cs (7)
314public override unsafe int GetBytes(ReadOnlySpan<char> chars, Span<byte> bytes)
326public override unsafe bool TryGetBytes(ReadOnlySpan<char> chars, Span<byte> bytes, out int bytesWritten)
381private protected sealed override int GetBytesWithFallback(ReadOnlySpan<char> chars, int originalCharsLength, Span<byte> bytes, int originalBytesLength, EncoderNLS? encoder, bool throwForDestinationOverflow = true)
605public override unsafe int GetChars(ReadOnlySpan<byte> bytes, Span<char> chars)
617public override unsafe bool TryGetChars(ReadOnlySpan<byte> bytes, Span<char> chars, out int charsWritten)
670private protected sealed override int GetCharsWithFallback(ReadOnlySpan<byte> bytes, int originalBytesLength, Span<char> chars, int originalCharsLength, DecoderNLS? decoder, bool throwForDestinationOverflow = true)
778internal sealed override OperationStatus EncodeRune(Rune value, Span<byte> bytes, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.Internal.cs (6)
79internal virtual OperationStatus EncodeRune(Rune value, Span<byte> bytes, out int bytesWritten)
512/// after data has been drained, then to call <see cref="GetBytesWithFallback(ReadOnlySpan{char}, int, Span{byte}, int, EncoderNLS, bool)"/>.
532Span<byte> bytes = new Span<byte>(pOriginalBytes, originalByteCount).Slice(bytesWrittenSoFar);
586private protected virtual unsafe int GetBytesWithFallback(ReadOnlySpan<char> chars, int originalCharsLength, Span<byte> bytes, int originalBytesLength, EncoderNLS? encoder, bool throwForDestinationOverflow = true)
1134Span<char> chars = new Span<char>(pOriginalChars, originalCharCount).Slice(charsWrittenSoFar);
1187private protected virtual unsafe int GetCharsWithFallback(ReadOnlySpan<byte> bytes, int originalBytesLength, Span<char> chars, int originalCharsLength, DecoderNLS? decoder, bool throwForDestinationOverflow = true)
src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (10)
230Span<char> original = stackalloc char[MaxUtf16CharsPerRune];
231Span<char> modified = stackalloc char[MaxUtf16CharsPerRune];
751public int EncodeToUtf16(Span<char> destination)
769public int EncodeToUtf8(Span<byte> destination)
936bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
939bool IUtf8SpanFormattable.TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
1056public bool TryEncodeToUtf16(Span<char> destination, out int charsWritten)
1063private static bool TryEncodeToUtf16(Rune value, Span<char> destination, out int charsWritten)
1100public bool TryEncodeToUtf8(Span<byte> destination, out int bytesWritten)
1107private static bool TryEncodeToUtf8(Rune value, Span<byte> destination, out int bytesWritten)
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\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\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (3)
957public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
961public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
964private bool TryFormatCore<TChar>(Span<TChar> destination, out int written, [StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] ReadOnlySpan<char> format, IFormatProvider? provider) where TChar : unmanaged, IUtfChar<TChar>
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (12)
120public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
126public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
946/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
947bool IBinaryInteger<UInt128>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
959/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
960bool IBinaryInteger<UInt128>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
1092static uint AddDivisor(Span<uint> left, ReadOnlySpan<uint> right)
1150Span<uint> left = new Span<uint>(pLeft, (Size / sizeof(uint)) - (LeadingZeroCountAsInt32(quotient) / 32));
1162Span<uint> right = new Span<uint>(pRight, (Size / sizeof(uint)) - (LeadingZeroCountAsInt32(divisor) / 32));
1164Span<uint> rawBits = stackalloc uint[Size / sizeof(uint)];
1166Span<uint> bits = rawBits.Slice(0, left.Length - right.Length + 1);
1262static uint SubtractDivisor(Span<uint> left, ReadOnlySpan<uint> right, ulong q)
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (6)
113public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
119public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
397/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
398bool IBinaryInteger<ushort>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
410/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
411bool IBinaryInteger<ushort>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\UInt32.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)
435/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
436bool IBinaryInteger<uint>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
448/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
449bool IBinaryInteger<uint>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (6)
128public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
134public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
434/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
435bool IBinaryInteger<ulong>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
447/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
448bool IBinaryInteger<ulong>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (6)
225public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
229public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
456/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
457bool IBinaryInteger<nuint>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
469/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
470bool IBinaryInteger<nuint>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Version.cs (12)
173Span<char> dest = stackalloc char[(4 * Number.Int32NumberBufferLength) + 3]; // at most 4 Int32s and 3 periods
182public bool TryFormat(Span<char> destination, out int charsWritten) =>
185public bool TryFormat(Span<char> destination, int fieldCount, out int charsWritten) =>
192public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten) =>
200public bool TryFormat(Span<byte> utf8Destination, int fieldCount, out int bytesWritten) =>
203private bool TryFormatCore<TChar>(Span<TChar> destination, int fieldCount, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
252((uint)value).TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(destination), out valueCharsWritten) :
253((uint)value).TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination), out valueCharsWritten, default, CultureInfo.InvariantCulture);
269bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
274bool IUtf8SpanFormattable.TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
System.Private.CoreLib.Generators (8)
System.Private.DataContractSerialization (27)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private 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 = stackalloc int[4];
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 = stackalloc int[4];
964Span<byte> span = GetBuffer(16, out int bufferOffset).AsSpan(bufferOffset, 16);
995Span<byte> bytes = GetBuffer(16, out int bufferOffset).AsSpan(bufferOffset, 16);
System.Private.Uri (41)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System\Uri.cs (5)
1093Span<char> slashSpan = result.AsSpan(0, count);
1432return string.Create(3, (byte)character, (Span<char> chars, byte b) =>
1623public bool TryFormat(Span<char> destination, out int charsWritten)
1691bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
2801private bool TryRecreateParts(scoped Span<char> span, out int charsWritten, UriComponents parts, ushort nonCanonical, UriFormat formatAs)
System.Private.Windows.Core (115)
Windows\Win32\System\Variant\VARIANT.cs (33)
328Span<VARIANT_BOOL> data = new(psa->pvData, array.Length);
329var result = GetSpan<bool>(array);
340Span<DECIMAL> data = new(psa->pvData, array.Length);
341var result = GetSpan<decimal>(array);
352Span<long> data = new(psa->pvData, array.Length);
353var result = GetSpan<decimal>(array);
364Span<double> data = new(psa->pvData, array.Length);
365var result = GetSpan<DateTime>(array);
376Span<IntPtr> data = new(psa->pvData, array.Length);
377var result = GetSpan<string?>(array);
389Span<IntPtr> data = new(psa->pvData, array.Length);
390var result = GetSpan<object?>(array);
401Span<VARIANT> data = new(psa->pvData, array.Length);
402var result = GetSpan<object?>(array);
453Span<int> indices = stackalloc int[array.Rank];
454Span<int> lower = stackalloc int[array.Rank];
455Span<int> upper = stackalloc int[array.Rank];
467static void InternalTransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType, Span<int> indices, Span<int> lower, Span<int> upper)
504private static void SetArrayValue(SAFEARRAY* psa, Array array, Span<int> indices, Span<int> lowerBounds, VARENUM arrayType)
506static void SetValue<T>(Array array, T value, Span<int> indices, Span<int> lowerBounds)
510var span = GetSpan<T>(array);
760Span<VARIANT_BOOL> data = new(ca.pElems, (int)ca.cElems);
787Span<long> data = new(ca.pElems, (int)ca.cElems);
799Span<double> data = new(ca.pElems, (int)ca.cElems);
811var data = new Span<FILETIME>(ca.pElems, (int)ca.cElems);
826Span<IntPtr> data = new(ca.pElems, (int)ca.cElems);
838Span<IntPtr> data = new(ca.pElems, (int)ca.cElems);
850Span<VARIANT> data = new(ca.pElems, (int)ca.cElems);
867private static Span<T> GetSpan<T>(Array array)
System.Private.Windows.GdiPlus (6)
System.Private.Xml (60)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private 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 (20)
System.Resources.Extensions (1)
System.Runtime (1)
System.Runtime.InteropServices.JavaScript (7)
System.Runtime.Numerics (283)
System\Number.BigInteger.cs (40)
82scoped Span<byte> buffer;
246Span<uint> wholeBlockDestination = bits.AsSpan(0, wholeBlockCount);
329scoped Span<uint> base1E9;
381Span<uint> resultBuffer = (
408static void DivideAndConquer(ReadOnlySpan<uint> base1E9, int trailingZeroCount, scoped Span<uint> bits)
414Span<uint> powersOf1e9Buffer = (
426Span<uint> leading = (
449static void Recursive(in PowersOf1e9 powersOf1e9, int powersOf1e9Index, ReadOnlySpan<uint> base1E9, Span<uint> bits)
473scoped Span<uint> buffer = (
482Span<uint> bitsUpper = bits.Slice(multiplierTrailingZeroCount, buffer2.Length + multiplier.Length);
498static void Naive(ReadOnlySpan<uint> base1E9, int trailingZeroCount, scoped Span<uint> bits)
526static int NaiveBase1E9ToBits(ReadOnlySpan<uint> base1E9, Span<uint> bits)
543static uint MultiplyAdd(Span<uint> bits, uint multiplier, uint addValue)
557private static string? FormatBigIntegerToHex(bool targetSpan, BigInteger value, char format, int digits, NumberFormatInfo info, Span<char> destination, out int charsWritten, out bool spanSuccess)
563Span<byte> bits = stackalloc byte[64]; // arbitrary threshold
602Span<char> chars = sb.AppendSpan((cur + 1) * 2);
641private static string? FormatBigIntegerToBinary(bool targetSpan, BigInteger value, int digits, Span<char> destination, out int charsWritten, out bool spanSuccess)
645Span<byte> bytes = stackalloc byte[64]; // arbitrary threshold
745internal static bool TryFormatBigInteger(BigInteger value, ReadOnlySpan<char> format, NumberFormatInfo info, Span<char> destination, out int charsWritten)
754NumberFormatInfo info, Span<char> destination, out int charsWritten, out bool spanSuccess)
809Span<uint> base1E9Buffer = ((uint)base1E9BufferLength <= BigIntegerCalculator.StackAllocThreshold ?
867Span<byte> numberBuffer = valueDigits + 1 <= CharStackBufferSize ?
940private static void BigIntegerToBase1E9(ReadOnlySpan<uint> bits, Span<uint> base1E9Buffer, out int base1E9Written)
952Span<uint> powersOf1e9Buffer = (
967static void DivideAndConquer(in PowersOf1e9 powersOf1e9, int powersIndex, ReadOnlySpan<uint> bits, Span<uint> base1E9Buffer, out int base1E9Written)
990Span<uint> upper = ((uint)upperLength <= BigIntegerCalculator.StackAllocThreshold
996Span<uint> lower = ((uint)lowerLength <= BigIntegerCalculator.StackAllocThreshold
1032static void Naive(ReadOnlySpan<uint> bits, Span<uint> base1E9Buffer, out int base1E9Written)
1039Span<uint> base1E9 = base1E9Buffer.Slice(0, base1E9Written);
1175public PowersOf1e9(Span<uint> pow1E9)
1194Span<uint> dst = pow1E9.Slice(toExclusive, src.Length << 1);
1258public void MultiplyPowerOfTen(ReadOnlySpan<uint> left, int trailingZeroCount, Span<uint> bits)
1269Span<uint> powersOfTen = (
1273scoped Span<uint> powersOfTen2 = bits;
1303Span<uint> src = powersOfTen.Slice(0, curLength);
1304Span<uint> dst = powersOfTen2.Slice(0, curLength += power.Length);
1311Span<uint> tmp = powersOfTen;
1325Span<uint> bits2 = bits.Slice(omittedLength, curLength += left.Length);
1381static virtual bool TryParseWholeBlocks(ReadOnlySpan<TChar> input, Span<uint> destination)
1411public static bool TryParseWholeBlocks(ReadOnlySpan<TChar> input, Span<uint> destination)
System\Numerics\BigInteger.cs (54)
227Span<int> bits = stackalloc int[4];
375Span<byte> uintBytes = MemoryMarshal.AsBytes(val.AsSpan(0, wholeUInt32Count));
548private BigInteger(Span<uint> value)
782Span<uint> quotient = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
812Span<uint> rest = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
818Span<uint> quotient = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
935Span<uint> bits = (leftBits.Length <= BigIntegerCalculator.StackAllocThreshold
948Span<uint> bits = (leftBits.Length <= BigIntegerCalculator.StackAllocThreshold
1003Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
1063Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
1074Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
1279public bool TryWriteBytes(Span<byte> destination, out int bytesWritten, bool isUnsigned = false, bool isBigEndian = false)
1290internal bool TryWriteOrCountBytes(Span<byte> destination, out int bytesWritten, bool isUnsigned = false, bool isBigEndian = false)
1296/// <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>
1303TryGetBytes(GetBytesMode.Count, default(Span<byte>), isUnsigned, IsBigEndian, ref count);
1307/// <summary>Mode used to enable sharing <see cref="TryGetBytes(GetBytesMode, Span{byte}, bool, bool, ref int)"/> for multiple purposes.</summary>
1315/// <summary>Shared logic for <see cref="ToByteArray(bool, bool)"/>, <see cref="TryWriteBytes(Span{byte}, out int, bool, bool)"/>, and <see cref="GetByteCount"/>.</summary>
1331private byte[]? TryGetBytes(GetBytesMode mode, Span<byte> destination, bool isUnsigned, bool isBigEndian, ref int bytesWritten)
1465Span<byte> destBytes = destination.Slice(curByte, srcBytes.Length);
1547private int WriteTo(Span<uint> buffer)
1671public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
1691Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
1703Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
1715Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
1727Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
1769Span<uint> bits = (size <= BigIntegerCalculator.StackAllocThreshold
1781Span<uint> bits = (size <= BigIntegerCalculator.StackAllocThreshold
1791Span<uint> bits = (size <= BigIntegerCalculator.StackAllocThreshold
1803Span<uint> bits = (size <= BigIntegerCalculator.StackAllocThreshold
2380Span<uint> x = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2387Span<uint> y = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2394Span<uint> z = (size <= BigIntegerCalculator.StackAllocThreshold
2436Span<uint> x = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2443Span<uint> y = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2450Span<uint> z = (size <= BigIntegerCalculator.StackAllocThreshold
2487Span<uint> x = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2494Span<uint> y = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2501Span<uint> z = (size <= BigIntegerCalculator.StackAllocThreshold
2564Span<uint> zd = z.AsSpan(digitShift, bits.Length);
2644Span<uint> zd = ((uint)zLength <= BigIntegerCalculator.StackAllocThreshold
2738Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2750Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2760Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2772Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2785Span<uint> bits = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2827Span<uint> quotient = ((uint)size <= BigIntegerCalculator.StackAllocThreshold
2853Span<uint> quotient = ((uint)size < BigIntegerCalculator.StackAllocThreshold
2903Span<uint> bits = (size <= BigIntegerCalculator.StackAllocThreshold
3300Span<uint> zd = ((uint)zLength <= BigIntegerCalculator.StackAllocThreshold
3430/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteBigEndian(Span{byte}, out int)" />
3431bool IBinaryInteger<BigInteger>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten)
3532/// <inheritdoc cref="IBinaryInteger{TSelf}.TryWriteLittleEndian(Span{byte}, out int)" />
3533bool IBinaryInteger<BigInteger>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten)
5102Span<uint> zd = ((uint)zLength <= BigIntegerCalculator.StackAllocThreshold
System\Numerics\BigIntegerCalculator.AddSub.cs (9)
14private static void CopyTail(ReadOnlySpan<uint> source, Span<uint> dest, int start)
19public static void Add(ReadOnlySpan<uint> left, uint right, Span<uint> bits)
27public static void Add(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> bits)
59public static void AddSelf(Span<uint> left, ReadOnlySpan<uint> right)
90public static void Subtract(ReadOnlySpan<uint> left, uint right, Span<uint> bits)
99public static void Subtract(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> bits)
132public static void SubtractSelf(Span<uint> left, ReadOnlySpan<uint> right)
168private static void Add(ReadOnlySpan<uint> left, Span<uint> bits, ref uint resultPtr, int startIndex, long initialCarry)
215private static void Subtract(ReadOnlySpan<uint> left, Span<uint> bits, ref uint resultPtr, int startIndex, long initialCarry)
System\Numerics\BigIntegerCalculator.DivRem.cs (40)
19public static void Divide(ReadOnlySpan<uint> left, uint right, Span<uint> quotient, out uint remainder)
27public static void Divide(ReadOnlySpan<uint> left, uint right, Span<uint> quotient)
34private static void Divide(ReadOnlySpan<uint> left, uint right, Span<uint> quotient, ref ulong carry)
68public static void Divide(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> quotient, Span<uint> remainder)
89public static void Divide(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> quotient)
105Span<uint> leftCopy = (left.Length <= StackAllocThreshold ?
121public static void Remainder(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> remainder)
141Span<uint> quotient = (quotientLength <= StackAllocThreshold ?
159private static void DivRem(Span<uint> left, ReadOnlySpan<uint> right, Span<uint> quotient)
178Span<uint> leftCopy = (left.Length <= StackAllocThreshold ?
184scoped Span<uint> quotientActual;
208private static void DivideGrammarSchool(Span<uint> left, ReadOnlySpan<uint> right, Span<uint> quotient)
293private static uint AddDivisor(Span<uint> left, ReadOnlySpan<uint> right)
312private static uint SubtractDivisor(Span<uint> left, ReadOnlySpan<uint> right, ulong q)
355private static void DivideBurnikelZiegler(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> quotient, Span<uint> remainder)
384Span<uint> b = (n <= StackAllocThreshold ?
398Span<uint> a = (aLength <= StackAllocThreshold ?
403static void Normalize(ReadOnlySpan<uint> src, int sigmaDigit, int sigmaSmall, Span<uint> bits)
409Span<uint> dst = bits.Slice(sigmaDigit);
438Span<uint> r = ((n + 1) <= StackAllocThreshold ?
443Span<uint> z = (2 * n <= StackAllocThreshold ?
449Span<uint> quotientUpper = quotient.Slice((t - 2) * n);
453Span<uint> q = (n <= StackAllocThreshold ?
489Span<uint> rt = r.Slice(sigmaDigit);
518private static void BurnikelZieglerFallback(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> quotient, Span<uint> remainder)
566Span<uint> r1 = (left.Length <= StackAllocThreshold ?
592private static void BurnikelZieglerD2n1n(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> quotient, Span<uint> remainder)
610Span<uint> r1 = ((right.Length + 1) <= StackAllocThreshold ?
621private static void BurnikelZieglerD3n2n(ReadOnlySpan<uint> left12, ReadOnlySpan<uint> left3, ReadOnlySpan<uint> right, Span<uint> quotient, Span<uint> remainder)
637Span<uint> r1 = remainder.Slice(n);
639Span<uint> d = (right.Length <= StackAllocThreshold ?
666Span<uint> rr = remainder.Slice(0, d.Length + 1);
683static void MultiplyActual(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> bits)
System\Numerics\BigIntegerCalculator.FastReducer.cs (9)
20private readonly Span<uint> _q1;
21private readonly Span<uint> _q2;
23public FastReducer(ReadOnlySpan<uint> modulus, Span<uint> r, Span<uint> mu, Span<uint> q1, Span<uint> q2)
44public int Reduce(Span<uint> value)
68private static int DivMul(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> bits, int k)
102private static int SubMod(Span<uint> left, ReadOnlySpan<uint> right, ReadOnlySpan<uint> modulus, int k)
System\Numerics\BigIntegerCalculator.PowMod.cs (57)
16public static void Pow(uint value, uint power, Span<uint> bits)
21public static void Pow(ReadOnlySpan<uint> value, uint power, Span<uint> bits)
26Span<uint> temp = (bits.Length <= StackAllocThreshold ?
32Span<uint> valueCopy = (bits.Length <= StackAllocThreshold ?
38Span<uint> result = PowCore(valueCopy, value.Length, temp, power, bits);
48private static Span<uint> PowCore(Span<uint> value, int valueLength, Span<uint> temp, uint power, Span<uint> result)
70private static int MultiplySelf(ref Span<uint> left, int leftLength, ReadOnlySpan<uint> right, ref Span<uint> temp)
87Span<uint> t = left;
93private static int SquareSelf(ref Span<uint> value, int valueLength, ref Span<uint> temp)
104Span<uint> t = value;
203ReadOnlySpan<uint> modulus, Span<uint> bits)
209ReadOnlySpan<uint> modulus, Span<uint> bits)
219Span<uint> valueCopy = (size <= StackAllocThreshold ?
238Span<uint> temp = (bits.Length <= StackAllocThreshold ?
252ReadOnlySpan<uint> modulus, Span<uint> bits)
258ReadOnlySpan<uint> modulus, Span<uint> bits)
268Span<uint> valueCopy = (size <= StackAllocThreshold ?
287Span<uint> temp = (bits.Length <= StackAllocThreshold ?
308private static void PowCore(Span<uint> value, int valueLength,
310Span<uint> temp, Span<uint> bits)
318Span<uint> result = PowCore(value, valueLength, power, modulus, bits, 1, temp);
326Span<uint> r = ((uint)size <= StackAllocThreshold ?
333Span<uint> mu = ((uint)size <= StackAllocThreshold ?
340Span<uint> q1 = ((uint)size <= StackAllocThreshold ?
346Span<uint> q2 = ((uint)size <= StackAllocThreshold ?
356Span<uint> result = PowCore(value, valueLength, power, reducer, bits, 1, temp);
369private static void PowCore(Span<uint> value, int valueLength,
371Span<uint> temp, Span<uint> bits)
378Span<uint> result = PowCore(value, valueLength, power, modulus, bits, 1, temp);
386Span<uint> r = ((uint)size <= StackAllocThreshold ?
393Span<uint> mu = ((uint)size <= StackAllocThreshold ?
400Span<uint> q1 = ((uint)size <= StackAllocThreshold ?
406Span<uint> q2 = ((uint)size <= StackAllocThreshold ?
416Span<uint> result = PowCore(value, valueLength, power, reducer, bits, 1, temp);
429private static Span<uint> PowCore(Span<uint> value, int valueLength,
431Span<uint> result, int resultLength,
432Span<uint> temp)
459private static Span<uint> PowCore(Span<uint> value, int valueLength,
461Span<uint> result, int resultLength,
462Span<uint> temp)
488private static Span<uint> PowCore(Span<uint> value, int valueLength,
490Span<uint> result, int resultLength,
491Span<uint> temp)
518private static Span<uint> PowCore(Span<uint> value, int valueLength,
520Span<uint> result, int resultLength,
521Span<uint> temp)
System\Numerics\BigIntegerCalculator.ShiftRot.cs (10)
13public static void RotateLeft(Span<uint> bits, long rotateLeftAmount)
38public static void RotateLeft(Span<uint> bits, int digitShift, int smallShift)
51public static void RotateRight(Span<uint> bits, int digitShift, int smallShift)
64private static void SwapUpperAndLower(Span<uint> bits, int lowerLength)
71Span<uint> lower = bits.Slice(0, lowerLength);
72Span<uint> upper = bits.Slice(lowerLength);
74Span<uint> lowerDst = bits.Slice(upperLength);
78Span<uint> tmp = ((uint)tmpLength <= StackAllocThreshold ?
99public static void LeftShiftSelf(Span<uint> bits, int shift, out uint carry)
168public static void RightShiftSelf(Span<uint> bits, int shift, out uint carry)
System\Numerics\BigIntegerCalculator.SquMul.cs (19)
21public static void Square(ReadOnlySpan<uint> value, Span<uint> bits)
89Span<uint> bitsLow = bits.Slice(0, n2);
90Span<uint> bitsHigh = bits.Slice(n2);
100Span<uint> fold = ((uint)foldLength <= StackAllocThreshold ?
107Span<uint> core = ((uint)coreLength <= StackAllocThreshold ?
131public static void Multiply(ReadOnlySpan<uint> left, uint right, Span<uint> bits)
159public static void Multiply(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> bits)
217Span<uint> bitsLow = bits.Slice(0, n + right.Length);
218Span<uint> bitsHigh = bits.Slice(n);
225Span<uint> carry = ((uint)carryLength <= StackAllocThreshold ?
229Span<uint> carryOrig = bits.Slice(n, right.Length);
247static void MultiplyKaratsuba(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> bits, int n)
269Span<uint> bitsLow = bits.Slice(0, n + n);
270Span<uint> bitsHigh = bits.Slice(n + n);
284Span<uint> leftFold = ((uint)foldLength <= StackAllocThreshold ?
290Span<uint> rightFold = ((uint)foldLength <= StackAllocThreshold ?
303Span<uint> core = ((uint)coreLength <= StackAllocThreshold ?
331static void Naive(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> bits)
362private static void SubtractCore(ReadOnlySpan<uint> left, ReadOnlySpan<uint> right, Span<uint> core)
System\Numerics\Complex.cs (13)
2199/// <inheritdoc cref="ISpanFormattable.TryFormat(Span{char}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
2200public bool TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
2203/// <inheritdoc cref="IUtf8SpanFormattable.TryFormat(Span{byte}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
2204public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan<char> format = default, IFormatProvider? provider = null) =>
2207private bool TryFormatCore<TChar>(Span<TChar> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) where TChar : unmanaged, IBinaryInteger<TChar>
2216m_real.TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(destination.Slice(1)), out realChars, format, provider) :
2217m_real.TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination.Slice(1)), out realChars, format, provider))
2227m_imaginary.TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(destination.Slice(2)), out imaginaryChars, format, provider) :
2228m_imaginary.TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination.Slice(2)), out imaginaryChars, format, provider))
System.Security.Cryptography (956)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.cs (10)
27Span<byte> md,
38private static unsafe partial int EvpDigestFinalXOF(SafeEvpMdCtxHandle ctx, Span<byte> md, uint len);
41private static unsafe partial int EvpDigestCurrentXOF(SafeEvpMdCtxHandle ctx, Span<byte> md, uint len);
50private static unsafe partial int EvpDigestXOFOneShot(IntPtr type, ReadOnlySpan<byte> source, int sourceSize, Span<byte> md, uint len);
66Span<byte> pDestination,
74Span<byte> destination)
87internal static unsafe int EvpDigestFinalXOF(SafeEvpMdCtxHandle ctx, Span<byte> destination)
92internal static unsafe int EvpDigestCurrentXOF(SafeEvpMdCtxHandle ctx, Span<byte> destination)
97internal static unsafe int EvpDigestXOFOneShot(IntPtr type, ReadOnlySpan<byte> source, Span<byte> destination)
102internal static int EvpDigestSqueeze(SafeEvpMdCtxHandle ctx, Span<byte> destination)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.Kem.cs (12)
44Span<byte> sharedSecret,
63Span<byte> destination,
69Span<byte> destination,
75Span<byte> destination,
82Span<byte> ciphertext,
84Span<byte> sharedSecret,
149internal static void EvpKemDecapsulate(SafeEvpPKeyHandle key, ReadOnlySpan<byte> ciphertext, Span<byte> sharedSecret)
170internal static void EvpKemExportPrivateSeed(SafeEvpPKeyHandle key, Span<byte> destination) =>
173internal static void EvpKemExportDecapsulationKey(SafeEvpPKeyHandle key, Span<byte> destination) =>
176internal static void EvpKemExportEncapsulationKey(SafeEvpPKeyHandle key, Span<byte> destination) =>
179internal static void EvpKemEncapsulate(SafeEvpPKeyHandle key, Span<byte> ciphertext, Span<byte> sharedSecret)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.EcDsa.cs (1)
26Span<byte> destination)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.MLDsa.cs (12)
82Span<byte> destination, int destinationLength);
88Span<byte> destination)
139Span<byte> destination, int destinationLength);
144Span<byte> destination)
191Span<byte> destination, int destinationLength);
196Span<byte> destination)
247private static partial int CryptoNative_MLDsaExportSecretKey(SafeEvpPKeyHandle pkey, Span<byte> destination, int destinationLength);
250private static partial int CryptoNative_MLDsaExportSeed(SafeEvpPKeyHandle pkey, Span<byte> destination, int destinationLength);
253private static partial int CryptoNative_MLDsaExportPublicKey(SafeEvpPKeyHandle pkey, Span<byte> destination, int destinationLength);
255internal static void MLDsaExportSecretKey(SafeEvpPKeyHandle key, Span<byte> destination) =>
258internal static void MLDsaExportSeed(SafeEvpPKeyHandle key, Span<byte> destination) =>
261internal static void MLDsaExportPublicKey(SafeEvpPKeyHandle key, Span<byte> destination) =>
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (15)
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);
1187/// <inheritdoc cref="TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan{char}, PbeParameters, Span{byte}, out int)"/>
1194Span<byte> destination,
1241Span<byte> destination,
1301Span<byte> destination,
1384public bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten)
1421protected abstract bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten);
1487public bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten)
1542public int ExportCompositeMLDsaPublicKey(Span<byte> destination)
1579public bool TryExportCompositeMLDsaPublicKey(Span<byte> destination, out int bytesWritten)
1667public int ExportCompositeMLDsaPrivateKey(Span<byte> destination)
1704public bool TryExportCompositeMLDsaPrivateKey(Span<byte> destination, out int bytesWritten)
1760protected abstract int ExportCompositeMLDsaPublicKeyCore(Span<byte> destination);
1777protected abstract int ExportCompositeMLDsaPrivateKeyCore(Span<byte> destination);
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);
699public bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten)
778public bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten)
822protected abstract bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten);
991Span<byte> destination,
1052Span<byte> destination,
1071/// <inheritdoc cref="TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan{char}, PbeParameters, Span{byte}, out int)"/>
1079Span<byte> destination,
1226public void ExportMLDsaPublicKey(Span<byte> destination)
1268public void ExportMLDsaPrivateKey(Span<byte> destination)
1308public void ExportMLDsaPrivateSeed(Span<byte> destination)
1989protected abstract void SignDataCore(ReadOnlySpan<byte> data, ReadOnlySpan<byte> context, Span<byte> destination);
2031protected abstract void SignPreHashCore(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> context, string hashAlgorithmOid, Span<byte> destination);
2063protected abstract void ExportMLDsaPublicKeyCore(Span<byte> destination);
2071protected abstract void ExportMLDsaPrivateKeyCore(Span<byte> destination);
2079protected abstract void ExportMLDsaPrivateSeedCore(Span<byte> destination);
2088Span<byte> publicKey = rented.AsSpan(0, publicKeySizeInBytes);
2248Span<byte> buffer = rent.AsSpan(0, privateKeySize);
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (19)
110public void Encapsulate(Span<byte> ciphertext, Span<byte> sharedSecret)
174protected abstract void EncapsulateCore(Span<byte> ciphertext, Span<byte> sharedSecret);
202public void Decapsulate(ReadOnlySpan<byte> ciphertext, Span<byte> sharedSecret)
273protected abstract void DecapsulateCore(ReadOnlySpan<byte> ciphertext, Span<byte> sharedSecret);
290public void ExportPrivateSeed(Span<byte> destination)
329protected abstract void ExportPrivateSeedCore(Span<byte> destination);
521public void ExportDecapsulationKey(Span<byte> destination)
560protected abstract void ExportDecapsulationKeyCore(Span<byte> destination);
575public void ExportEncapsulationKey(Span<byte> destination)
612protected abstract void ExportEncapsulationKeyCore(Span<byte> destination);
636public bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten)
706public bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten)
782protected abstract bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten);
824Span<byte> destination,
878Span<byte> destination,
925Span<byte> destination,
1760Span<byte> buffer = rent.AsSpan(0, decapsulationKeySize);
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (13)
90Span<byte> destination = default;
109Span<byte> destination,
126Span<byte> tmp = stackalloc byte[512];
170Span<byte> destination,
231public override bool TryEncrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, out int bytesWritten)
244Span<byte> destination,
300private bool TryExportPrivateKey(TryExportPrivateKeySelector selector, Span<byte> destination, out int bytesWritten)
338Span<byte> destination,
363public override bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten)
373public override bool TryExportRSAPrivateKey(Span<byte> destination, out int bytesWritten)
394public override bool TryExportRSAPublicKey(Span<byte> destination, out int bytesWritten)
412public override bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten)
751Span<byte> destination,
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 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 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\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 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)
1784protected abstract void SignDataCore(ReadOnlySpan<byte> data, ReadOnlySpan<byte> context, Span<byte> destination);
1825protected abstract void SignPreHashCore(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> context, string hashAlgorithmOid, Span<byte> destination);
1856protected abstract void ExportSlhDsaPublicKeyCore(Span<byte> destination);
1864protected abstract void ExportSlhDsaPrivateKeyCore(Span<byte> destination);
1871Span<byte> publicKey = (stackalloc byte[64])[..publicKeySizeInBytes];
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)
System\Security\Cryptography\Aes.cs (19)
129public void EncryptKeyWrapPadded(ReadOnlySpan<byte> plaintext, Span<byte> destination)
204/// <paramref name="destination"/> has a <see cref="Span{T}.Length"/> that is
216public int DecryptKeyWrapPadded(ReadOnlySpan<byte> ciphertext, Span<byte> destination)
254public bool TryDecryptKeyWrapPadded(ReadOnlySpan<byte> ciphertext, Span<byte> destination, out int bytesWritten)
355protected virtual int DecryptKeyWrapPaddedCore(ReadOnlySpan<byte> source, Span<byte> destination)
361Span<byte> decrypt = stackalloc byte[16];
409protected virtual void EncryptKeyWrapPaddedCore(ReadOnlySpan<byte> source, Span<byte> destination)
418Span<byte> buf = stackalloc byte[16];
421Span<byte> keyPart = buf.Slice(8);
450private void Rfc3394Wrap(ulong iv, ReadOnlySpan<byte> source, Span<byte> destination)
456Span<byte> B = stackalloc byte[16];
457Span<byte> A = B.Slice(0, 8);
458Span<byte> ALo = A.Slice(4, 4);
466Span<byte> R = destination.Slice(8);
484private ulong Rfc3394Unwrap(ReadOnlySpan<byte> source, Span<byte> destination)
486Span<byte> B = stackalloc byte[16];
487Span<byte> A = B.Slice(0, 8);
488Span<byte> ALo = A.Slice(4, 4);
499Span<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\Cng.NotSupported.cs (17)
402protected override void ExportMLDsaPrivateSeedCore(Span<byte> destination) =>
405protected override void ExportMLDsaPublicKeyCore(Span<byte> destination) =>
408protected override void ExportMLDsaPrivateKeyCore(Span<byte> destination) =>
411protected override void SignDataCore(ReadOnlySpan<byte> data, ReadOnlySpan<byte> context, Span<byte> destination) =>
414protected override void SignPreHashCore(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> context, string hashAlgorithmOid, Span<byte> destination) =>
417protected override bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten) =>
439protected override void DecapsulateCore(ReadOnlySpan<byte> ciphertext, Span<byte> sharedSecret)
444protected override void EncapsulateCore(Span<byte> ciphertext, Span<byte> sharedSecret)
449protected override void ExportPrivateSeedCore(Span<byte> destination)
454protected override void ExportDecapsulationKeyCore(Span<byte> destination)
459protected override void ExportEncapsulationKeyCore(Span<byte> destination)
464protected override bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten)
475protected override int SignDataCore(ReadOnlySpan<byte> data, ReadOnlySpan<byte> context, Span<byte> destination) =>
478protected override int ExportCompositeMLDsaPrivateKeyCore(Span<byte> destination) =>
481protected override int ExportCompositeMLDsaPublicKeyCore(Span<byte> destination) =>
484protected override bool TryExportPkcs8PrivateKeyCore(Span<byte> destination, out int bytesWritten) =>
System\Security\Cryptography\CryptographicOperations.cs (11)
61public static void ZeroMemory(Span<byte> buffer)
149public static int HashData(HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> source, Span<byte> destination)
185public static bool TryHashData(HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
262public static int HashData(HashAlgorithmName hashAlgorithm, Stream source, Span<byte> destination)
458Span<byte> destination)
499Span<byte> destination,
612public static int HmacData(HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key, Stream source, Span<byte> destination)
805Span<byte> macBuffer = stackalloc byte[MaxStackAlloc];
815Span<byte> mac = macBuffer.Slice(0, written);
897Span<byte> macBuffer = stackalloc byte[MaxStackAlloc];
907Span<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 void Extract(HashAlgorithmName hashAlgorithmName, int hashLength, ReadOnlySpan<byte> ikm, ReadOnlySpan<byte> salt, Span<byte> prk)
19internal static void Expand(HashAlgorithmName hashAlgorithmName, int hashLength, ReadOnlySpan<byte> prk, Span<byte> output, ReadOnlySpan<byte> info)
24var counterSpan = new Span<byte>(ref counter);
25Span<byte> t = Span<byte>.Empty;
26Span<byte> remainingOutput = output;
29Span<byte> tempInfoBuffer = stackalloc byte[MaxStackInfoBuffer];
70Span<byte> lastChunk = stackalloc byte[hashLength];
86internal static void DeriveKey(HashAlgorithmName hashAlgorithmName, int hashLength, ReadOnlySpan<byte> ikm, Span<byte> output, ReadOnlySpan<byte> salt, ReadOnlySpan<byte> info)
88Span<byte> prk = stackalloc byte[hashLength];
95private static void GetHashAndReset(IncrementalHash hmac, Span<byte> output)
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 (10)
144Span<TChar> postebStackBuffer = stackalloc TChar[PostebStackBufferSize];
183Span<TChar> postebBuffer = postebLength > PostebStackBufferSize
232static ReadOnlySpan<TChar> WritePostEB(ReadOnlySpan<TChar> label, Span<TChar> destination)
458public static bool TryWrite(ReadOnlySpan<char> label, ReadOnlySpan<byte> data, Span<char> destination, out int charsWritten)
520Span<byte> destination,
588private static int WriteCore<TChar, T>(ReadOnlySpan<TChar> label, ReadOnlySpan<byte> data, Span<TChar> destination)
592static int Write(ReadOnlySpan<TChar> str, Span<TChar> dest, int offset)
735static abstract int WriteBase64(ReadOnlySpan<byte> bytes, Span<TChar> destination, int offset);
751public static int WriteBase64(ReadOnlySpan<byte> bytes, Span<char> destination, int offset)
778public 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 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 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,
1311public bool TryExportRSAPrivateKeyPem(Span<char> destination, out int charsWritten)
1313static bool Export(RSA alg, Span<byte> destination, out int bytesWritten)
1357public bool TryExportRSAPublicKeyPem(Span<char> destination, out int charsWritten)
1359static bool Export(RSA alg, Span<byte> destination, out int bytesWritten)
System\Security\Cryptography\RSACryptoServiceProvider.Unix.cs (4)
64public override bool TryDecrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, out int bytesWritten)
103public override bool TryEncrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, out int bytesWritten)
205public override bool TrySignData(ReadOnlySpan<byte> data, Span<byte> destination, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding, out int bytesWritten)
242public override bool TrySignHash(ReadOnlySpan<byte> hash, Span<byte> destination, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding, out int bytesWritten)
System\Security\Cryptography\RSAWrapper.cs (10)
71Span<byte> destination,
78Span<byte> destination,
85Span<byte> destination,
119Span<byte> destination,
143public override bool TryExportRSAPrivateKey(Span<byte> destination, out int bytesWritten) =>
148public override bool TryExportRSAPublicKey(Span<byte> destination, out int bytesWritten) =>
151public override bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten) =>
154public override bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritten) =>
160Span<byte> destination,
167Span<byte> destination,
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)
1002public override bool TryEncode(Span<byte> destination, out int bytesWritten)
System.Security.Cryptography.Pkcs (83)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Security.Cryptography.ProtectedData (7)
System.Security.Cryptography.Xml (8)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.ServiceModel.NetFramingBase (2)
System.Text.Encoding.CodePages (2)
System.Text.Encodings.Web (51)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private 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 (293)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private 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 ?
284public static int TranscodeHelper(ReadOnlySpan<byte> utf8Unescaped, Span<char> destination)
388internal static int GetUtf8FromText(ReadOnlySpan<char> text, Span<byte> dest)
441internal static void Unescape(ReadOnlySpan<byte> source, Span<byte> destination, out int written)
452internal static void Unescape(ReadOnlySpan<byte> source, Span<byte> destination, int idx, out int written)
465internal static bool TryUnescape(ReadOnlySpan<byte> source, Span<byte> destination, out int written)
476private static bool TryUnescape(ReadOnlySpan<byte> source, Span<byte> destination, int idx, out int written)
System\Text\Json\Writer\JsonWriterHelper.Escaping.cs (8)
87private static void EscapeString(ReadOnlySpan<byte> value, Span<byte> destination, JavaScriptEncoder encoder, ref int consumed, ref int written, bool isFinalBlock)
107public static void EscapeString(ReadOnlySpan<byte> value, Span<byte> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int written)
110public static void EscapeString(ReadOnlySpan<byte> value, Span<byte> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int consumed, out int written, bool isFinalBlock = true)
159private static void EscapeNextBytes(byte value, Span<byte> destination, ref int written)
205private static void EscapeString(ReadOnlySpan<char> value, Span<char> destination, JavaScriptEncoder encoder, ref int consumed, ref int written, bool isFinalBlock)
225public static void EscapeString(ReadOnlySpan<char> value, Span<char> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int written)
228public static void EscapeString(ReadOnlySpan<char> value, Span<char> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int consumed, out int written, bool isFinalBlock = true)
277private static void EscapeNextChars(char value, Span<char> destination, ref int written)
System.Text.Json.SourceGeneration (14)
System.Text.RegularExpressions (53)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Text.RegularExpressions.Generator (49)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
222Span<char> result = (bytes.Length > 16) ?
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private static bool TryDecodeFromUtf16_Scalar(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
System.Web.HttpUtility (22)
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)
185public static void EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> utf8Destination, Casing casing = Casing.Upper)
202public static void EncodeToUtf16(ReadOnlySpan<byte> source, Span<char> destination, Casing casing = Casing.Upper)
281public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
293public static bool TryDecodeFromUtf16(ReadOnlySpan<char> source, Span<byte> destination, out int charsProcessed)
461private static bool TryDecodeFromUtf8_Scalar(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesProcessed)
496private 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 (76)
System.Windows.Forms.Primitives.Tests (19)
System.Windows.Forms.Primitives.TestUtilities (2)
System.Windows.Forms.Tests (9)
System.Windows.Forms.UI.IntegrationTests (16)
Test.Utilities (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
Text.Analyzers (49)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
779Name: nameof(Span<>),
xunit.assert (53)
StringAsserts.cs (40)
179 Span<char> expectedSubstring,
180 Span<char> actualString,
192 Span<char> expectedSubstring,
206 Span<char> actualString,
236 Span<char> expectedSubstring,
237 Span<char> actualString) =>
247 Span<char> expectedSubstring,
259 Span<char> actualString) =>
426 Span<char> expectedSubstring,
427 Span<char> actualString,
439 Span<char> expectedSubstring,
453 Span<char> actualString,
481 Span<char> expectedSubstring,
482 Span<char> actualString) =>
492 Span<char> expectedSubstring,
504 Span<char> actualString) =>
741 Span<char> expectedEndString,
742 Span<char> actualString) =>
752 Span<char> expectedEndString,
764 Span<char> actualString) =>
786 Span<char> expectedEndString,
787 Span<char> actualString,
799 Span<char> expectedEndString,
813 Span<char> actualString,
1108 Span<char> expected,
1109 Span<char> actual) =>
1119 Span<char> expected,
1131 Span<char> actual) =>
1183 Span<char> expected,
1184 Span<char> actual,
1229 Span<char> expected,
1276 Span<char> actual,
1534 Span<char> expectedStartString,
1535 Span<char> actualString) =>
1545 Span<char> expectedStartString,
1557 Span<char> actualString) =>
1579 Span<char> expectedStartString,
1580 Span<char> actualString,
1592 Span<char> expectedStartString,
1606 Span<char> actualString,