PMurHash.h 891 B

12345678910111213141516171819202122232425262728293031
  1. /*-----------------------------------------------------------------------------
  2. * MurmurHash3 was written by Austin Appleby, and is placed in the public
  3. * domain.
  4. *
  5. * This implementation was written by Shane Day, and is also public domain.
  6. *
  7. * This implementation was modified to match PMurHash128.cpp.
  8. */
  9. /* ------------------------------------------------------------------------- */
  10. // Microsoft Visual Studio
  11. #if defined(_MSC_VER) && (_MSC_VER < 1600)
  12. typedef unsigned char uint8_t;
  13. typedef unsigned int uint32_t;
  14. // Other compilers
  15. #else // defined(_MSC_VER)
  16. #include <stdint.h>
  17. #endif // !defined(_MSC_VER)
  18. /* ------------------------------------------------------------------------- */
  19. /* Prototypes */
  20. void PMurHash32_Process(uint32_t *ph1, uint32_t *pcarry, const void *key, int len);
  21. uint32_t PMurHash32_Result(uint32_t h1, uint32_t carry, uint32_t total_length);