MCPcopy Create free account
hub / github.com/ParAlg/gbbs / insertAdd

Method insertAdd

gbbs/sequential_ht.h:89–102  ·  view source on GitHub ↗

V must support ++

Source from the content-addressed store, hash-verified

87
88 // V must support ++
89 inline bool insertAdd(K& vKey) {
90 size_t h = firstIndex(vKey);
91 while (1) {
92 auto k = std::get<0>(table[h]);
93 if (k == max_key) {
94 table[h] = std::make_tuple(vKey, 1);
95 return true;
96 } else if (k == vKey) {
97 std::get<1>(table[h])++;
98 return false;
99 }
100 h = incrementIndex(h);
101 }
102 }
103
104 // V must support ++, T<1> must be numeric
105 inline bool insertAdd(T& v) {

Callers 2

histogram_mediumFunction · 0.80
histogramFunction · 0.80

Calls 1

incrementIndexFunction · 0.85

Tested by

no test coverage detected