-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
hashing.h
28 lines (23 loc) · 729 Bytes
/
hashing.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// This file is a part of Julia. License is MIT: https://julialang.org/license
#ifndef HASHING_H
#define HASHING_H
#ifdef __cplusplus
extern "C" {
#endif
uint_t nextipow2(uint_t i);
JL_DLLEXPORT u_int32_t int32hash(u_int32_t a);
JL_DLLEXPORT u_int64_t int64hash(u_int64_t key);
JL_DLLEXPORT u_int32_t int64to32hash(u_int64_t key);
#ifdef _P64
#define inthash int64hash
#else
#define inthash int32hash
#endif
JL_DLLEXPORT u_int64_t memhash(const char *buf, size_t n);
JL_DLLEXPORT u_int64_t memhash_seed(const char *buf, size_t n, u_int32_t seed);
JL_DLLEXPORT u_int32_t memhash32(const char *buf, size_t n);
JL_DLLEXPORT u_int32_t memhash32_seed(const char *buf, size_t n, u_int32_t seed);
#ifdef __cplusplus
}
#endif
#endif