MCPcopy Create free account
hub / github.com/FastLED/FastLED / NeedsRehash

Function NeedsRehash

src/fl/stl/unordered_map.h:308–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306 }
307
308 static bool NeedsRehash(fl::size size, fl::size bucket_size, fl::size tombstones,
309 u8 load_factor) {
310 // (size + tombstones) << 8 : multiply numerator by 256
311 // capacity * max_load : denominator * threshold
312 u32 lhs = (size + tombstones) << 8;
313 u32 rhs = (bucket_size * load_factor);
314 return lhs > rhs;
315 }
316
317 // returns true if (size + tombs)/capacity > _max_load/256
318 bool needs_rehash() const {

Callers 1

needs_rehashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected