39 #include "NptResults.h" 44 const NPT_UInt32 NPT_FNV1A_32_INIT = ((NPT_UInt32)0x811c9dc5);
45 NPT_UInt32 NPT_Fnv1aHash32(
const NPT_UInt8* data, NPT_Size data_size, NPT_UInt32 hash_init=NPT_FNV1A_32_INIT);
46 NPT_UInt32 NPT_Fnv1aHashStr32(
const char* data, NPT_UInt32 hash_init=NPT_FNV1A_32_INIT);
47 const NPT_UInt64 NPT_FNV1A_64_INIT = ((NPT_UInt64)0xcbf29ce484222325ULL);
48 NPT_UInt64 NPT_Fnv1aHash64(
const NPT_UInt8* data, NPT_Size data_size, NPT_UInt64 hash_init=NPT_FNV1A_64_INIT);
49 NPT_UInt64 NPT_Fnv1aHashStr64(
const char* data, NPT_UInt64 hash_init=NPT_FNV1A_64_INIT);
62 NPT_UInt32 operator()(
const char* s)
const {
return NPT_Fnv1aHashStr32(s); }
68 NPT_UInt32 operator()(
char* s)
const {
return NPT_Fnv1aHashStr32(s); }
74 NPT_UInt32 operator()(
int i)
const {
return NPT_Fnv1aHash32(reinterpret_cast<const NPT_UInt8*>(&i),
sizeof(
int)); }
80 NPT_UInt32 operator()(
unsigned int i)
const {
return NPT_Fnv1aHash32(reinterpret_cast<const NPT_UInt8*>(&i),
sizeof(
int)); }
83 #endif // _NPT_HASH_H_