MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / set

Method set

libCacheSim/dataStructure/sparsepp/spp.h:2237–2245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2235 // ---------------------------------------
2236 template <class Val>
2237 reference set(size_type i, Val &val)
2238 {
2239 assert(i < _table_size);
2240 group_type &group = which_group(i);
2241 typename group_type::size_type old_numbuckets = group.num_nonempty();
2242 pointer p(group.set(_alloc, pos_in_group(i), val));
2243 _num_buckets += group.num_nonempty() - old_numbuckets;
2244 return *p;
2245 }
2246
2247 // used in _move_from (where we can move the old value instead of copying it
2248 void move(size_type i, reference val)

Callers

nothing calls this directly

Calls 3

assertFunction · 0.85
num_nonemptyMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected