Lines Matching defs:hash

429     /* fill conventional hash table and conventional chain table */
447 * in the hash cache bucket */
487 /* move chain pointers into the last entry of each hash bucket */
498 /* fill the buckets of the hash table */
503 /* Shift hash cache down 1. */
758 /* Constants for row-based hash */
847 /* Note: prefetching more of the hash table does not appear to be beneficial for 128-entry rows */
854 assert(ZSTD_isAligned(hashTable + relRow, 64)); /* prefetched hash row always 64-byte aligned */
859 * Fill up the hash cache starting at idx, prefetching up to ZSTD_ROW_HASH_CACHE_SIZE entries,
873 U32 const hash = (U32)ZSTD_hashPtr(base + idx, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls);
874 U32 const row = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog;
876 ms->hashCache[idx & ZSTD_ROW_HASH_CACHE_MASK] = hash;
885 * Returns the hash of base + idx, and replaces the hash in the hash cache with the byte at
896 { U32 const hash = cache[idx & ZSTD_ROW_HASH_CACHE_MASK];
898 return hash;
903 * Updates the hash table with positions starting from updateStartIdx until updateEndIdx.
917 U32 const hash = useCache ? ZSTD_row_nextCachedHash(ms->hashCache, hashTable, tagTable, base, updateStartIdx, hashLog, rowLog, mls)
919 U32 const relRow = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog;
925 assert(hash == ZSTD_hashPtr(base + updateStartIdx, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls));
926 ((BYTE*)tagRow)[pos + ZSTD_ROW_HASH_TAG_OFFSET] = hash & ZSTD_ROW_HASH_TAG_MASK;
932 * Inserts the byte at ip into the appropriate position in the hash table, and updates ms->nextToUpdate.
947 /* Only skip positions when using hash cache, i.e.
998 * the hash at the nth position in a row of the tagTable.
1106 * - Generate a hash from a byte along with an additional 1-byte "short hash". The additional byte is our "tag"
1107 * - The hashTable is effectively split into groups or "rows" of 16 or 32 entries of U32, and the hash determines
1115 * - Use SIMD to efficiently compare the tags in the tagTable to the 1-byte "short hash" and
1116 * generate a bitfield that we can cycle through to check the collisions in the hash table.
1154 U32 ddsExtraAttempts = 0; /* cctx hash tables are limited in searches, but allow extra searches into DDS */
1182 { /* Get the hash for ip, compute the appropriate row */
1183 U32 const hash = ZSTD_row_nextCachedHash(hashCache, hashTable, tagTable, base, curr, hashLog, rowLog, mls);
1184 U32 const relRow = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog;
1185 U32 const tag = hash & ZSTD_ROW_HASH_TAG_MASK;
1382 /* Generate hash chain search fns for each combination of (dictMode, mls) */