62 return (key >> 3) * 2654435761U;
66template<
class T,
class Enable =
void>
72struct fnv<T, typename std::enable_if<sizeof(T) == 4>::type>
74 static_assert(std::is_integral<T>::value && std::is_unsigned<T>::value,
75 "Fowler-Noll-Vo hash requires an unsigned integral type");
76 static constexpr T init = 2166136261UL;
77 static constexpr T prime = 16777619UL;
82struct fnv<T, typename std::enable_if<sizeof(T) == 8>::type>
84 static_assert(std::is_integral<T>::value && std::is_unsigned<T>::value,
85 "Fowler-Noll-Vo hash requires an unsigned integral type");
86 static constexpr T init = 14695981039346656037ULL;
87 static constexpr T prime = 1099511628211ULL;
99 for (; begin != end; ++begin) {
size_t wang32_hash(size_t key)
Thomas Wang's 32 bit hash function.
Definition hashfunc.hpp:39
size_t fnv_hash(It begin, It end)
Fowler-Noll-Vo hash function.
Definition hashfunc.hpp:96
size_t knuth32_hash(size_t key)
Knuth's Multiplicative hash function.
Definition hashfunc.hpp:58
Struct for Fowler-Noll-Vo parameters.
Definition hashfunc.hpp:68