hash function
This commit is contained in:
6
src/hashmap.c
Normal file
6
src/hashmap.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include <math.h>
|
||||
const unsigned acl_w = sizeof (unsigned) * 8;
|
||||
const unsigned acl_m = 9;
|
||||
unsigned hash(unsigned K) {
|
||||
return (149695736*K) >> (acl_w-acl_m);
|
||||
}
|
||||
Reference in New Issue
Block a user