Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #if defined(_MSC_VER)
00019 #define MH_UINT32 unsigned long
00020 #endif
00021
00022
00023 #if !defined(MH_UINT32) && ( \
00024 defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L )
00025 #include <stdint.h>
00026 #define MH_UINT32 uint32_t
00027 #endif
00028
00029
00030 #if !defined(MH_UINT32)
00031 #include <limits.h>
00032 #if (USHRT_MAX == 0xffffffffUL)
00033 #define MH_UINT32 unsigned short
00034 #elif (UINT_MAX == 0xffffffffUL)
00035 #define MH_UINT32 unsigned int
00036 #elif (ULONG_MAX == 0xffffffffUL)
00037 #define MH_UINT32 unsigned long
00038 #endif
00039 #endif
00040
00041 #if !defined(MH_UINT32)
00042 #error Unable to determine type name for unsigned 32-bit int
00043 #endif
00044
00045
00046 #define MH_UINT8 unsigned char
00047
00048
00049
00050
00051
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055
00056 void PMurHash32_Process(MH_UINT32 *ph1, MH_UINT32 *pcarry, const void *key, int len);
00057 MH_UINT32 PMurHash32_Result(MH_UINT32 h1, MH_UINT32 carry, MH_UINT32 total_length);
00058 MH_UINT32 PMurHash32(MH_UINT32 seed, const void *key, int len);
00059
00060 void PMurHash32_test(const void *key, int len, MH_UINT32 seed, void *out);
00061
00062 #ifdef __cplusplus
00063 }
00064 #endif