Lines Matching defs:table

38  * Provides a generic hash table with chaining.
52 * A hash table element
62 * The hash table
68 DAPL_HASH_ELEM *table;
75 * the number of entries in the whole hash table, as
77 * ignores empty buckets, giving us data on overall table
83 uint64_t hash_tbl_max; /* max in entire table */
84 uint64_t hash_tbl_total; /* total in table */
99 /* datum value in empty table slots (use 0UL or ~0UL as appropriate) */
107 &((p_table)->table)[DAPL_DOHASH(in_key, (p_table)->tbl_size)]; \
167 * Add a new key to the hash table
170 * table, key and datum to be added
225 if (NO_DATUM(p_table->table[hashValue].datum)) {
229 p_table->table[hashValue].key = key;
230 p_table->table[hashValue].datum = datum;
231 p_table->table[hashValue].next_element = 0;
245 for (lastelement = &p_table->table[hashValue];
348 * Create a new hash table with at least 'table_size' hash buckets.
364 /* Allocate hash table */
372 /* Init hash table, allocate and init and buckets */
375 p_table->table = (DAPL_HASH_ELEM *)dapl_os_alloc(table_length);
376 if (NULL == p_table->table) {
387 p_table->table[i].datum = NO_DATUM_VALUE;
388 p_table->table[i].key = 0;
389 p_table->table[i].next_element = 0;
400 * Destroy a hash table
406 dapl_os_assert(p_table && p_table->table);
409 dapl_os_free(p_table->table,
418 * Returns the number of elements stored in the table
435 * Inserts the specified data into the table with the given key.
519 "dapls_hash_remove () called on empty hash table!\n");
527 if (dapl_hash_delete_element(&p_table->table[hashValue], key, p_data)) {
537 * Iterates through the entire hash table return one element at a time.
558 /* the hash table is empty */
566 curr = &p_table->table[p_table->iterator_bucket];
610 curr = &p_table->table[p_table->iterator_bucket];