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

Method get_pos

libCacheSim/dataStructure/sparsepp/spp.h:2226–2232  ·  view source on GitHub ↗

And the reverse transformation.

Source from the content-addressed store, hash-verified

2224
2225 // And the reverse transformation.
2226 size_type get_pos(const const_ne_iterator& it) const
2227 {
2228 difference_type current_row = it.row_current - _first_group;
2229 difference_type current_col = (it.col_current - _first_group[current_row].ne_begin());
2230 return ((current_row * SPP_GROUP_SIZE) +
2231 _first_group[current_row].offset_to_pos(current_col));
2232 }
2233
2234 // Val can be reference or const_reference
2235 // ---------------------------------------

Callers

nothing calls this directly

Calls 2

offset_to_posMethod · 0.80
ne_beginMethod · 0.45

Tested by

no test coverage detected