2020-12-15 10:11:17 +03:00
|
|
|
module hash
|
|
|
|
|
2021-04-19 19:01:47 +03:00
|
|
|
//#flag -I @VEXEROOT/thirdparty/wyhash
|
2020-12-15 10:11:17 +03:00
|
|
|
//#include "wyhash.h"
|
2021-03-24 19:06:35 +03:00
|
|
|
fn C.wyhash(byteptr, u64, u64, &u64) u64
|
2020-12-27 16:18:46 +03:00
|
|
|
fn C.wyhash64(u64, u64) u64
|
2020-12-15 10:11:17 +03:00
|
|
|
|
|
|
|
[inline]
|
|
|
|
pub fn wyhash_c(key byteptr, len u64, seed u64) u64 {
|
2021-04-05 10:02:47 +03:00
|
|
|
return C.wyhash(key, len, seed, &u64(C._wyp))
|
2020-12-15 10:11:17 +03:00
|
|
|
}
|
|
|
|
|
2020-12-27 16:18:46 +03:00
|
|
|
[inline]
|
|
|
|
pub fn wyhash64_c(a u64, b u64) u64 {
|
|
|
|
return C.wyhash64(a, b)
|
|
|
|
}
|