Home | History | Annotate | Download | only in glx

Lines Matching refs:hash

1 /* glxhash.c -- Small hash table support for integer -> integer mapping
33 * hash table using self-organizing linked lists [Knuth73, pp. 398-399] for
42 * 2) The hash computation uses a table of random integers [Hanson97,
50 * dynamic hash tables was postponed until the need arises. A common (and
51 * naive) approach to dynamic hash table implementation simply creates a
52 * new hash table when necessary, rehashes all the data into the new table,
68 * [Larson88] Per-Ake Larson. "Dynamic Hash Tables". CACM 31(4), April
129 unsigned long hash = 0;
145 hash = (hash << 1) + scatter[tmp & 0xff];
149 hash %= HASH_SIZE;
151 printf("Hash(%d) = %d\n", key, hash);
153 return hash;
203 unsigned long hash = HashHash(key);
208 *h = hash;
210 for (bucket = table->buckets[hash]; bucket; bucket = bucket->next) {
215 bucket->next = table->buckets[hash];
216 table->buckets[hash] = bucket;
251 unsigned long hash;
256 if (HashFind(table, key, &hash))
264 bucket->next = table->buckets[hash];
265 table->buckets[hash] = bucket;
267 printf("Inserted %d at %d/%p\n", key, hash, bucket);
276 unsigned long hash;
282 bucket = HashFind(table, key, &hash);
287 table->buckets[hash] = bucket->next;