• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/dyld-239.4/include/

Lines Matching refs:alen

754 The key is hashed to a pair (a,b) where a in 0..*alen*-1 and b in
934 static void initnorm(key *keys, ub4 nkeys, ub4 alen, ub4 blen, ub4 smax, ub8 salt)
936 // ub4 alen; /* (a,b) has a in 0..alen-1, a power of 2 */
942 ub4 loga = log2u(alen); /* log based 2 of blen */
1146 /* guess initial values for alen and blen */
1147 static void initalen(ub4 *alen, ub4 *blen, ub4 smax, ub4 nkeys)
1148 // ub4 *alen; /* output, initial alen */
1154 * Find initial *alen, *blen
1155 * Initial alen and blen values were found empirically. Some factors:
1159 * alen and blen must be powers of 2 because the values in 0..alen-1 and
1162 * alen must be less than smax, in fact less than nkeys, because otherwise
1169 * and alen*blen = smax*smax/32.
1177 * alen=smax/8 than with alen=smax/4. Above smax*(5/8), blen=smax/4
1178 * doesn't seem to care whether alen=smax/8 or alen=smax/4. I think it
1180 * 85000, and 90000 keys with different values of alen. This only matters
1183 * When alen*blen <= 1<<UB4BITS, the initial hash must produce one integer.
1187 *alen = smax; /* no reason to restrict alen to smax/2 */
1191 if (*alen < 1) *alen = 1;
1195 fprintf(stderr, "alen %d blen %d smax %d nkeys %d\n", *alen, *blen, smax, nkeys);
1204 static int findhash(bstuff **tabb, ub4 *alen, ub4 *blen, ub8 *salt,
1207 // ub4 *alen; /* output, 0..alen-1 is range for a of (a,b) */
1222 /* guess initial values for alen and blen */
1223 initalen(alen, blen, smax, nkeys);
1243 initnorm(keys, nkeys, *alen, *blen, smax, *salt);
1251 if (*alen < maxalen)
1253 *alen *= 2;
1331 ub4 alen; /* a in 0..alen-1, a power of 2 */
1344 ok = findhash(&tab, &alen, &blen, &salt,
1348 ok = findhash(&tab, &alen, &blen, &salt,
1357 result.shift = UB8BITS - log2u(alen);