59 template <Hash32or64 HashType = u
int32_t>
60 [[nodiscard]]
inline constexpr HashType
larson( HashType
hash, uint8_t ch )
noexcept;
75 [[nodiscard]]
inline constexpr HashType
fnv1a( HashType
hash, uint8_t ch )
noexcept;
95 [[nodiscard]]
inline uint32_t
crc32c( uint32_t
hash, uint8_t ch )
noexcept;
108 [[nodiscard]]
inline constexpr uint32_t
crc32cSoft( uint32_t
hash, uint8_t ch )
noexcept;
128 template <Hash32or64 HashType = u
int32_t, u
int64_t MixConstant = constants::SEED_MIX_MULTIPLIER_64>
129 [[nodiscard]]
inline constexpr HashType
seedMix( HashType seed, HashType
hash, uint64_t size )
noexcept;
145 template <Hash32or64 HashType = u
int32_t>
146 [[nodiscard]]
inline constexpr HashType
combine( HashType existingHash, HashType newHash, HashType prime )
noexcept;
170 template <Hash32or64 HashType = u
int32_t>
171 [[nodiscard]]
inline constexpr HashType
combine( HashType existingHash, HashType newHash )
noexcept;
174#include "nfx/detail/hashing/Algorithms.inl"
HashType hash(const T &value) noexcept
Hash a value with explicit type and hash size specification.
Mathematical constants for hash algorithms.
constexpr uint32_t FNV_PRIME_32
FNV-1a 32-bit prime constant.
constexpr uint64_t FNV_PRIME_64
FNV-1a 64-bit prime constant.
constexpr HashType larson(HashType hash, uint8_t ch) noexcept
Larson multiplicative hash function: 37 * hash + ch.
constexpr HashType combine(HashType existingHash, HashType newHash, HashType prime) noexcept
Combines two hash values using FNV-1a mixing.
uint32_t crc32c(uint32_t hash, uint8_t ch) noexcept
Computes one step of the CRC32-C hash function with runtime hardware acceleration.
constexpr HashType fnv1a(HashType hash, uint8_t ch) noexcept
Computes one step of the FNV-1a hash function.
constexpr uint32_t crc32cSoft(uint32_t hash, uint8_t ch) noexcept
Software implementation of CRC32-C (Castagnoli) hash function.
constexpr HashType seedMix(HashType seed, HashType hash, uint64_t size) noexcept
Mixes a seed value with a hash using bit-mixing and multiplicative hashing.
C++20 concepts and type traits for nfx-hashing library.
Concept requiring type to be either uint32_t or uint64_t.