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