38 references to HashHelpers
System.Private.CoreLib (38)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (13)
190
HashHelpers
.SerializationInfoTable.Add(this, info);
490
int size =
HashHelpers
.GetPrime(capacity);
497
_fastModMultiplier =
HashHelpers
.GetFastModMultiplier((uint)size);
628
if (!typeof(TKey).IsValueType && collisionCount >
HashHelpers
.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer)
1038
if (!typeof(TKey).IsValueType && collisionCount >
HashHelpers
.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer)
1175
if (!typeof(TKey).IsValueType && collisionCount >
HashHelpers
.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer)
1201
HashHelpers
.SerializationInfoTable.TryGetValue(this, out SerializationInfo? siInfo);
1242
HashHelpers
.SerializationInfoTable.Remove(this);
1245
private void Resize() => Resize(
HashHelpers
.ExpandPrime(_count), false);
1276
_fastModMultiplier =
HashHelpers
.GetFastModMultiplier((uint)newSize);
1556
int newSize =
HashHelpers
.GetPrime(capacity);
1590
int newSize =
HashHelpers
.GetPrime(capacity);
1746
return ref buckets[
HashHelpers
.FastMod(hashCode, (uint)buckets.Length, _fastModMultiplier)];
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (14)
142
HashHelpers
.SerializationInfoTable.Add(this, info);
159
int threshold =
HashHelpers
.ExpandPrime(source.Count + 1);
286
return ref buckets[
HashHelpers
.FastMod((uint)hashCode, (uint)buckets.Length, _fastModMultiplier)];
528
if (!typeof(T).IsValueType && collisionCount >
HashHelpers
.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer)
722
HashHelpers
.SerializationInfoTable.TryGetValue(this, out SerializationInfo? siInfo);
741
_fastModMultiplier =
HashHelpers
.GetFastModMultiplier((uint)capacity);
762
HashHelpers
.SerializationInfoTable.Remove(this);
1279
int newSize =
HashHelpers
.GetPrime(capacity);
1284
private void Resize() => Resize(
HashHelpers
.ExpandPrime(_count), forceNewHashCodes: false);
1316
_fastModMultiplier =
HashHelpers
.GetFastModMultiplier((uint)newSize);
1348
int newSize =
HashHelpers
.GetPrime(capacity);
1392
int size =
HashHelpers
.GetPrime(capacity);
1401
_fastModMultiplier =
HashHelpers
.GetFastModMultiplier((uint)size);
1511
if (!typeof(T).IsValueType && collisionCount >
HashHelpers
.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer)
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (7)
275
int hashsize = (rawsize > InitialSize) ?
HashHelpers
.GetPrime((int)rawsize) : InitialSize;
374
HashHelpers
.SerializationInfoTable.Add(this, info);
408
incr = (uint)(1 + ((seed *
HashHelpers
.HashPrime) % ((uint)hashsize - 1)));
694
int rawsize =
HashHelpers
.ExpandPrime(_buckets.Length);
943
uint incr = unchecked((uint)(1 + ((seed *
HashHelpers
.HashPrime) % ((uint)newBuckets.Length - 1))));
1093
HashHelpers
.SerializationInfoTable.TryGetValue(this, out SerializationInfo? siInfo);
1175
HashHelpers
.SerializationInfoTable.Remove(this);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMapState.cs (3)
133
int modulus =
HashHelpers
.GetPrime(values.Length);
150
modulus =
HashHelpers
.GetPrime(values.Length);
162
modulus =
HashHelpers
.GetPrime(modulus + 1);
src\System\RuntimeType.CoreCLR.cs (1)
4373
size =
HashHelpers
.GetPrime(size);