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

Method clear

libCacheSim/dataStructure/sparsepp/spp.h:1269–1277  ·  view source on GitHub ↗

It's always nice to be able to clear a table without deallocating it

Source from the content-addressed store, hash-verified

1267
1268 // It's always nice to be able to clear a table without deallocating it
1269 void clear(allocator_type &alloc, bool erased)
1270 {
1271 _free_group(alloc, _num_alloc());
1272 _bitmap = 0;
1273 if (erased)
1274 _bm_erased = 0;
1275 _set_num_items(0);
1276 _set_num_alloc(0);
1277 }
1278
1279 // Functions that tell you about size. Alas, these aren't so useful
1280 // because our table is always fixed size.

Callers 6

advance_past_endMethod · 0.45
clearMethod · 0.45
sparse_hash_mapClass · 0.45
clearMethod · 0.45
sparse_hash_setClass · 0.45
clearMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected