Lines Matching defs:len
708 XXH32_finalize(xxh_u32 h32, const xxh_u8* ptr, size_t len, XXH_alignment align)
721 len &= 15;
722 while (len >= 4) {
724 len -= 4;
726 while (len > 0) {
728 --len;
732 switch(len&15) /* or switch(bEnd - p) */ {
777 XXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment align)
779 const xxh_u8* bEnd = input + len;
784 len=0;
789 if (len>=16) {
809 h32 += (xxh_u32)len;
811 return XXH32_finalize(h32, input, len&15, align);
815 XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t len, XXH32_hash_t seed)
821 XXH32_update(&state, (const xxh_u8*)input, len);
828 return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_aligned);
831 return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned);
869 XXH32_update(XXH32_state_t* state, const void* input, size_t len)
879 const xxh_u8* const bEnd = p + len;
881 state->total_len_32 += (XXH32_hash_t)len;
882 state->large_len |= (XXH32_hash_t)((len>=16) | (state->total_len_32>=16));
884 if (state->memsize + len < 16) { /* fill in tmp buffer */
885 XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, len);
886 state->memsize += (XXH32_hash_t)len;
1112 XXH64_finalize(xxh_u64 h64, const xxh_u8* ptr, size_t len, XXH_alignment align)
1132 len &= 31;
1133 while (len >= 8) {
1135 len -= 8;
1137 if (len >= 4) {
1139 len -= 4;
1141 while (len > 0) {
1143 --len;
1147 switch(len & 31) {
1235 XXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment align)
1237 const xxh_u8* bEnd = input + len;
1242 len=0;
1247 if (len>=32) {
1271 h64 += (xxh_u64) len;
1273 return XXH64_finalize(h64, input, len, align);
1277 XXH_PUBLIC_API XXH64_hash_t XXH64 (const void* input, size_t len, XXH64_hash_t seed)
1283 XXH64_update(&state, (const xxh_u8*)input, len);
1290 return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_aligned);
1293 return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned);
1329 XXH64_update (XXH64_state_t* state, const void* input, size_t len)
1339 const xxh_u8* const bEnd = p + len;
1341 state->total_len += len;
1343 if (state->memsize + len < 32) { /* fill in tmp buffer */
1344 XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, len);
1345 state->memsize += (xxh_u32)len;