Lines Matching full:capacity

92  * capacity and bucket_count are different.
97 /** @capacity: The number of neighborhoods in the map. */
98 size_t capacity; member
153 * @capacity: The initial capacity of the map.
157 static int allocate_buckets(struct int_map *map, size_t capacity) in allocate_buckets() argument
160 map->capacity = capacity; in allocate_buckets()
166 map->bucket_count = capacity + (NEIGHBORHOOD - 1); in allocate_buckets()
183 size_t capacity; in vdo_int_map_create() local
189 /* Use the default capacity if the caller did not specify one. */ in vdo_int_map_create()
190 capacity = (initial_capacity > 0) ? initial_capacity : DEFAULT_CAPACITY; in vdo_int_map_create()
193 * Scale up the capacity by the specified initial load factor. (i.e to hold 1000 entries at in vdo_int_map_create()
194 * 80% load we need a capacity of 1250) in vdo_int_map_create()
196 capacity = capacity * 100 / DEFAULT_LOAD; in vdo_int_map_create()
198 result = allocate_buckets(map, capacity); in vdo_int_map_create()
303 * multiplying that by the capacity. If the hash is uniformly distributed over [0 .. in select_bucket()
304 * 2^32-1], then (hash * capacity / 2^32) should be uniformly distributed over [0 .. in select_bucket()
305 * capacity-1]. The multiply and shift is much faster than a divide (modulus) on X86 CPUs. in select_bucket()
307 return &map->buckets[(hash * map->capacity) >> 32]; in select_bucket()
379 size_t new_capacity = map->capacity / 2 * 3; in resize_buckets()
382 __func__, map->capacity, new_capacity, map->size); in resize_buckets()
635 * we're forced to allocate a new bucket array with a larger capacity, re-hash all in vdo_int_map_put()