Home
last modified time | relevance | path

Searched refs:ht (Results 1 – 25 of 647) sorted by relevance

12345678910>>...26

/third_party/mesa3d/src/util/
Dhash_table.c125 key_pointer_is_reserved(const struct hash_table *ht, const void *key) in key_pointer_is_reserved() argument
127 return key == NULL || key == ht->deleted_key; in key_pointer_is_reserved()
137 entry_is_deleted(const struct hash_table *ht, struct hash_entry *entry) in entry_is_deleted() argument
139 return entry->key == ht->deleted_key; in entry_is_deleted()
143 entry_is_present(const struct hash_table *ht, struct hash_entry *entry) in entry_is_present() argument
145 return entry->key != NULL && entry->key != ht->deleted_key; in entry_is_present()
149 _mesa_hash_table_init(struct hash_table *ht, in _mesa_hash_table_init() argument
155 ht->size_index = 0; in _mesa_hash_table_init()
156 ht->size = hash_sizes[ht->size_index].size; in _mesa_hash_table_init()
157 ht->rehash = hash_sizes[ht->size_index].rehash; in _mesa_hash_table_init()
[all …]
Dset.c120 _mesa_set_init(struct set *ht, void *mem_ctx, in _mesa_set_init() argument
125 ht->size_index = 0; in _mesa_set_init()
126 ht->size = hash_sizes[ht->size_index].size; in _mesa_set_init()
127 ht->rehash = hash_sizes[ht->size_index].rehash; in _mesa_set_init()
128 ht->size_magic = hash_sizes[ht->size_index].size_magic; in _mesa_set_init()
129 ht->rehash_magic = hash_sizes[ht->size_index].rehash_magic; in _mesa_set_init()
130 ht->max_entries = hash_sizes[ht->size_index].max_entries; in _mesa_set_init()
131 ht->key_hash_function = key_hash_function; in _mesa_set_init()
132 ht->key_equals_function = key_equals_function; in _mesa_set_init()
133 ht->table = rzalloc_array(mem_ctx, struct set_entry, ht->size); in _mesa_set_init()
[all …]
Dhash_table.h69 _mesa_hash_table_init(struct hash_table *ht,
80 void _mesa_hash_table_destroy(struct hash_table *ht,
82 void _mesa_hash_table_clear(struct hash_table *ht,
84 void _mesa_hash_table_set_deleted_key(struct hash_table *ht,
87 static inline uint32_t _mesa_hash_table_num_entries(struct hash_table *ht) in _mesa_hash_table_num_entries() argument
89 return ht->entries; in _mesa_hash_table_num_entries()
93 _mesa_hash_table_insert(struct hash_table *ht, const void *key, void *data);
95 _mesa_hash_table_insert_pre_hashed(struct hash_table *ht, uint32_t hash,
98 _mesa_hash_table_search(struct hash_table *ht, const void *key);
100 _mesa_hash_table_search_pre_hashed(struct hash_table *ht, uint32_t hash,
[all …]
/third_party/mesa3d/src/gallium/auxiliary/util/
Du_handle_table.c64 struct handle_table *ht; in handle_table_create() local
66 ht = MALLOC_STRUCT(handle_table); in handle_table_create()
67 if (!ht) in handle_table_create()
70 ht->objects = (void **)CALLOC(HANDLE_TABLE_INITIAL_SIZE, sizeof(void *)); in handle_table_create()
71 if(!ht->objects) { in handle_table_create()
72 FREE(ht); in handle_table_create()
76 ht->size = HANDLE_TABLE_INITIAL_SIZE; in handle_table_create()
77 ht->filled = 0; in handle_table_create()
79 ht->destroy = NULL; in handle_table_create()
81 return ht; in handle_table_create()
[all …]
Du_handle_table.h63 handle_table_set_destroy(struct handle_table *ht,
73 handle_table_add(struct handle_table *ht,
80 handle_table_set(struct handle_table *ht,
90 handle_table_get(struct handle_table *ht,
95 handle_table_remove(struct handle_table *ht,
100 handle_table_destroy(struct handle_table *ht);
104 handle_table_get_first_handle(struct handle_table *ht);
108 handle_table_get_next_handle(struct handle_table *ht,
/third_party/weston/xwayland/
Dhash.c124 struct hash_table *ht; in hash_table_create() local
126 ht = malloc(sizeof(*ht)); in hash_table_create()
127 if (ht == NULL) in hash_table_create()
130 ht->size_index = 0; in hash_table_create()
131 ht->size = hash_sizes[ht->size_index].size; in hash_table_create()
132 ht->rehash = hash_sizes[ht->size_index].rehash; in hash_table_create()
133 ht->max_entries = hash_sizes[ht->size_index].max_entries; in hash_table_create()
134 ht->table = calloc(ht->size, sizeof(*ht->table)); in hash_table_create()
135 ht->entries = 0; in hash_table_create()
136 ht->deleted_entries = 0; in hash_table_create()
[all …]
/third_party/python/Python/
Dhashtable.c63 static int hashtable_rehash(_Py_hashtable_t *ht);
120 _Py_hashtable_size(const _Py_hashtable_t *ht) in _Py_hashtable_size() argument
124 size += ht->nbuckets * sizeof(_Py_hashtable_entry_t *); in _Py_hashtable_size()
126 size += ht->nentries * sizeof(_Py_hashtable_entry_t); in _Py_hashtable_size()
132 _Py_hashtable_get_entry_generic(_Py_hashtable_t *ht, const void *key) in _Py_hashtable_get_entry_generic() argument
134 Py_uhash_t key_hash = ht->hash_func(key); in _Py_hashtable_get_entry_generic()
135 size_t index = key_hash & (ht->nbuckets - 1); in _Py_hashtable_get_entry_generic()
136 _Py_hashtable_entry_t *entry = TABLE_HEAD(ht, index); in _Py_hashtable_get_entry_generic()
141 if (entry->key_hash == key_hash && ht->compare_func(key, entry->key)) { in _Py_hashtable_get_entry_generic()
154 _Py_hashtable_get_entry_ptr(_Py_hashtable_t *ht, const void *key) in _Py_hashtable_get_entry_ptr() argument
[all …]
/third_party/mesa3d/src/compiler/glsl/
Dir_clone.cpp41 ir_variable::clone(void *mem_ctx, struct hash_table *ht) const in clone()
63 var->constant_value = this->constant_value->clone(mem_ctx, ht); in clone()
67 this->constant_initializer->clone(mem_ctx, ht); in clone()
71 if (ht) in clone()
72 _mesa_hash_table_insert(ht, (void *)const_cast<ir_variable *>(this), var); in clone()
78 ir_swizzle::clone(void *mem_ctx, struct hash_table *ht) const in clone()
80 return new(mem_ctx) ir_swizzle(this->val->clone(mem_ctx, ht), this->mask); in clone()
84 ir_return::clone(void *mem_ctx, struct hash_table *ht) const in clone()
89 new_value = this->value->clone(mem_ctx, ht); in clone()
95 ir_discard::clone(void *mem_ctx, struct hash_table *ht) const in clone()
[all …]
Dstring_to_uint_map.h64 this->ht = _mesa_hash_table_create(NULL, _mesa_hash_string, in string_to_uint_map()
70 hash_table_call_foreach(this->ht, delete_key, NULL); in ~string_to_uint_map()
71 _mesa_hash_table_destroy(this->ht, NULL); in ~string_to_uint_map()
79 hash_table_call_foreach(this->ht, delete_key, NULL); in clear()
80 _mesa_hash_table_clear(this->ht, NULL); in clear()
98 hash_table_call_foreach(this->ht, subtract_one_wrapper, wrapper); in iterate()
114 hash_entry *entry = _mesa_hash_table_search(this->ht, in get()
141 struct hash_entry *entry = _mesa_hash_table_search(this->ht, dup_key); in put()
145 _mesa_hash_table_insert(this->ht, dup_key, in put()
173 struct hash_table *ht; member
Dopt_constant_variable.cpp60 struct hash_table *ht; member in __anon7f5f48820111::ir_constant_variable_visitor
66 get_assignment_entry(ir_variable *var, struct hash_table *ht) in get_assignment_entry() argument
68 struct hash_entry *hte = _mesa_hash_table_search(ht, var); in get_assignment_entry()
76 _mesa_hash_table_insert(ht, var, entry); in get_assignment_entry()
85 struct assignment_entry *entry = get_assignment_entry(ir, this->ht); in visit()
104 entry = get_assignment_entry(ir->lhs->variable_referenced(), this->ht); in visit_enter()
165 entry = get_assignment_entry(var, this->ht); in visit_enter()
175 entry = get_assignment_entry(param, this->ht); in visit_enter()
185 entry = get_assignment_entry(var, this->ht); in visit_enter()
201 v.ht = _mesa_pointer_hash_table_create(NULL); in do_constant_variable()
[all …]
/third_party/libnl/lib/
Dhashtable.c32 nl_hash_table_t *ht; in nl_hash_table_alloc() local
34 ht = calloc(1, sizeof (*ht)); in nl_hash_table_alloc()
35 if (!ht) in nl_hash_table_alloc()
38 ht->nodes = calloc(size, sizeof (*ht->nodes)); in nl_hash_table_alloc()
39 if (!ht->nodes) { in nl_hash_table_alloc()
40 free(ht); in nl_hash_table_alloc()
44 ht->size = size; in nl_hash_table_alloc()
46 return ht; in nl_hash_table_alloc()
57 void nl_hash_table_free(nl_hash_table_t *ht) in nl_hash_table_free() argument
61 for(i = 0; i < ht->size; i++) { in nl_hash_table_free()
[all …]
/third_party/icu/icu4c/source/test/hdrtst/
Dtesttagsguards.sh21 echo '#include "unicode/'$base'"' > $TMPDIR/ht-$base.cpp
23 $CXX $INCL -C -E $DEF -o $TMPDIR/ht-$base-normal.i $TMPDIR/ht-$base.cpp
29 …E_${GUARD}_API=1 -DU_FORCE_HIDE_${GUARD}_API=1 $DEF -o $TMPDIR/ht-$base-$TAG.i $TMPDIR/ht-$base.cpp
30 if grep "@$TAG" -C 5 $TMPDIR/ht-$base-$TAG.i; then
36 $DIFF $TMPDIR/ht-$base-normal.i $TMPDIR/ht-$base-$TAG.i > $TMPDIR/ht-$base-normal-$TAG.txt
37 if egrep '^-.*@(stable|deprecated)' -C 5 $TMPDIR/ht-$base-normal-$TAG.txt; then
39 cat $TMPDIR/ht-$base-normal-$TAG.txt
47 …E_${GUARD}_API=1 -DU_FORCE_HIDE_${GUARD}_API=1 $DEF -o $TMPDIR/ht-$base-$TAG.i $TMPDIR/ht-$base.cpp
48 if grep "@$TAG" -C 5 $TMPDIR/ht-$base-$TAG.i; then
53 $DIFF $TMPDIR/ht-$base-normal.i $TMPDIR/ht-$base-$TAG.i > $TMPDIR/ht-$base-normal-$TAG.txt
[all …]
/third_party/mesa3d/src/util/tests/hash_table/
Dcollision.c43 struct hash_table *ht; in main() local
54 ht = _mesa_hash_table_create(NULL, NULL, _mesa_key_string_equal); in main()
59 _mesa_hash_table_insert_pre_hashed(ht, bad_hash, str1, NULL); in main()
60 _mesa_hash_table_insert_pre_hashed(ht, bad_hash, str2, NULL); in main()
61 _mesa_hash_table_insert_pre_hashed(ht, bad_hash, str3, NULL); in main()
63 entry1 = _mesa_hash_table_search_pre_hashed(ht, bad_hash, str1); in main()
66 entry2 = _mesa_hash_table_search_pre_hashed(ht, bad_hash, str2); in main()
70 entry1 = _mesa_hash_table_search_pre_hashed(ht, bad_hash, str1); in main()
74 _mesa_hash_table_remove(ht, entry1); in main()
75 entry2 = _mesa_hash_table_search_pre_hashed(ht, bad_hash, str2); in main()
[all …]
Dclear.c59 struct hash_table *ht; in main() local
63 ht = _mesa_hash_table_create(NULL, key_hash, key_equal); in main()
67 _mesa_hash_table_insert(ht, make_key(i), &flags[i]); in main()
70 _mesa_hash_table_clear(ht, delete_function); in main()
71 assert(_mesa_hash_table_next_entry(ht, NULL) == NULL); in main()
78 _mesa_hash_table_insert(ht, make_key(i), &flags[i]); in main()
83 assert(_mesa_hash_table_search(ht, make_key(i))); in main()
86 hash_table_foreach(ht, entry) { in main()
89 _mesa_hash_table_clear(ht, NULL); in main()
90 assert(!ht->entries); in main()
[all …]
Dremove_key.c35 struct hash_table *ht; in main() local
43 ht = _mesa_hash_table_create(NULL, _mesa_hash_string, _mesa_key_string_equal); in main()
45 _mesa_hash_table_insert(ht, str1, NULL); in main()
46 _mesa_hash_table_insert(ht, str2, NULL); in main()
48 entry = _mesa_hash_table_search(ht, str2); in main()
51 entry = _mesa_hash_table_search(ht, str1); in main()
54 _mesa_hash_table_remove_key(ht, str1); in main()
56 entry = _mesa_hash_table_search(ht, str1); in main()
59 entry = _mesa_hash_table_search(ht, str2); in main()
62 _mesa_hash_table_destroy(ht, NULL); in main()
Ddelete_and_lookup.c48 struct hash_table *ht; in main() local
56 ht = _mesa_hash_table_create(NULL, badhash, _mesa_key_string_equal); in main()
58 _mesa_hash_table_insert(ht, str1, NULL); in main()
59 _mesa_hash_table_insert(ht, str2, NULL); in main()
61 entry = _mesa_hash_table_search(ht, str2); in main()
64 entry = _mesa_hash_table_search(ht, str1); in main()
67 _mesa_hash_table_remove(ht, entry); in main()
69 entry = _mesa_hash_table_search(ht, str1); in main()
72 entry = _mesa_hash_table_search(ht, str2); in main()
75 _mesa_hash_table_destroy(ht, NULL); in main()
Ddelete_management.c52 struct hash_table *ht; in main() local
60 ht = _mesa_hash_table_create(NULL, key_value, uint32_t_key_equals); in main()
65 _mesa_hash_table_insert(ht, keys + i, NULL); in main()
69 entry = _mesa_hash_table_search(ht, &delete_value); in main()
70 _mesa_hash_table_remove(ht, entry); in main()
76 entry = _mesa_hash_table_search(ht, keys + i); in main()
82 for (entry = _mesa_hash_table_next_entry(ht, NULL); in main()
84 entry = _mesa_hash_table_next_entry(ht, entry)) { in main()
88 assert(ht->entries == 100); in main()
90 _mesa_hash_table_destroy(ht, NULL); in main()
Dreplacement.c38 struct hash_table *ht; in main() local
48 ht = _mesa_hash_table_create(NULL, _mesa_hash_string, in main()
51 _mesa_hash_table_insert(ht, str1, str1); in main()
52 _mesa_hash_table_insert(ht, str2, str2); in main()
54 entry = _mesa_hash_table_search(ht, str1); in main()
58 _mesa_hash_table_remove(ht, entry); in main()
60 entry = _mesa_hash_table_search(ht, str1); in main()
63 _mesa_hash_table_destroy(ht, NULL); in main()
Dinsert_and_lookup.c38 struct hash_table *ht; in main() local
46 ht = _mesa_hash_table_create(NULL, _mesa_hash_string, in main()
49 _mesa_hash_table_insert(ht, str1, NULL); in main()
50 _mesa_hash_table_insert(ht, str2, NULL); in main()
52 entry = _mesa_hash_table_search(ht, str1); in main()
55 entry = _mesa_hash_table_search(ht, str2); in main()
58 _mesa_hash_table_destroy(ht, NULL); in main()
/third_party/mesa3d/src/compiler/nir/
Dnir_search_helpers.h36 is_pos_power_of_two(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_pos_power_of_two() argument
68 is_neg_power_of_two(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_neg_power_of_two() argument
98 is_unsigned_multiple_of_ ## test(UNUSED struct hash_table *ht, \
124 is_zero_to_one(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_zero_to_one() argument
155 is_gt_0_and_lt_1(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_gt_0_and_lt_1() argument
180 is_not_const_zero(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_not_const_zero() argument
210 is_ult_0xfffc07fc(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_ult_0xfffc07fc() argument
230 is_not_const(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_not_const() argument
238 is_not_fmul(struct hash_table *ht, const nir_alu_instr *instr, unsigned src, in is_not_fmul() argument
248 return is_not_fmul(ht, src_alu, 0, 0, NULL); in is_not_fmul()
[all …]
/third_party/python/Include/internal/
Dpycore_hashtable.h47 typedef _Py_hashtable_entry_t* (*_Py_hashtable_get_entry_func)(_Py_hashtable_t *ht,
92 PyAPI_FUNC(void) _Py_hashtable_destroy(_Py_hashtable_t *ht);
94 PyAPI_FUNC(void) _Py_hashtable_clear(_Py_hashtable_t *ht);
96 typedef int (*_Py_hashtable_foreach_func) (_Py_hashtable_t *ht,
104 _Py_hashtable_t *ht,
108 PyAPI_FUNC(size_t) _Py_hashtable_size(const _Py_hashtable_t *ht);
113 _Py_hashtable_t *ht,
121 _Py_hashtable_get_entry(_Py_hashtable_t *ht, const void *key) in _Py_hashtable_get_entry() argument
123 return ht->get_entry_func(ht, key); in _Py_hashtable_get_entry()
132 PyAPI_FUNC(void*) _Py_hashtable_get(_Py_hashtable_t *ht, const void *key);
[all …]
/third_party/mesa3d/src/gallium/drivers/vc4/
Dvc4_qir_lower_uniforms.c48 add_uniform(struct hash_table *ht, struct qreg reg) in add_uniform() argument
53 entry = _mesa_hash_table_search(ht, key); in add_uniform()
57 _mesa_hash_table_insert(ht, key, (void *)(uintptr_t)1); in add_uniform()
62 remove_uniform(struct hash_table *ht, struct qreg reg) in remove_uniform() argument
67 entry = _mesa_hash_table_search(ht, key); in remove_uniform()
71 _mesa_hash_table_remove(ht, entry); in remove_uniform()
114 struct hash_table *ht = in qir_lower_uniforms() local
129 add_uniform(ht, inst->src[i]); in qir_lower_uniforms()
133 while (ht->entries) { in qir_lower_uniforms()
139 hash_table_foreach(ht, entry) { in qir_lower_uniforms()
[all …]
/third_party/libwebsockets/lib/core/
Dlws_map.c112 lws_map_hashtable_t *ht; in lws_map_create() local
139 ht = (lws_map_hashtable_t *)&map[1]; in lws_map_create()
141 ht[modulo].map_owner = map; in lws_map_create()
159 lws_map_hashtable_t *ht; in lws_map_destroy() local
167 ht = (lws_map_hashtable_t *)&(map[1]); in lws_map_destroy()
169 lws_dll2_foreach_safe(&ht->ho, ht, ho_free_item); in lws_map_destroy()
170 ht++; in lws_map_destroy()
183 lws_map_hashtable_t *ht; in lws_map_item_create() local
210 ht = (lws_map_hashtable_t *)&map[1]; in lws_map_item_create()
212 lws_dll2_add_head(&item->list, &ht[hti].ho); in lws_map_item_create()
[all …]
/third_party/gstreamer/gstplugins_base/gst-libs/gst/tag/
Dlang.c99 GHashTable *ht = (GHashTable *) user_data; in parse_start_element() local
130 g_hash_table_replace (ht, (gpointer) g_intern_string (c1), (gpointer) tname); in parse_start_element()
131 g_hash_table_replace (ht, (gpointer) g_intern_string (c2b), (gpointer) tname); in parse_start_element()
133 g_hash_table_replace (ht, (gpointer) g_intern_string (c2t), in parse_start_element()
141 gst_tag_load_iso_639_xml (GHashTable * ht) in gst_tag_load_iso_639_xml() argument
171 ctx = g_markup_parse_context_new (&xml_parser, 0, ht, NULL); in gst_tag_load_iso_639_xml()
197 GHashTable *ht; in gst_tag_get_iso_639_ht() local
205 ht = g_hash_table_new (g_str_hash, g_str_equal); in gst_tag_get_iso_639_ht()
225 g_hash_table_insert (ht, (gpointer) iso_639_codes[i].iso_639_1, in gst_tag_get_iso_639_ht()
227 g_hash_table_insert (ht, (gpointer) iso_639_codes[i].iso_639_2, in gst_tag_get_iso_639_ht()
[all …]
/third_party/mesa3d/src/mesa/main/
Dhash.c56 table->ht = _mesa_hash_table_create(NULL, uint_key_hash, in _mesa_NewHashTable()
58 if (table->ht == NULL) { in _mesa_NewHashTable()
64 _mesa_hash_table_set_deleted_key(table->ht, uint_key(DELETED_KEY_VALUE)); in _mesa_NewHashTable()
89 if (_mesa_hash_table_next_entry(table->ht, NULL) != NULL) { in _mesa_DeleteHashTable()
93 _mesa_hash_table_destroy(table->ht, NULL); in _mesa_DeleteHashTable()
105 assert(_mesa_hash_table_num_entries(table->ht) == 0); in init_name_reuse()
135 entry = _mesa_hash_table_search_pre_hashed(table->ht, in _mesa_HashLookup_unlocked()
197 entry = _mesa_hash_table_search_pre_hashed(table->ht, hash, uint_key(key)); in _mesa_HashInsert_unlocked()
201 _mesa_hash_table_insert_pre_hashed(table->ht, hash, uint_key(key), data); in _mesa_HashInsert_unlocked()
277 entry = _mesa_hash_table_search_pre_hashed(table->ht, in _mesa_HashRemove_unlocked()
[all …]

12345678910>>...26