MurmurHash2.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //-----------------------------------------------------------------------------
  2. // MurmurHash2 was written by Austin Appleby, and is placed in the public
  3. // domain. The author hereby disclaims copyright to this source code.
  4. #ifndef _MURMURHASH2_H_
  5. #define _MURMURHASH2_H_
  6. //-----------------------------------------------------------------------------
  7. // Platform-specific functions and macros
  8. // Microsoft Visual Studio
  9. #if defined(_MSC_VER) && (_MSC_VER < 1600)
  10. typedef unsigned char uint8_t;
  11. typedef unsigned int uint32_t;
  12. typedef unsigned __int64 uint64_t;
  13. // Other compilers
  14. #else // defined(_MSC_VER)
  15. #include <stdint.h>
  16. #endif // !defined(_MSC_VER)
  17. //-----------------------------------------------------------------------------
  18. uint32_t MurmurHash2 ( const void * key, int len, uint32_t seed );
  19. uint64_t MurmurHash64A ( const void * key, int len, uint64_t seed );
  20. uint64_t MurmurHash64B ( const void * key, int len, uint64_t seed );
  21. uint32_t MurmurHash2A ( const void * key, int len, uint32_t seed );
  22. uint32_t MurmurHashNeutral2 ( const void * key, int len, uint32_t seed );
  23. uint32_t MurmurHashAligned2 ( const void * key, int len, uint32_t seed );
  24. //-----------------------------------------------------------------------------
  25. #endif // _MURMURHASH2_H_