MCPcopy Create free account
hub / github.com/bytedance/bolt / clear

Method clear

bolt/exec/HashTable.cpp:860–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

858
859template <bool ignoreNullKeys>
860void HashTable<ignoreNullKeys>::clear() {
861 if (hybridData_) {
862 for (auto* hybridContainer : allHybridContainers()) {
863 hybridContainer->clear();
864 }
865 } else {
866 for (auto* rowContainer : allRows()) {
867 rowContainer->clear();
868 }
869 }
870 if (table_) {
871 // All modes have 8 bytes per slot.
872 memset(table_, 0, capacity_ * sizeof(char*));
873 }
874 numDistinct_ = 0;
875 numTombstones_ = 0;
876 numProbeInputs_ = 0;
877}
878
879template <bool ignoreNullKeys>
880void HashTable<ignoreNullKeys>::checkSize(

Callers 1

populateLookupRowsFunction · 0.45

Calls 1

memsetFunction · 0.85

Tested by

no test coverage detected