summaryrefslogtreecommitdiff
path: root/murmurhash_example.c
diff options
context:
space:
mode:
authorXuqiang Chen <chenxuqiang3@hisilicon.com>2023-08-16 23:52:43 +0800
committerGitHub <noreply@github.com>2023-08-16 17:52:43 +0200
commitffaacccda0f647a99806160fe90db4b012219603 (patch)
treee1da68a882dbecf894ede11e09f5d814825cd3ab /murmurhash_example.c
parent67d25c13e3d82579180d893b1835d43fc222fa45 (diff)
murmurhash: add dynamic library build process (#3)
Signed-off-by: chenxuqiang <cxq507@foxmail.com>
Diffstat (limited to 'murmurhash_example.c')
-rw-r--r--murmurhash_example.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/murmurhash_example.c b/murmurhash_example.c
new file mode 100644
index 0000000..e8a840c
--- /dev/null
+++ b/murmurhash_example.c
@@ -0,0 +1,13 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <murmurhash.h>
+
+int main(void)
+{
+ uint32_t seed = 0;
+ const char *key = "kinkajou"; // // 0xb6d99cf8
+ uint32_t hash = murmurhash(key, (uint32_t)strlen(key), seed);
+ printf("murmurhash(%s) = 0x%x\n", key, hash);
+ return 0;
+} \ No newline at end of file