Home | History | Annotate | Download | only in wtf

Lines Matching defs:IntHash

37     // Thomas Wang's 32 Bit Mix Function: http://www.cris.com/~Ttwang/tech/inthash.htm
38 inline unsigned intHash(uint8_t key8)
50 // Thomas Wang's 32 Bit Mix Function: http://www.cris.com/~Ttwang/tech/inthash.htm
51 inline unsigned intHash(uint16_t key16)
63 // Thomas Wang's 32 Bit Mix Function: http://www.cris.com/~Ttwang/tech/inthash.htm
64 inline unsigned intHash(uint32_t key)
75 // Thomas Wang's 64 bit Mix Function: http://www.cris.com/~Ttwang/tech/inthash.htm
76 inline unsigned intHash(uint64_t key)
89 template<typename T> struct IntHash {
90 static unsigned hash(T key) { return intHash(static_cast<typename IntTypes<sizeof(T)>::UnsignedType>(key)); }
103 return intHash(u.bits);
118 return IntHash<uintptr_t>::hash(reinterpret_cast<uintptr_t>(key));
142 return intHash((static_cast<uint64_t>(DefaultHash<T>::Hash::hash(p.first)) << 32 | DefaultHash<U>::Hash::hash(p.second)));
152 // make IntHash the default hash function for many integer types
154 template<> struct DefaultHash<short> { typedef IntHash<unsigned> Hash; };
155 template<> struct DefaultHash<unsigned short> { typedef IntHash<unsigned> Hash; };
156 template<> struct DefaultHash<int> { typedef IntHash<unsigned> Hash; };
157 template<> struct DefaultHash<unsigned> { typedef IntHash<unsigned> Hash; };
158 template<> struct DefaultHash<long> { typedef IntHash<unsigned long> Hash; };
159 template<> struct DefaultHash<unsigned long> { typedef IntHash<unsigned long> Hash; };
160 template<> struct DefaultHash<long long> { typedef IntHash<unsigned long long> Hash; };
161 template<> struct DefaultHash<unsigned long long> { typedef IntHash<unsigned long long> Hash; };
164 template<> struct DefaultHash<wchar_t> { typedef IntHash<wchar_t> Hash; };
180 using WTF::IntHash;