• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/gettext-0.17/gettext-tools/src/

Lines Matching refs:hashsize

177   unsigned int hashsize;
187 i.e. total number of times that 1 + (hashcode % (hashsize - 2))
189 hashsize values are allowed. */
192 for (hashsize = n; hashsize <= XXN * n; hashsize++)
199 ascending loop and on the fact that score >= hashsize. */
200 if (hashsize >= best_score)
203 bitmap = XNMALLOC (hashsize, char);
204 memset (bitmap, 0, hashsize);
209 unsigned int idx = hashcodes[j] % hashsize;
213 /* Collision. Cannot deal with it if hashsize is even. */
214 if ((hashsize % 2) == 0)
215 /* Try next hashsize. */
220 unsigned int incr = 1 + (hashcodes[j] % (hashsize - 2));
226 if (idx >= hashsize)
227 idx -= hashsize;
231 frequently if gcd(hashsize,incr) > 1. Try next
232 hashsize. */
241 /* Big hashsize also gives a penalty. */
242 score = XXS * score + hashsize;
244 /* If for any incr between 1 and hashsize - 2, an whole round
248 if (score > hashsize)
253 and gcd(hashsize,incr), we only need to conside incr that
254 divides hashsize. */
255 for (incr = 1; incr <= hashsize / 2; incr++)
256 if ((hashsize % incr) == 0)
265 for (idx = idx0; idx < hashsize; idx += incr)
287 best_hashsize = hashsize;
313 compute_table_items (message_list_ty *mlp, unsigned int hashsize)
320 bitmap = XNMALLOC (hashsize, char);
321 memset (bitmap, 0, hashsize);
327 unsigned int idx = hashcode % hashsize;
331 unsigned int incr = 1 + (hashcode % (hashsize - 2));
335 if (idx >= hashsize)
336 idx -= hashsize;
465 write_lookup_code (FILE *stream, unsigned int hashsize, bool collisions)
468 fprintf (stream, " int idx = (hash_val %% %d) << 1;\n", hashsize);
479 hashsize - 2);
482 fprintf (stream, " if (idx >= %d)\n", 2 * hashsize);
483 fprintf (stream, " idx -= %d;\n", 2 * hashsize);
748 unsigned int hashsize;
754 hashsize = compute_hashsize (mlp, &collisions);
758 table_items = compute_table_items (mlp, hashsize);
768 2 * hashsize);
810 write_lookup_code (stream, hashsize, collisions);
823 write_lookup_code (stream, hashsize, collisions);
833 2 * hashsize);
835 fprintf (stream, " return (idx < %d);\n", 2 * hashsize);
840 2 * hashsize);