LLVM
13.0.0git

The intermediate state used during hashing. More...
#include "llvm/ADT/Hashing.h"
Public Member Functions  
void  mix (const char *s) 
Mix in a 64byte buffer of data. More...  
uint64_t  finalize (size_t length) 
Compute the final 64bit hash code value based on the current state and the length of bytes hashed. More...  
Static Public Member Functions  
static hash_state  create (const char *s, uint64_t seed) 
Create a new hash_state structure and initialize it based on the seed and the first 64byte chunk. More...  
static void  mix_32_bytes (const char *s, uint64_t &a, uint64_t &b) 
Mix 32bytes from the input sequence into the 16bytes of 'a' and 'b', including whatever is already in 'a' and 'b'. More...  
Public Attributes  
uint64_t  h0 = 0 
uint64_t  h1 = 0 
uint64_t  h2 = 0 
uint64_t  h3 = 0 
uint64_t  h4 = 0 
uint64_t  h5 = 0 
uint64_t  h6 = 0 
The intermediate state used during hashing.
Currently, the algorithm for computing hash codes is based on CityHash and keeps 56 bytes of arbitrary state.

inlinestatic 
Create a new hash_state structure and initialize it based on the seed and the first 64byte chunk.
This effectively performs the initial mix.
Definition at line 269 of file Hashing.h.
References h4, h5, h6, llvm::hashing::detail::hash_16_bytes(), llvm::hashing::detail::k1, mix(), llvm::hashing::detail::rotate(), s, and llvm::hashing::detail::shift_mix().
Referenced by llvm::hashing::detail::hash_combine_recursive_helper::combine_data(), and llvm::hashing::detail::hash_combine_range_impl().

inline 
Compute the final 64bit hash code value based on the current state and the length of bytes hashed.
Definition at line 310 of file Hashing.h.
References h0, h1, h2, h3, h4, h5, h6, llvm::hashing::detail::hash_16_bytes(), llvm::hashing::detail::k1, and llvm::hashing::detail::shift_mix().
Referenced by llvm::hashing::detail::hash_combine_recursive_helper::combine(), and llvm::hashing::detail::hash_combine_range_impl().

inline 
Mix in a 64byte buffer of data.
We mix all 64 bytes even when the chunk length is smaller, but we record the actual length.
Definition at line 293 of file Hashing.h.
References llvm::hashing::detail::fetch64(), h0, h1, h2, h3, h4, h5, h6, llvm::hashing::detail::k1, mix_32_bytes(), llvm::hashing::detail::rotate(), s, and std::swap().
Referenced by llvm::hashing::detail::hash_combine_recursive_helper::combine(), llvm::hashing::detail::hash_combine_recursive_helper::combine_data(), create(), and llvm::hashing::detail::hash_combine_range_impl().

inlinestatic 
Mix 32bytes from the input sequence into the 16bytes of 'a' and 'b', including whatever is already in 'a' and 'b'.
Definition at line 280 of file Hashing.h.
References b, c, d, llvm::hashing::detail::fetch64(), llvm::hashing::detail::rotate(), and s.
Referenced by mix().
uint64_t llvm::hashing::detail::hash_state::h0 = 0 
Definition at line 264 of file Hashing.h.
Referenced by finalize(), and mix().
uint64_t llvm::hashing::detail::hash_state::h1 = 0 
Definition at line 264 of file Hashing.h.
Referenced by finalize(), and mix().
uint64_t llvm::hashing::detail::hash_state::h2 = 0 
Definition at line 264 of file Hashing.h.
Referenced by finalize(), and mix().
uint64_t llvm::hashing::detail::hash_state::h3 = 0 
Definition at line 264 of file Hashing.h.
Referenced by finalize(), and mix().
uint64_t llvm::hashing::detail::hash_state::h4 = 0 
Definition at line 264 of file Hashing.h.
Referenced by create(), finalize(), and mix().
uint64_t llvm::hashing::detail::hash_state::h5 = 0 
Definition at line 264 of file Hashing.h.
Referenced by create(), finalize(), and mix().
uint64_t llvm::hashing::detail::hash_state::h6 = 0 
Definition at line 264 of file Hashing.h.
Referenced by create(), finalize(), and mix().