Home
last modified time | relevance | path

Searched refs:n_buckets (Results 1 – 6 of 6) sorted by relevance

/third_party/iowow/src/utils/
Dkhash.h198 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 */ \
[all …]
/third_party/ejdb/src/util/
Dkhash.h188 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 */ \
[all …]
/third_party/glib/gio/gvdb/
Dgvdb-reader.c39 guint32 n_buckets; member
87 guint32 n_buckets; in gvdb_table_setup_root() local
98 n_buckets = guint32_from_le (header->n_buckets); in gvdb_table_setup_root()
108 if G_UNLIKELY (n_buckets > G_MAXUINT / sizeof (guint32_le) || in gvdb_table_setup_root()
109 n_buckets * sizeof (guint32_le) > size) in gvdb_table_setup_root()
113 size -= n_buckets * sizeof (guint32_le); in gvdb_table_setup_root()
114 file->n_buckets = n_buckets; in gvdb_table_setup_root()
119 file->hash_items = (gpointer) (file->hash_buckets + n_buckets); in gvdb_table_setup_root()
283 if G_UNLIKELY (file->n_buckets == 0 || file->n_hash_items == 0) in gvdb_table_lookup()
292 bucket = hash_value % file->n_buckets; in gvdb_table_lookup()
[all …]
Dgvdb-builder.c165 gint n_buckets; member
169 hash_table_new (gint n_buckets) in hash_table_new() argument
174 table->buckets = g_new0 (GvdbItem *, n_buckets); in hash_table_new()
175 table->n_buckets = n_buckets; in hash_table_new()
198 bucket = hash_value % table->n_buckets; in hash_table_insert()
306 gsize n_buckets, in file_builder_allocate_for_hash() argument
322 table_hdr = guint32_to_le (n_buckets); in file_builder_allocate_for_hash()
326 n_buckets * sizeof (guint32_le) + in file_builder_allocate_for_hash()
335 *hash_buckets = (guint32_le *) chunk (n_buckets * sizeof (guint32_le)); in file_builder_allocate_for_hash()
342 memset (*hash_buckets, 0, n_buckets * sizeof (guint32_le)); in file_builder_allocate_for_hash()
[all …]
Dgvdb-format.h35 guint32_le n_buckets; member
/third_party/eudev/src/shared/
Dhashmap.c178 unsigned n_buckets; /* number of buckets */ member
344 static unsigned n_buckets(HashmapBase *h) { in n_buckets() function
345 return h->has_indirect ? h->indirect.n_buckets in n_buckets()
379 return (unsigned) (h->hash_ops->hash(p, hash_key(h)) % n_buckets(h)); in base_bucket_hash()
438 (storage_ptr(h) + hashmap_type_info[h->type].entry_size * n_buckets(h)); in dib_raw_ptr()
443 : n_buckets(h) + idx - from; in bucket_distance()
478 for ( ; idx < n_buckets(h); idx++) in skip_free_buckets()
527 return (idx + 1U) % n_buckets(h); in next_idx()
531 return (n_buckets(h) + idx - 1U) % n_buckets(h); in prev_idx()
1026 assert(idx < n_buckets(h)); in hashmap_base_put_boldly()
[all …]