|
#define | AC_VERSION_KHASH_H "0.2.6p" |
|
#define | KHASH_FLAG(name, h, i) *(uint32_t *)(h->table + kh_flag_##name(i)) |
|
#define | KHASH_KEY(name, h, i) *kh_key_##name(h, i) |
|
#define | KHASH_VAL(name, h, i) *kh_val_##name(h, i) |
|
#define | __ac_isempty(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&2) |
|
#define | __ac_set_isempty_false(flag, i) (flag[i>>4]&=~(2ul<<((i&0xfU)<<1))) |
|
#define | __kh_isempty(name, h, i) ((KHASH_FLAG(name, h, i)>>((i&0xfU)<<1))&2) |
|
#define | __kh_isdel(name, h, i) ((KHASH_FLAG(name, h, i)>>((i&0xfU)<<1))&1) |
|
#define | __kh_iseither(name, h, i) ((KHASH_FLAG(name, h, i)>>((i&0xfU)<<1))&3) |
|
#define | __kh_set_isdel_false(name, h, i) (KHASH_FLAG(name, h, i)&=~(1ul<<((i&0xfU)<<1))) |
|
#define | __kh_set_isempty_false(name, h, i) (KHASH_FLAG(name, h, i)&=~(2ul<<((i&0xfU)<<1))) |
|
#define | __kh_set_isboth_false(name, h, i) (KHASH_FLAG(name, h, i)&=~(3ul<<((i&0xfU)<<1))) |
|
#define | __kh_set_isdel_true(name, h, i) (KHASH_FLAG(name, h, i)|=1ul<<((i&0xfU)<<1)) |
|
#define | __ac_inc(k) ((k) | 1) |
|
#define | __ac_fsize(m) ((m) < 16? 1 : (m)>>4) |
|
#define | PN_TABLE_HEADER PN_SIZE n_buckets, size, n_occupied, upper_bound |
|
#define | KHASH_INIT(name, kh_t, khkey_t, khval_t, khkey_t2, kh_is_map, __hash_func, __hash_equal, __hash_func2, __hash_equal2) |
|
#define | kh_int_hash_func(key) (uint32_t)(key) |
|
#define | kh_int_hash_equal(a, b) (a == b) |
|
#define | kh_int64_hash_func(key) (uint32_t)((key)>>33^(key)^(key)<<11) |
|
#define | kh_int64_hash_equal(a, b) (a == b) |
|
#define | kh_pnstr_hash_func(key) __luaS_hash_string(PN_STR_PTR(key)) |
|
#define | kh_pnstr_hash_equal(a, b) (strcmp(PN_STR_PTR(a), PN_STR_PTR(b)) == 0) |
|
#define | kh_str_hash_func(key) __luaS_hash_string(key) |
|
#define | kh_str_hash_equal(a, b) (strcmp(PN_STR_PTR(a), b) == 0) |
|
#define | kh_pn_hash_func(key) (uint32_t)PN_UNIQ(key) |
|
#define | kh_pn_hash_equal(a, b) (a == b) |
|
#define | kh_int_hash_func2(k) __ac_Wang_hash((khint_t)key) |
|
#define | kh_clear(name, h) kh_clear_##name(P, h) |
|
#define | kh_resize(name, h, s) h = kh_resize_##name(P, h, s) |
|
#define | kh_put(name, h, k, r) kh_put_##name(P, h, k, r) |
|
#define | kh_get(name, h, k) kh_get_##name(P, h, k) |
|
#define | kh_del(name, h, k) kh_del_##name(P, h, k) |
|
#define | kh_exist(name, h, x) (!__kh_iseither(name, (h), (x))) |
|
#define | kh_key(name, h, x) (KHASH_KEY(name, h, x)) |
|
#define | kh_val(name, h, x) (KHASH_VAL(name, h, x)) |
|
#define | kh_begin(h) (khint_t)(0) |
|
#define | kh_end(h) ((h)->n_buckets) |
|
#define | kh_size(h) ((h)->size) |
|
#define | kh_n_buckets(h) ((h)->n_buckets) |
|
#define | kh_mem(name, h) (((struct PNTable *)h)->n_buckets == 0 ? 0 : kh_size_##name(((struct PNTable *)h)->n_buckets)) |
|
#define | KHASH_MAP_INIT_STR(name, t) |
|
#define | KHASH_MAP_INIT_PN(name, t) |
|
klib hash table library based on double hashing http://en.wikipedia.org/wiki/Double_hashing .
modified to suit potion's gc. https://github.com/attractivechaos/klib
- See also
- core/table.h
Definition in file khash.h.