Home
last modified time | relevance | path

Searched refs:hash_map (Results 1 – 5 of 5) sorted by relevance

/system/bt/osi/src/
Dhash_map.c64 hash_map_t *hash_map = zeroed_allocator->alloc(sizeof(hash_map_t)); in hash_map_new_internal() local
65 if (hash_map == NULL) in hash_map_new_internal()
68 hash_map->hash_fn = hash_fn; in hash_map_new_internal()
69 hash_map->key_fn = key_fn; in hash_map_new_internal()
70 hash_map->data_fn = data_fn; in hash_map_new_internal()
71 hash_map->allocator = zeroed_allocator; in hash_map_new_internal()
72 hash_map->keys_are_equal = equality_fn ? equality_fn : default_key_equality; in hash_map_new_internal()
74 hash_map->num_bucket = num_bucket; in hash_map_new_internal()
75 hash_map->bucket = zeroed_allocator->alloc(sizeof(hash_map_bucket_t) * num_bucket); in hash_map_new_internal()
76 if (hash_map->bucket == NULL) { in hash_map_new_internal()
[all …]
/system/bt/osi/test/
Dhash_map_test.cpp46 hash_map_t *hash_map = hash_map_new(5, hash_map_fn00, NULL, NULL, NULL); in TEST_F() local
47 ASSERT_TRUE(hash_map != NULL); in TEST_F()
48 hash_map_free(hash_map); in TEST_F()
52 hash_map_t *hash_map = hash_map_new(5, hash_map_fn00, NULL, NULL, NULL); in TEST_F() local
53 ASSERT_TRUE(hash_map != NULL); in TEST_F()
68 EXPECT_EQ(i, hash_map_size(hash_map)); in TEST_F()
69 hash_map_set(hash_map, data[i].key, (void*)data[i].data); in TEST_F()
70 EXPECT_EQ(i + 1, hash_map_size(hash_map)); in TEST_F()
73 EXPECT_EQ(data_sz, hash_map_size(hash_map)); in TEST_F()
76 char *val = (char *)hash_map_get(hash_map, data[i].key); in TEST_F()
[all …]
/system/bt/osi/include/
Dhash_map.h31 const hash_map_t *hash_map; member
63 void hash_map_free(hash_map_t *hash_map);
68 bool hash_map_is_empty(const hash_map_t *hash_map);
72 size_t hash_map_size(const hash_map_t *hash_map);
76 size_t hash_map_num_buckets(const hash_map_t *hash_map);
80 bool hash_map_has_key(const hash_map_t *hash_map, const void *key);
84 void *hash_map_get(const hash_map_t *hash_map, const void *key);
91 bool hash_map_set(hash_map_t *hash_map, const void *key, void *data);
97 bool hash_map_erase(hash_map_t *hash_map, const void *key);
101 void hash_map_clear(hash_map_t *hash_map);
[all …]
/system/bt/osi/
DBUILD.gn31 "src/hash_map.c",
DAndroid.mk39 ./src/hash_map.c \