1791 references to Shared
aspire (4)
Aspire.Dashboard (6)
Aspire.Hosting (2)
dotnet (8)
GenerateDocumentationAndConfigFiles (6)
ILCompiler.Compiler (8)
ILCompiler.TypeSystem (4)
illink (4)
ILLink.RoslynAnalyzer (4)
Microsoft.AspNetCore.Antiforgery (10)
Microsoft.AspNetCore.Components (14)
Microsoft.AspNetCore.Components.Endpoints (26)
Microsoft.AspNetCore.Components.Forms (1)
Microsoft.AspNetCore.Components.Server (17)
Microsoft.AspNetCore.Components.Web (1)
Microsoft.AspNetCore.Components.WebAssembly (3)
Microsoft.AspNetCore.Components.WebView (3)
Microsoft.AspNetCore.DataProtection (27)
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (9)
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Http.Abstractions (3)
Microsoft.AspNetCore.Http.Connections (3)
Microsoft.AspNetCore.Http.Extensions (18)
Microsoft.AspNetCore.Http.Results (2)
Microsoft.AspNetCore.HttpLogging (13)
Microsoft.AspNetCore.Identity (5)
Microsoft.AspNetCore.Mvc.Core (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (6)
Microsoft.AspNetCore.OpenApi (3)
Microsoft.AspNetCore.OutputCaching (8)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (2)
Microsoft.AspNetCore.Owin (2)
Microsoft.AspNetCore.Razor.Utilities.Shared (15)
Microsoft.AspNetCore.Server.Kestrel.Core (25)
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (5)
Microsoft.AspNetCore.SignalR.Common (3)
Microsoft.AspNetCore.SignalR.Core (2)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (3)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (4)
Microsoft.AspNetCore.SignalR.Specification.Tests (3)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Microsoft.AspNetCore.WebSockets (7)
Microsoft.AspNetCore.WebUtilities (20)
Microsoft.Build (4)
Microsoft.Build.Framework (11)
Microsoft.Build.Tasks.Core (4)
Microsoft.CodeAnalysis (4)
Microsoft.CodeAnalysis.Analyzers (6)
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
Microsoft.CodeAnalysis.CodeStyle (6)
Microsoft.CodeAnalysis.CSharp (4)
Microsoft.CodeAnalysis.Razor.Compiler (14)
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
Microsoft.CodeAnalysis.Workspaces (10)
Microsoft.DotNet.Build.Tasks.FileCatalog (2)
Microsoft.DotNet.Cli.Utils (5)
Microsoft.DotNet.HotReload.Watch (18)
Microsoft.DotNet.TemplateLocator (4)
Microsoft.Extensions.AI (6)
Microsoft.Extensions.AI.Abstractions (8)
Microsoft.Extensions.Caching.Hybrid (23)
Microsoft.Extensions.Caching.Hybrid.Tests (12)
Microsoft.Extensions.Caching.SqlServer (4)
Microsoft.Extensions.Caching.StackExchangeRedis (2)
Microsoft.Extensions.Compliance.Abstractions (2)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (3)
Microsoft.Extensions.Configuration.EnvironmentVariables (4)
Microsoft.Extensions.DataIngestion (4)
Microsoft.Extensions.DependencyModel (6)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Microsoft.Extensions.DotNetDeltaApplier (18)
Microsoft.Extensions.Http.Diagnostics (4)
Microsoft.Extensions.Logging.Abstractions (4)
Microsoft.Extensions.Logging.Console (10)
Microsoft.Extensions.Logging.Generators (3)
Microsoft.Extensions.Options.Contextual (2)
Microsoft.Extensions.ServiceDiscovery.Dns (13)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (8)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (4)
Microsoft.Extensions.Telemetry (7)
Microsoft.JSInterop (3)
Microsoft.ML.Core (2)
Microsoft.ML.ImageAnalytics (1)
Microsoft.ML.Tokenizers (194)
Model\SentencePieceUnigramModel.cs (40)
387int[] buffer = ArrayPool<int>.Shared.Rent(textToEncode.Length * 3);
390char[] normalizedString = ArrayPool<char>.Shared.Rent(textToEncode.Length + 2);
401ArrayPool<char>.Shared.Return(normalizedString);
402ArrayPool<int>.Shared.Return(buffer);
424char[] utf16NormalizedString = ArrayPool<char>.Shared.Rent(normalizedString.Length << 1);
426ArrayPool<char>.Shared.Return(normalizedString);
441char[] utf16NormalizedString = ArrayPool<char>.Shared.Rent(normalizedString.Length << 1);
443ArrayPool<char>.Shared.Return(normalizedString);
588ArrayPool<byte>.Shared.Return(normalizedArrayPool);
620BestPathNode[] bestPathEndsAt = ArrayPool<BestPathNode>.Shared.Rent(normalizationSpan.Length + 1);
680ArrayPool<BestPathNode>.Shared.Return(bestPathEndsAt);
683ArrayPool<byte>.Shared.Return(normalizedArrayPool);
862int[] buffer = ArrayPool<int>.Shared.Rent(textToEncode.Length * 3);
865char[]? normalizedString = maxTokenCount == int.MaxValue ? null : ArrayPool<char>.Shared.Rent(textToEncode.Length + 2);
891ArrayPool<char>.Shared.Return(normalizedString);
894ArrayPool<int>.Shared.Return(buffer);
913ArrayPool<byte>.Shared.Return(normalizedArrayPool);
1071BestPathNode[] bestPathEndsAt = ArrayPool<BestPathNode>.Shared.Rent(normalizationSpan.Length + 1);
1094unknownTokensTracking = ArrayPool<(int IdsIndex, int Utf8Index, int Utf8Length)>.Shared.Rent(10);
1107ArrayPool<BestPathNode>.Shared.Return(bestPathEndsAt);
1143ArrayPool<byte>.Shared.Return(normalizedArrayPool);
1217ArrayPool<(int IdsIndex, int Utf8Index, int Utf8Length)>.Shared.Return(unknownTokensTracking);
1222ArrayPool<byte>.Shared.Return(normalizedArrayPool);
1262int[] buffer = ArrayPool<int>.Shared.Rent(textToEncode.Length * 3);
1265char[]? normalizedString = maxTokenCount == int.MaxValue ? null : ArrayPool<char>.Shared.Rent(textToEncode.Length + 2);
1291ArrayPool<char>.Shared.Return(normalizedString);
1294ArrayPool<int>.Shared.Return(buffer);
1412BestPathNode[] bestPathEndsAt = ArrayPool<BestPathNode>.Shared.Rent(normalizationSpan.Length + 1);
1418(int Id, int UtfStartOffset, int Utf8Length)[] ids = ArrayPool<(int Id, int UtfStartOffset, int Utf8Length)>.Shared.Rent(bestPathEndsAt.Length);
1438ArrayPool<BestPathNode>.Shared.Return(bestPathEndsAt);
1451ArrayPool<(int Id, int UtfStartOffset, int Utf8Length)>.Shared.Return(ids);
1455ArrayPool<byte>.Shared.Return(normalizedArrayPool);
1493ArrayPool<(int Id, int UtfStartOffset, int Utf8Length)>.Shared.Return(ids);
1502ArrayPool<byte>.Shared.Return(normalizedArrayPool);
1539int[] buffer = ArrayPool<int>.Shared.Rent(textToEncode.Length * 3);
1542char[]? normalizedString = maxTokenCount == int.MaxValue ? null : ArrayPool<char>.Shared.Rent(textToEncode.Length + 2);
1568ArrayPool<int>.Shared.Return(buffer);
1673BestPathNode[] bestPathEndsAt = ArrayPool<BestPathNode>.Shared.Rent(normalizationSpan.Length + 1);
1726ArrayPool<BestPathNode>.Shared.Return(bestPathEndsAt);
1729ArrayPool<byte>.Shared.Return(normalizedArrayPool);
Microsoft.ML.Tokenizers.Tests (11)
Microsoft.NET.Build.Tasks (4)
Microsoft.Net.Http.Headers (4)
Microsoft.NET.Sdk.WorkloadManifestReader (4)
Microsoft.Private.Windows.Core (16)
Microsoft.Win32.Registry (10)
NuGet.Common (2)
NuGet.Packaging (6)
NuGet.ProjectModel (9)
PresentationCore (3)
PresentationFramework (2)
Roslyn.Diagnostics.Analyzers (6)
Shared (14)
System.Collections.Immutable (22)
System.Console (6)
System.Diagnostics.DiagnosticSource (4)
System.Diagnostics.PerformanceCounter (2)
System.Diagnostics.Process (39)
System.Drawing.Common (2)
System.Formats.Asn1 (2)
System.Formats.Nrbf (2)
System.Formats.Tar (35)
System.IO.Compression (38)
System.IO.Compression.Brotli (2)
System.IO.Compression.ZipFile (2)
System.IO.FileSystem.AccessControl (4)
System.IO.FileSystem.Watcher (4)
System.IO.Packaging (2)
System.IO.Pipelines (5)
System.Linq (4)
System.Memory (6)
System.Net.Http (36)
System.Net.Http.WinHttpHandler (6)
System.Net.Mail (4)
System.Net.NameResolution (21)
System.Net.Primitives (2)
System.Net.Quic (15)
System.Net.Security (39)
System.Net.ServerSentEvents (12)
System.Net.WebSockets (20)
System.Numerics.Tensors (23)
System.Private.CoreLib (161)
System.Private.CoreLib.Generators (3)
System.Private.Uri (7)
System.Private.Windows.Core (10)
System.Private.Xml (4)
System.Reflection.Metadata (6)
System.Runtime.Numerics (34)
System.Security.Cryptography (58)
System.Security.Cryptography.Cose (16)
System.Security.Cryptography.Pkcs (2)
System.ServiceModel.NetFramingBase (12)
System.ServiceProcess.ServiceController (4)
System.Text.Encodings.Web (6)
System.Text.Json (213)
System.Text.Json.SourceGeneration (7)
System.Text.RegularExpressions (13)
System.Text.RegularExpressions.Generator (7)
System.Web.HttpUtility (8)