MCPcopy Create free account
hub / github.com/catboost/catboost / RehashImpl

Method RehashImpl

library/cpp/containers/flat_hash/lib/table.h:284–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282 }
283
284 void RehashImpl() {
285 if constexpr (NConcepts::RemovalContainerV<Container>) {
286 size_type occupied = bucket_count() - Buckets_.Empty();
287 if (size() < occupied / 2) {
288 rehash(bucket_count()); // Just clearing all deleted elements
289 } else {
290 RehashImpl(SizeFitter_.EvalSize(Expander::EvalNewSize(bucket_count())));
291 }
292 } else {
293 RehashImpl(SizeFitter_.EvalSize(Expander::EvalNewSize(bucket_count())));
294 }
295 }
296
297 void RehashImpl(size_type newSize) {
298 TTable tmp = Buckets_.Clone(newSize);

Callers

nothing calls this directly

Calls 12

move_if_noexceptFunction · 0.85
bucket_countFunction · 0.50
sizeFunction · 0.50
rehashFunction · 0.50
hash_functionFunction · 0.50
ApplyFunction · 0.50
swapFunction · 0.50
EmptyMethod · 0.45
EvalSizeMethod · 0.45
CloneMethod · 0.45
InitNodeMethod · 0.45
FindProperBucketMethod · 0.45

Tested by

no test coverage detected