struct hash_state
Declaration
struct hash_state { /* full declaration omitted */ };
Description
The intermediate state used during hashing. Currently, the algorithm for computing hash codes is based on CityHash and keeps 56 bytes of arbitrary state.
Declared at: llvm/include/llvm/ADT/Hashing.h:259
Member Variables
- public uint64_t h0 = 0
- public uint64_t h1 = 0
- public uint64_t h2 = 0
- public uint64_t h3 = 0
- public uint64_t h4 = 0
- public uint64_t h5 = 0
- public uint64_t h6 = 0
Method Overview
- public static llvm::hashing::detail::hash_state create(const char * s, uint64_t seed)
- public uint64_t finalize(size_t length)
- public void mix(const char * s)
- public static void mix_32_bytes(const char * s, uint64_t & a, uint64_t & b)
Methods
¶static llvm::hashing::detail::hash_state create(
const char* s,
uint64_t seed)
static llvm::hashing::detail::hash_state create(
const char* s,
uint64_t seed)
Description
Create a new hash_state structure and initialize it based on the seed and the first 64-byte chunk. This effectively performs the initial mix.
Declared at: llvm/include/llvm/ADT/Hashing.h:265
Parameters
- const char* s
- uint64_t seed
¶uint64_t finalize(size_t length)
uint64_t finalize(size_t length)
Description
Compute the final 64-bit hash code value based on the current state and the length of bytes hashed.
Declared at: llvm/include/llvm/ADT/Hashing.h:306
Parameters
- size_t length
¶void mix(const char* s)
void mix(const char* s)
Description
Mix in a 64-byte buffer of data. We mix all 64 bytes even when the chunk length is smaller, but we record the actual length.
Declared at: llvm/include/llvm/ADT/Hashing.h:289
Parameters
- const char* s
¶static void mix_32_bytes(const char* s,
uint64_t& a,
uint64_t& b)
static void mix_32_bytes(const char* s,
uint64_t& a,
uint64_t& b)
Description
Mix 32-bytes from the input sequence into the 16-bytes of 'a' and 'b', including whatever is already in 'a' and 'b'.
Declared at: llvm/include/llvm/ADT/Hashing.h:276
Parameters
- const char* s
- uint64_t& a
- uint64_t& b