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

Method _pos_to_offset

libCacheSim/dataStructure/sparsepp/spp.h:1170–1175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1168 sparsegroup &operator=(const sparsegroup& x);
1169
1170 static size_type _pos_to_offset(group_bm_type bm, size_type pos)
1171 {
1172 //return (size_type)((uint32_t)~((int32_t(-1) + pos) >> 31) & spp_popcount(bm << (SPP_GROUP_SIZE - pos)));
1173 //return (size_type)(pos ? spp_popcount(bm << (SPP_GROUP_SIZE - pos)) : 0);
1174 return static_cast<size_type>(spp_popcount(bm & ((static_cast<group_bm_type>(1) << pos) - 1)));
1175 }
1176
1177public:
1178

Callers

nothing calls this directly

Calls 1

spp_popcountFunction · 0.85

Tested by

no test coverage detected