Lines Matching refs:n_buckets
188 khint_t n_buckets, size, n_occupied, upper_bound; \
218 memset(h->flags, 0xaa, __ac_fsize(h->n_buckets) * sizeof(khint32_t)); \
224 if (h->n_buckets) { \
226 mask = h->n_buckets - 1; \
231 if (i == last) return h->n_buckets; \
233 return __ac_iseither(h->flags, i)? h->n_buckets : i; \
248 if (h->n_buckets < new_n_buckets) { /* expand */ \
261 for (j = 0; j != h->n_buckets; ++j) { \
275 … if (i < h->n_buckets && __ac_iseither(h->flags, i) == 0) { /* kick out the existing element */ \
287 if (h->n_buckets > new_n_buckets) { /* shrink the hash table */ \
293 h->n_buckets = new_n_buckets; \
295 h->upper_bound = (khint_t)(h->n_buckets * __ac_HASH_UPPER + 0.5); \
303 if (h->n_buckets > (h->size<<1)) { \
304 if (kh_resize_##name(h, h->n_buckets - 1) < 0) { /* clear "deleted" elements */ \
305 *ret = -1; return h->n_buckets; \
307 } else if (kh_resize_##name(h, h->n_buckets + 1) < 0) { /* expand the hash table */ \
308 *ret = -1; return h->n_buckets; \
312 khint_t k, i, site, last, mask = h->n_buckets - 1, step = 0; \
313 x = site = h->n_buckets; k = __hash_func(key); i = k & mask; \
322 if (x == h->n_buckets) { \
323 if (__ac_isempty(h->flags, i) && site != h->n_buckets) x = site; \
343 if (x != h->n_buckets && !__ac_iseither(h->flags, x)) { \
527 #define kh_end(h) ((h)->n_buckets)
541 #define kh_n_buckets(h) ((h)->n_buckets)