MCPcopy Create free account
hub / github.com/FastLED/FastLED / fast_hash32

Function fast_hash32

src/fl/stl/hash.h:81–88  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Fast, cheap 32-bit integer hash (Thomas Wang) -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

79// Fast, cheap 32-bit integer hash (Thomas Wang)
80//-----------------------------------------------------------------------------
81static inline u32 fast_hash32(u32 x) FL_NOEXCEPT {
82 x = (x ^ 61u) ^ (x >> 16);
83 x = x + (x << 3);
84 x = x ^ (x >> 4);
85 x = x * 0x27d4eb2dU;
86 x = x ^ (x >> 15);
87 return x;
88}
89
90// 3) Handy two-word hasher
91static inline u32 hash_pair(u32 a, u32 b,

Callers 13

hash_pairFunction · 0.85
operator()Function · 0.85
operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected