Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
DEMO
Loading...
Searching...
No Matches
signet::forge::xxhash::detail Namespace Reference

Implementation details – not part of the public API. More...

Functions

constexpr uint64_t rotl64 (uint64_t v, int r)
 Rotate v left by r bits (circular shift).
 
uint64_t read_u64_le (const uint8_t *p)
 Read a little-endian uint64_t from potentially unaligned memory.
 
uint32_t read_u32_le (const uint8_t *p)
 Read a little-endian uint32_t from potentially unaligned memory.
 
constexpr uint64_t round (uint64_t acc, uint64_t lane)
 Round function: accumulate one 8-byte lane into an accumulator.
 
constexpr uint64_t merge_accumulator (uint64_t acc, uint64_t v)
 Merge an accumulator value into the converged accumulator.
 
constexpr uint64_t avalanche (uint64_t h)
 Avalanche / finalization mix to ensure all output bits are well-distributed.
 

Detailed Description

Implementation details – not part of the public API.

Function Documentation

◆ avalanche()

constexpr uint64_t signet::forge::xxhash::detail::avalanche ( uint64_t  h)
inlineconstexpr

Avalanche / finalization mix to ensure all output bits are well-distributed.

Applies three rounds of xor-shift-multiply to diffuse entropy.

Parameters
hRaw hash accumulator before finalization.
Returns
Finalized 64-bit hash value.

Definition at line 133 of file xxhash.hpp.

◆ merge_accumulator()

constexpr uint64_t signet::forge::xxhash::detail::merge_accumulator ( uint64_t  acc,
uint64_t  v 
)
inlineconstexpr

Merge an accumulator value into the converged accumulator.

Computes: acc = (acc ^ round(0, v)) * PRIME1 + PRIME4

Parameters
accConverged accumulator (from the 4-lane rotation sum).
vOne of the four lane accumulators to merge.
Returns
Updated converged accumulator.

Definition at line 121 of file xxhash.hpp.

◆ read_u32_le()

uint32_t signet::forge::xxhash::detail::read_u32_le ( const uint8_t *  p)
inline

Read a little-endian uint32_t from potentially unaligned memory.

Parameters
pPointer to 4 bytes of data in little-endian byte order.
Returns
The decoded 32-bit value in host byte order.
Note
On big-endian platforms, a byte swap is applied automatically.

Definition at line 82 of file xxhash.hpp.

◆ read_u64_le()

uint64_t signet::forge::xxhash::detail::read_u64_le ( const uint8_t *  p)
inline

Read a little-endian uint64_t from potentially unaligned memory.

Parameters
pPointer to 8 bytes of data in little-endian byte order.
Returns
The decoded 64-bit value in host byte order.
Note
On big-endian platforms, a byte swap is applied automatically.

Definition at line 61 of file xxhash.hpp.

◆ rotl64()

constexpr uint64_t signet::forge::xxhash::detail::rotl64 ( uint64_t  v,
int  r 
)
inlineconstexpr

Rotate v left by r bits (circular shift).

Parameters
v64-bit value to rotate.
rNumber of bit positions to rotate (0-63).
Returns
Rotated value.

Definition at line 52 of file xxhash.hpp.

◆ round()

constexpr uint64_t signet::forge::xxhash::detail::round ( uint64_t  acc,
uint64_t  lane 
)
inlineconstexpr

Round function: accumulate one 8-byte lane into an accumulator.

Computes: acc = rotl(acc + lane * PRIME2, 31) * PRIME1

Parameters
accCurrent accumulator value.
lane64-bit data lane to fold in.
Returns
Updated accumulator.

Definition at line 107 of file xxhash.hpp.