MurmurHash1.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #include <stddef.h>
  7. //-----------------------------------------------------------------------------
  8. // Platform-specific functions and macros
  9. // Microsoft Visual Studio
  10. #if defined(_MSC_VER) && (_MSC_VER < 1600)
  11. typedef unsigned char uint8_t;
  12. typedef unsigned int uint32_t;
  13. typedef unsigned __int64 uint64_t;
  14. // Other compilers
  15. #else // defined(_MSC_VER)
  16. #include <stdint.h>
  17. #endif // !defined(_MSC_VER)
  18. //-----------------------------------------------------------------------------
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. uint32_t MurmurHash1 ( const void * key, size_t len, uint32_t seed );
  23. uint32_t MurmurHash1Aligned ( const void * key, size_t len, uint32_t seed );
  24. #ifdef __cplusplus
  25. }
  26. #endif
  27. //-----------------------------------------------------------------------------
  28. #endif // _MURMURHASH1_H_