Lines Matching refs:hash

140 For finding DIDs when their name is given, there is a hash table of size
141 DICT_HASH_TABLE_SIZE. The hash value is computed from the name only, not
142 from the arity. Thus all functors with the same name hash onto the same
143 slot of the hash table (together with other functors whose name happens to
144 give the same hash value). All colliding entries are kept in a circular
146 is referenced from the hash table is marked with the 'head' bit.
185 /* compute hash value and length of a NULL-terminated string */
186 #define Hash(id, hash, length) { \
188 for (length = hash = 0; *str; str++, length++) \
189 hash += (hash<<3) + *(unsigned char *)str; \
190 hash &= DICT_HASH_TABLE_SIZE-1; \
193 /* compute hash value of a string of given length */
194 #define Hashl(id, hash, n) { \
197 for (hash = 0; length > 0; str++, --length) \
198 hash += (hash<<3) + *(unsigned char *)str; \
199 hash &= DICT_HASH_TABLE_SIZE-1; \
227 a_mutex_t lock; /* lock for hash table */
231 int table_usage; /* number of hash slots in use */
232 int collisions; /* number of hash collisions */
551 else /* the first entry in this hash slot */
768 * alternatively, scan through the hash table
955 case 2: /* hash table size */
958 case 3: /* hash table usage */
1415 uword hash;
1479 t_constant_entry **new_slot = &new_htable[elem->hash % new_size];
1514 uword hash;
1535 /* compute hash value */
1536 hash = ec_term_hash(v, t, MAX_U_WORD, &res);
1543 pslot = &constant_table->htable[hash % constant_table->size];
1546 if (pelem->hash == hash
1571 pelem->hash = hash;