move bqn_hash back to header

This commit is contained in:
dzaima 2022-05-01 04:36:59 +03:00
parent 3f787e3845
commit f12e5fd1c0
2 changed files with 5 additions and 6 deletions

View File

@ -35,11 +35,6 @@ NOINLINE u64 bqn_hashArr(B x, const u64 secret[4]) { // TODO manual separation o
return r;
}
NOINLINE u64 bqn_hash(B x, const u64 secret[4]) {
if (isArr(x)) return bqn_hashArr(x, secret);
return wyhash64(secret[0], x.u);
}
u64 wy_secret[4];

View File

@ -11,7 +11,11 @@ static void bcl(B x, usz ia) { // clean up bitarr tail bits to zero
}
}
u64 bqn_hash(B x, const u64 secret[4]); // doesn't consume
u64 bqn_hashArr(B x, const u64 secret[4]);
static u64 bqn_hash(B x, const u64 secret[4]) { // doesn't consume
if (isArr(x)) return bqn_hashArr(x, secret);
return wyhash64(secret[0], x.u);
}
static u64 bqn_hashP(B x, const u64 secret[4]) { // bqn_hash but never zero
u64 r = bqn_hash(x, secret);