The intermediate state used during hashing.
More...
#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/Hashing.h>
|
void | mix (const char *s) |
| Mix in a 64-byte buffer of data. More...
|
|
uint64_t | finalize (size_t length) |
| Compute the final 64-bit hash code value based on the current state and the length of bytes hashed. More...
|
|
|
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 64-byte chunk. More...
|
|
static void | mix_32_bytes (const char *s, uint64_t &a, uint64_t &b) |
| Mix 32-bytes from the input sequence into the 16-bytes of 'a' and 'b', including whatever is already in 'a' and 'b'. More...
|
|
|
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.
◆ create()
static hash_state wpi::hashing::detail::hash_state::create |
( |
const char * |
s, |
|
|
uint64_t |
seed |
|
) |
| |
|
inlinestatic |
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.
◆ finalize()
uint64_t wpi::hashing::detail::hash_state::finalize |
( |
size_t |
length | ) |
|
|
inline |
Compute the final 64-bit hash code value based on the current state and the length of bytes hashed.
◆ mix()
void wpi::hashing::detail::hash_state::mix |
( |
const char * |
s | ) |
|
|
inline |
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.
◆ mix_32_bytes()
static void wpi::hashing::detail::hash_state::mix_32_bytes |
( |
const char * |
s, |
|
|
uint64_t & |
a, |
|
|
uint64_t & |
b |
|
) |
| |
|
inlinestatic |
Mix 32-bytes from the input sequence into the 16-bytes of 'a' and 'b', including whatever is already in 'a' and 'b'.
◆ h0
uint64_t wpi::hashing::detail::hash_state::h0 = 0 |
◆ h1
uint64_t wpi::hashing::detail::hash_state::h1 = 0 |
◆ h2
uint64_t wpi::hashing::detail::hash_state::h2 = 0 |
◆ h3
uint64_t wpi::hashing::detail::hash_state::h3 = 0 |
◆ h4
uint64_t wpi::hashing::detail::hash_state::h4 = 0 |
◆ h5
uint64_t wpi::hashing::detail::hash_state::h5 = 0 |
◆ h6
uint64_t wpi::hashing::detail::hash_state::h6 = 0 |
The documentation for this struct was generated from the following file:
- /home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/Hashing.h