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