Lines Matching refs:n_buckets
198 khint_t n_buckets, size, n_occupied, upper_bound; \
228 memset(h->flags, 0xaa, __ac_fsize(h->n_buckets) * sizeof(khint32_t)); \
234 if (h->n_buckets) { \
236 mask = h->n_buckets - 1; \
241 if (i == last) return h->n_buckets; \
243 return __ac_iseither(h->flags, i)? h->n_buckets : i; \
258 if (h->n_buckets < new_n_buckets) { /* expand */ \
271 for (j = 0; j != h->n_buckets; ++j) { \
285 … if (i < h->n_buckets && __ac_iseither(h->flags, i) == 0) { /* kick out the existing element */ \
297 if (h->n_buckets > new_n_buckets) { /* shrink the hash table */ \
303 h->n_buckets = new_n_buckets; \
305 h->upper_bound = (khint_t)(h->n_buckets * __ac_HASH_UPPER + 0.5); \
313 if (h->n_buckets > (h->size<<1)) { \
314 if (kh_resize_##name(h, h->n_buckets - 1) < 0) { /* clear "deleted" elements */ \
315 *ret = -1; return h->n_buckets; \
317 } else if (kh_resize_##name(h, h->n_buckets + 1) < 0) { /* expand the hash table */ \
318 *ret = -1; return h->n_buckets; \
322 khint_t k, i, site, last, mask = h->n_buckets - 1, step = 0; \
323 x = site = h->n_buckets; k = __hash_func(key); i = k & mask; \
332 if (x == h->n_buckets) { \
333 if (__ac_isempty(h->flags, i) && site != h->n_buckets) x = site; \
353 if (x != h->n_buckets && !__ac_iseither(h->flags, x)) { \
537 #define kh_end(h) ((h)->n_buckets)
551 #define kh_n_buckets(h) ((h)->n_buckets)