MurmurHash1.h 1003 B

1234567891011121314151617181920212223242526272829303132333435
  1. //-----------------------------------------------------------------------------
  2. // MurmurHash1 was written by Austin Appleby, and is placed in the public
  3. // domain. The author hereby disclaims copyright to this source code.
  4. #ifndef _MURMURHASH1_H_
  5. #define _MURMURHASH1_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 MurmurHash1 ( const void * key, int len, uint32_t seed );
  19. uint32_t MurmurHash1Aligned ( const void * key, int len, uint32_t seed );
  20. //-----------------------------------------------------------------------------
  21. #endif // _MURMURHASH1_H_