MurmurHash3.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //-----------------------------------------------------------------------------
  2. // MurmurHash3 was written by Austin Appleby, and is placed in the public
  3. // domain. The author hereby disclaims copyright to this source code.
  4. #ifndef _MURMURHASH3_H_
  5. #define _MURMURHASH3_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. void MurmurHash3_x86_32 ( const void * key, size_t len, uint32_t seed, void * out );
  23. void MurmurHash3_x86_128 ( const void * key, size_t len, uint32_t seed, void * out );
  24. void MurmurHash3_x64_128 ( const void * key, size_t len, uint32_t seed, void * out );
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. //-----------------------------------------------------------------------------
  29. #endif // _MURMURHASH3_H_