murmurhash.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * `murmurhash.h' - murmurhash
  3. *
  4. * copyright (c) 2014 joseph werle <[email protected]>
  5. * Copyright (c) 2015-2016 The Khronos Group Inc.
  6. * Copyright (c) 2015-2016 Valve Corporation
  7. * Copyright (c) 2015-2016 LunarG, Inc.
  8. *
  9. * Permission is hereby granted, free of charge, to any person obtaining a copy
  10. * of this software and/or associated documentation files (the "Materials"), to
  11. * deal in the Materials without restriction, including without limitation the
  12. * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  13. * sell copies of the Materials, and to permit persons to whom the Materials are
  14. * furnished to do so, subject to the following conditions:
  15. *
  16. * The above copyright notice(s) and this permission notice shall be included in
  17. * all copies or substantial portions of the Materials.
  18. *
  19. * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  22. *
  23. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  24. * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  25. * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE
  26. * USE OR OTHER DEALINGS IN THE MATERIALS.
  27. */
  28. #ifndef MURMURHASH_H
  29. #define MURMURHASH_H 1
  30. #include <stdint.h>
  31. #define MURMURHASH_VERSION "0.0.3"
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. /**
  36. * Returns a murmur hash of `key' based on `seed'
  37. * using the MurmurHash3 algorithm
  38. */
  39. uint32_t murmurhash(const char *key, size_t len, uint32_t seed);
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif