MCPcopy Create free account
hub / github.com/NGT-labs/NGT / initialize

Method initialize

lib/NGT/HashBasedBooleanSet.h:48–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 initialize(bucketSize);
47 }
48 void initialize(const uint32_t tableSize) {
49 _tableSize = tableSize;
50 _mask = _tableSize - 1;
51 const uint32_t checkValue = _hash1(tableSize);
52 if (checkValue != 0) {
53 std::cerr << "[WARN] table size is not 2^N : " << tableSize << std::endl;
54 }
55 _table = new TYPE[tableSize];
56 memset(_table, 0, tableSize * sizeof(TYPE));
57 }
58
59 virtual ~HashBasedBooleanSet() {
60 delete[] _table;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected