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

xxHash64 hashing functions for Parquet bloom filter support. More...

Namespaces

namespace  detail
 Implementation details – not part of the public API.
 

Functions

uint64_t hash64 (const void *data, size_t length, uint64_t seed=0)
 Compute xxHash64 of an arbitrary byte buffer.
 
uint64_t hash64 (const std::string &s, uint64_t seed=0)
 Convenience overload: hash a std::string.
 
template<typename T >
uint64_t hash64_value (const T &val, uint64_t seed=0)
 Convenience overload: hash a trivially-copyable typed value.
 

Detailed Description

xxHash64 hashing functions for Parquet bloom filter support.

Function Documentation

◆ hash64() [1/2]

uint64_t signet::forge::xxhash::hash64 ( const std::string &  s,
uint64_t  seed = 0 
)
inline

Convenience overload: hash a std::string.

Parameters
sThe string to hash.
seedHash seed (default 0).
Returns
64-bit hash value.

Definition at line 249 of file xxhash.hpp.

◆ hash64() [2/2]

uint64_t signet::forge::xxhash::hash64 ( const void *  data,
size_t  length,
uint64_t  seed = 0 
)
inline

Compute xxHash64 of an arbitrary byte buffer.

This is the primary entry point. For inputs >= 32 bytes, four parallel accumulators are used (Steps 1-3); for smaller inputs, a single accumulator seeded with PRIME5 is used. All remaining bytes are consumed in 8-byte, 4-byte, and 1-byte chunks before a final avalanche mix.

Parameters
dataPointer to input data (may be nullptr if length == 0).
lengthNumber of bytes to hash.
seedHash seed (default 0). Different seeds produce independent hashes.
Returns
64-bit hash value.

Definition at line 159 of file xxhash.hpp.

◆ hash64_value()

template<typename T >
uint64_t signet::forge::xxhash::hash64_value ( const T &  val,
uint64_t  seed = 0 
)
inline

Convenience overload: hash a trivially-copyable typed value.

Hashes sizeof(T) bytes of the value's object representation. This is suitable for primitive types (int32_t, int64_t, float, double, etc.).

Template Parameters
TA trivially-copyable type (enforced via static_assert).
Parameters
valThe value to hash.
seedHash seed (default 0).
Returns
64-bit hash value.

Definition at line 263 of file xxhash.hpp.