MAOS
Multithreaded Adaptive Optics Simulator
hashlittle.h File Reference

Functions

uint32_t hashlittle (const void *key, size_t length, uint32_t initval)
 

Detailed Description

Hash a memory region to get uint32. Do not use on floating precision data.

Function Documentation

◆ hashlittle()

uint32_t hashlittle ( const void *  key,
size_t  length,
uint32_t  initval 
)

hashlittle.c contains a hash function used to hash a chunk of data and return a hash number that can be used to identify the data. Apply with care to double floating numbers because of round off error.
hash the data and return an hash number.

Returns
a hash number
Parameters
[in]keyThe data
[in]lengthThe length of the data in byte
[in]initvalThe initial hash number