3 instantiations of StringSpanOrdinalKeyPair
Microsoft.ML.Tokenizers (3)
Model\CodeGenTokenizer.cs (1)
1808mergeRanks.Add(new StringSpanOrdinalKeyPair(line.Substring(0, index), line.Substring(index + 1)), rank++);
Utils\StringSpanOrdinalKey.cs (2)
193return map.TryGetValue(new StringSpanOrdinalKeyPair(ptr1, key1.Length, ptr2, key2.Length), out value!); 198map.TryGetValue(new StringSpanOrdinalKeyPair(key1, key2), out value!);
8 references to StringSpanOrdinalKeyPair
Microsoft.ML.Tokenizers (8)
Model\CodeGenTokenizer.cs (3)
30private readonly Dictionary<StringSpanOrdinalKeyPair, int> _mergeRanks; 1785internal static Dictionary<StringSpanOrdinalKeyPair, int> GetMergeRanks(Stream mergeStream) 1787var mergeRanks = new Dictionary<StringSpanOrdinalKeyPair, int>();
Utils\StringSpanOrdinalKey.cs (5)
49internal readonly unsafe struct StringSpanOrdinalKeyPair : IEquatable<StringSpanOrdinalKeyPair> 66obj is StringSpanOrdinalKeyPair wrapper && wrapper._left.Equals(_left) && wrapper._right.Equals(_right); 68public bool Equals(StringSpanOrdinalKeyPair other) => other._left.Equals(_left) && other._right.Equals(_right); 188public static unsafe bool TryGetValue<TValue>(this Dictionary<StringSpanOrdinalKeyPair, TValue> map, ReadOnlySpan<char> key1, ReadOnlySpan<char> key2, out TValue value) 197public static bool TryGetValue<TValue>(this Dictionary<StringSpanOrdinalKeyPair, TValue> map, string key1, string key2, out TValue value) =>