Lines Matching refs:n_buckets
277 if (map->data->n_buckets == 0) { in sys_hashmap_load_factor()
281 return (map->data->size * 100) / map->data->n_buckets; in sys_hashmap_load_factor()
292 return map->data->n_buckets; in sys_hashmap_num_buckets()
321 size_t n_buckets; in sys_hashmap_should_rehash() local
336 n_buckets = data->n_buckets; in sys_hashmap_should_rehash()
338 n_buckets += grow * (size == 1) * config->initial_n_buckets; in sys_hashmap_should_rehash()
340 n_buckets <<= grow * (size != 1); in sys_hashmap_should_rehash()
342 n_buckets >>= shrink; in sys_hashmap_should_rehash()
345 n_buckets *= (size != 0); in sys_hashmap_should_rehash()
348 __ASSERT_NO_MSG(new_num_buckets != &data->n_buckets); in sys_hashmap_should_rehash()
349 *new_num_buckets = n_buckets; in sys_hashmap_should_rehash()
352 grow && (data->n_buckets == 0 || in sys_hashmap_should_rehash()
353 (size + num_reserved) * 100 / data->n_buckets > map->config->load_factor); in sys_hashmap_should_rehash()
355 shrink && (n_buckets == 0 || (size * 100) / n_buckets <= map->config->load_factor); in sys_hashmap_should_rehash()