Lines Matching defs:input
207 Calculate the 32-bit hash of sequence "length" bytes stored at memory address "input".
208 The memory between input & input+length must be valid (allocated and read-accessible).
211 XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t length, XXH32_hash_t seed);
216 * Streaming functions generate the xxHash value from an incrememtal input.
230 * It's still possible to continue inserting input into the hash state after a digest,
242 XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* statePtr, const void* input, size_t length);
282 * Returns the 64-bit hash of sequence of length @length stored at memory address @input.
286 XXH_PUBLIC_API XXH64_hash_t XXH64 (const void* input, size_t length, XXH64_hash_t seed);
295 XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH64_state_t* statePtr, const void* input, size_t length);
400 * If input pointer is NULL, xxHash default behavior is to dereference it, triggering a segfault.
401 * When this macro is enabled, xxHash actively checks input for null pointer.
402 * It it is, result for null input pointers is the same as a null-length input.
410 * It means : check for aligned/unaligned input.
412 * set it to 0 when the input is guaranteed to be aligned,
642 static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input)
644 acc += input * PRIME32_2;
777 XXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment align)
779 const xxh_u8* bEnd = input + len;
783 if (input==NULL) {
785 bEnd=input=(const xxh_u8*)(size_t)16;
797 v1 = XXH32_round(v1, XXH_get32bits(input)); input += 4;
798 v2 = XXH32_round(v2, XXH_get32bits(input)); input += 4;
799 v3 = XXH32_round(v3, XXH_get32bits(input)); input += 4;
800 v4 = XXH32_round(v4, XXH_get32bits(input)); input += 4;
801 } while (input < limit);
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);
827 if ((((size_t)input) & 3) == 0) { /* Input is 4-bytes aligned, leverage the speed benefit */
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)
871 if (input==NULL)
878 { const xxh_u8* p = (const xxh_u8*)input;
885 XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, len);
891 XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, 16-state->memsize);
1082 static xxh_u64 XXH64_round(xxh_u64 acc, xxh_u64 input)
1084 acc += input * PRIME64_2;
1235 XXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment align)
1237 const xxh_u8* bEnd = input + len;
1241 if (input==NULL) {
1243 bEnd=input=(const xxh_u8*)(size_t)32;
1255 v1 = XXH64_round(v1, XXH_get64bits(input)); input+=8;
1256 v2 = XXH64_round(v2, XXH_get64bits(input)); input+=8;
1257 v3 = XXH64_round(v3, XXH_get64bits(input)); input+=8;
1258 v4 = XXH64_round(v4, XXH_get64bits(input)); input+=8;
1259 } while (input<=limit);
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);
1289 if ((((size_t)input) & 7)==0) { /* Input is aligned, let's leverage the speed advantage */
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)
1331 if (input==NULL)
1338 { const xxh_u8* p = (const xxh_u8*)input;
1344 XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, len);
1350 XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, 32-state->memsize);