Lines Matching +full:5 +full:k

118 #define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))  argument
150 Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that
233 const uint32_t *k, /* the key, an array of uint32_t values */ in hashword() argument
245 a += k[0]; in hashword()
246 b += k[1]; in hashword()
247 c += k[2]; in hashword()
250 k += 3; in hashword()
256 case 3 : c+=k[2]; in hashword()
259 case 2 : b+=k[1]; in hashword()
262 case 1 : a+=k[0]; in hashword()
285 const uint32_t *k, /* the key, an array of uint32_t values */ in hashword2() argument
299 a += k[0]; in hashword2()
300 b += k[1]; in hashword2()
301 c += k[2]; in hashword2()
304 k += 3; in hashword2()
310 case 3 : c+=k[2]; in hashword2()
313 case 2 : b+=k[1]; in hashword2()
316 case 1 : a+=k[0]; in hashword2()
332 k : the key (the unaligned variable-length array of bytes)
345 If you are hashing n strings (uint8_t **)k, do it like this:
346 for (i=0, h=0; i<n; ++i) h = hashlittle( k[i], len[i], h);
366 const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */ in hashlittle() local
374 a += k[0]; in hashlittle()
375 b += k[1]; in hashlittle()
376 c += k[2]; in hashlittle()
379 k += 3; in hashlittle()
384 * "k[2]&0xffffff" actually reads beyond the end of the string, but in hashlittle()
396 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in hashlittle()
397 case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break; in hashlittle()
398 case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break; in hashlittle()
399 case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break; in hashlittle()
400 case 8 : b+=k[1]; a+=k[0]; break; in hashlittle()
401 case 7 : b+=k[1]&0xffffff; a+=k[0]; break; in hashlittle()
402 case 6 : b+=k[1]&0xffff; a+=k[0]; break; in hashlittle()
403 case 5 : b+=k[1]&0xff; a+=k[0]; break; in hashlittle()
404 case 4 : a+=k[0]; break; in hashlittle()
405 case 3 : a+=k[0]&0xffffff; break; in hashlittle()
406 case 2 : a+=k[0]&0xffff; break; in hashlittle()
407 case 1 : a+=k[0]&0xff; break; in hashlittle()
413 k8 = (const uint8_t *)k; in hashlittle()
416 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in hashlittle()
426 case 8 : b+=k[1]; a+=k[0]; break; in hashlittle()
430 case 6 : b+=((uint32_t)k8[5])<<8; in hashlittle()
433 case 5 : b+=k8[4]; in hashlittle()
436 case 4 : a+=k[0]; break; in hashlittle()
450 const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */ in hashlittle() local
456 a += k[0] + (((uint32_t)k[1])<<16); in hashlittle()
457 b += k[2] + (((uint32_t)k[3])<<16); in hashlittle()
458 c += k[4] + (((uint32_t)k[5])<<16); in hashlittle()
461 k += 6; in hashlittle()
465 k8 = (const uint8_t *)k; in hashlittle()
468 case 12: c+=k[4]+(((uint32_t)k[5])<<16); in hashlittle()
469 b+=k[2]+(((uint32_t)k[3])<<16); in hashlittle()
470 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle()
475 case 10: c+=k[4]; in hashlittle()
476 b+=k[2]+(((uint32_t)k[3])<<16); in hashlittle()
477 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle()
482 case 8 : b+=k[2]+(((uint32_t)k[3])<<16); in hashlittle()
483 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle()
488 case 6 : b+=k[2]; in hashlittle()
489 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle()
491 case 5 : b+=k8[4]; in hashlittle()
494 case 4 : a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle()
499 case 2 : a+=k[0]; in hashlittle()
507 const uint8_t *k = (const uint8_t *)key; in hashlittle() local
512 a += k[0]; in hashlittle()
513 a += ((uint32_t)k[1])<<8; in hashlittle()
514 a += ((uint32_t)k[2])<<16; in hashlittle()
515 a += ((uint32_t)k[3])<<24; in hashlittle()
516 b += k[4]; in hashlittle()
517 b += ((uint32_t)k[5])<<8; in hashlittle()
518 b += ((uint32_t)k[6])<<16; in hashlittle()
519 b += ((uint32_t)k[7])<<24; in hashlittle()
520 c += k[8]; in hashlittle()
521 c += ((uint32_t)k[9])<<8; in hashlittle()
522 c += ((uint32_t)k[10])<<16; in hashlittle()
523 c += ((uint32_t)k[11])<<24; in hashlittle()
526 k += 12; in hashlittle()
532 case 12: c+=((uint32_t)k[11])<<24; in hashlittle()
535 case 11: c+=((uint32_t)k[10])<<16; in hashlittle()
538 case 10: c+=((uint32_t)k[9])<<8; in hashlittle()
541 case 9 : c+=k[8]; in hashlittle()
544 case 8 : b+=((uint32_t)k[7])<<24; in hashlittle()
547 case 7 : b+=((uint32_t)k[6])<<16; in hashlittle()
550 case 6 : b+=((uint32_t)k[5])<<8; in hashlittle()
553 case 5 : b+=k[4]; in hashlittle()
556 case 4 : a+=((uint32_t)k[3])<<24; in hashlittle()
559 case 3 : a+=((uint32_t)k[2])<<16; in hashlittle()
562 case 2 : a+=((uint32_t)k[1])<<8; in hashlittle()
565 case 1 : a+=k[0]; in hashlittle()
602 const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */ in hashlittle2() local
610 a += k[0]; in hashlittle2()
611 b += k[1]; in hashlittle2()
612 c += k[2]; in hashlittle2()
615 k += 3; in hashlittle2()
620 * "k[2]&0xffffff" actually reads beyond the end of the string, but in hashlittle2()
632 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in hashlittle2()
633 case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break; in hashlittle2()
634 case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break; in hashlittle2()
635 case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break; in hashlittle2()
636 case 8 : b+=k[1]; a+=k[0]; break; in hashlittle2()
637 case 7 : b+=k[1]&0xffffff; a+=k[0]; break; in hashlittle2()
638 case 6 : b+=k[1]&0xffff; a+=k[0]; break; in hashlittle2()
639 case 5 : b+=k[1]&0xff; a+=k[0]; break; in hashlittle2()
640 case 4 : a+=k[0]; break; in hashlittle2()
641 case 3 : a+=k[0]&0xffffff; break; in hashlittle2()
642 case 2 : a+=k[0]&0xffff; break; in hashlittle2()
643 case 1 : a+=k[0]&0xff; break; in hashlittle2()
649 k8 = (const uint8_t *)k; in hashlittle2()
652 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in hashlittle2()
662 case 8 : b+=k[1]; a+=k[0]; break; in hashlittle2()
666 case 6 : b+=((uint32_t)k8[5])<<8; in hashlittle2()
669 case 5 : b+=k8[4]; in hashlittle2()
672 case 4 : a+=k[0]; break; in hashlittle2()
686 const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */ in hashlittle2() local
692 a += k[0] + (((uint32_t)k[1])<<16); in hashlittle2()
693 b += k[2] + (((uint32_t)k[3])<<16); in hashlittle2()
694 c += k[4] + (((uint32_t)k[5])<<16); in hashlittle2()
697 k += 6; in hashlittle2()
701 k8 = (const uint8_t *)k; in hashlittle2()
704 case 12: c+=k[4]+(((uint32_t)k[5])<<16); in hashlittle2()
705 b+=k[2]+(((uint32_t)k[3])<<16); in hashlittle2()
706 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle2()
711 case 10: c+=k[4]; in hashlittle2()
712 b+=k[2]+(((uint32_t)k[3])<<16); in hashlittle2()
713 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle2()
718 case 8 : b+=k[2]+(((uint32_t)k[3])<<16); in hashlittle2()
719 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle2()
724 case 6 : b+=k[2]; in hashlittle2()
725 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle2()
727 case 5 : b+=k8[4]; in hashlittle2()
730 case 4 : a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle2()
735 case 2 : a+=k[0]; in hashlittle2()
743 const uint8_t *k = (const uint8_t *)key; in hashlittle2() local
748 a += k[0]; in hashlittle2()
749 a += ((uint32_t)k[1])<<8; in hashlittle2()
750 a += ((uint32_t)k[2])<<16; in hashlittle2()
751 a += ((uint32_t)k[3])<<24; in hashlittle2()
752 b += k[4]; in hashlittle2()
753 b += ((uint32_t)k[5])<<8; in hashlittle2()
754 b += ((uint32_t)k[6])<<16; in hashlittle2()
755 b += ((uint32_t)k[7])<<24; in hashlittle2()
756 c += k[8]; in hashlittle2()
757 c += ((uint32_t)k[9])<<8; in hashlittle2()
758 c += ((uint32_t)k[10])<<16; in hashlittle2()
759 c += ((uint32_t)k[11])<<24; in hashlittle2()
762 k += 12; in hashlittle2()
768 case 12: c+=((uint32_t)k[11])<<24; in hashlittle2()
771 case 11: c+=((uint32_t)k[10])<<16; in hashlittle2()
774 case 10: c+=((uint32_t)k[9])<<8; in hashlittle2()
777 case 9 : c+=k[8]; in hashlittle2()
780 case 8 : b+=((uint32_t)k[7])<<24; in hashlittle2()
783 case 7 : b+=((uint32_t)k[6])<<16; in hashlittle2()
786 case 6 : b+=((uint32_t)k[5])<<8; in hashlittle2()
789 case 5 : b+=k[4]; in hashlittle2()
792 case 4 : a+=((uint32_t)k[3])<<24; in hashlittle2()
795 case 3 : a+=((uint32_t)k[2])<<16; in hashlittle2()
798 case 2 : a+=((uint32_t)k[1])<<8; in hashlittle2()
801 case 1 : a+=k[0]; in hashlittle2()
831 const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
839 a += k[0];
840 b += k[1];
841 c += k[2];
844 k += 3;
849 * "k[2]<<8" actually reads beyond the end of the string, but
861 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
862 case 11: c+=k[2]&0xffffff00; b+=k[1]; a+=k[0]; break;
863 case 10: c+=k[2]&0xffff0000; b+=k[1]; a+=k[0]; break;
864 case 9 : c+=k[2]&0xff000000; b+=k[1]; a+=k[0]; break;
865 case 8 : b+=k[1]; a+=k[0]; break;
866 case 7 : b+=k[1]&0xffffff00; a+=k[0]; break;
867 case 6 : b+=k[1]&0xffff0000; a+=k[0]; break;
868 case 5 : b+=k[1]&0xff000000; a+=k[0]; break;
869 case 4 : a+=k[0]; break;
870 case 3 : a+=k[0]&0xffffff00; break;
871 case 2 : a+=k[0]&0xffff0000; break;
872 case 1 : a+=k[0]&0xff000000; break;
878 k8 = (const uint8_t *)k;
881 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
891 case 8 : b+=k[1]; a+=k[0]; break;
895 case 6 : b+=((uint32_t)k8[5])<<16;
898 case 5 : b+=((uint32_t)k8[4])<<24;
901 case 4 : a+=k[0]; break;
915 const uint8_t *k = (const uint8_t *)key;
920 a += ((uint32_t)k[0])<<24;
921 a += ((uint32_t)k[1])<<16;
922 a += ((uint32_t)k[2])<<8;
923 a += ((uint32_t)k[3]);
924 b += ((uint32_t)k[4])<<24;
925 b += ((uint32_t)k[5])<<16;
926 b += ((uint32_t)k[6])<<8;
927 b += ((uint32_t)k[7]);
928 c += ((uint32_t)k[8])<<24;
929 c += ((uint32_t)k[9])<<16;
930 c += ((uint32_t)k[10])<<8;
931 c += ((uint32_t)k[11]);
934 k += 12;
940 case 12: c+=k[11];
943 case 11: c+=((uint32_t)k[10])<<8;
946 case 10: c+=((uint32_t)k[9])<<16;
949 case 9 : c+=((uint32_t)k[8])<<24;
952 case 8 : b+=k[7];
955 case 7 : b+=((uint32_t)k[6])<<8;
958 case 6 : b+=((uint32_t)k[5])<<16;
961 case 5 : b+=((uint32_t)k[4])<<24;
964 case 4 : a+=k[3];
967 case 3 : a+=((uint32_t)k[2])<<8;
970 case 2 : a+=((uint32_t)k[1])<<16;
973 case 1 : a+=((uint32_t)k[0])<<24;
1013 uint32_t c[HASHSTATE], d[HASHSTATE], i=0, j=0, k, l, m=0, z; in driver2() local
1032 for (k=0; k<MAXPAIR; k+=2) in driver2()
1038 a[i] ^= (k<<j); in driver2()
1039 a[i] ^= (k>>(8-j)); in driver2()
1041 b[i] ^= ((k+1)<<j); in driver2()
1042 b[i] ^= ((k+1)>>(8-j)); in driver2()
1057 if (k>z) z=k; in driver2()
1058 if (k==MAXPAIR) in driver2()
1097 hashword((const uint32_t *)q, (sizeof(q)-5)/4, 13), in driver3()
1103 hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13), in driver3()
1111 hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13), in driver3()
1119 hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13), in driver3()
1127 hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13), in driver3()