|
libabigail
|
Namespace for hashing. More...
Functions | |
| size_t | combine_hashes (size_t val1, size_t val2) |
| std::size_t | combine_hashes (std::size_t, std::size_t) |
| Produce good hash value combining val1 and val2. This is copied from tree.c in GCC. More... | |
| uint32_t | fnv_hash (const std::string &str) |
| Compute a stable string hash. More... | |
Namespace for hashing.
| size_t combine_hashes | ( | size_t | val1, |
| size_t | val2 | ||
| ) |
Definition at line 40 of file abg-hash.cc.
| std::size_t combine_hashes | ( | std::size_t | , |
| std::size_t | |||
| ) |
Produce good hash value combining val1 and val2. This is copied from tree.c in GCC.
| uint32_t fnv_hash | ( | const std::string & | str | ) |
Compute a stable string hash.
std::hash has no portability or stability guarantees so is unsuitable where reproducibility is a requirement such as in XML output.
This is the 32-bit FNV-1a algorithm. The algorithm, reference code and constants are all unencumbered. It is fast and has reasonable distribution properties.
https://en.wikipedia.org/wiki/Fowler-Noll-Vo_hash_function
| str | the string to hash. |
Definition at line 64 of file abg-hash.cc.