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

Function spp_mix_64

libCacheSim/dataStructure/sparsepp/spp_utils.h:189–199  ·  view source on GitHub ↗

More thorough scrambling as described in https://gist.github.com/badboy/6267743 ----------------------------------------

Source from the content-addressed store, hash-verified

187// https://gist.github.com/badboy/6267743
188// ----------------------------------------
189inline size_t spp_mix_64(uint64_t a)
190{
191 a = (~a) + (a << 21); // a = (a << 21) - a - 1;
192 a = a ^ (a >> 24);
193 a = (a + (a << 3)) + (a << 8); // a * 265
194 a = a ^ (a >> 14);
195 a = (a + (a << 2)) + (a << 4); // a * 21
196 a = a ^ (a >> 28);
197 a = a + (a << 31);
198 return static_cast<size_t>(a);
199}
200
201template<class ArgumentType, class ResultType>
202struct spp_unary_function

Callers 3

spp_hash<int64_t>Class · 0.85
spp_hash<uint64_t>Class · 0.85
spp_hash<double>Class · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected