59 template <Hash32or64 HashType = u
int32_t>
60 [[nodiscard]]
inline constexpr HashType
larson( HashType
hash, uint8_t ch )
noexcept;
72 template <Hash32or64 HashType = u
int32_t, u
int64_t FnvPrime = ( sizeof( HashType ) == 4 ? constants::FNV_PRIME_32 : constants::FNV_PRIME_64 )>
73 [[nodiscard]]
inline constexpr HashType
fnv1a( HashType
hash, uint8_t ch )
noexcept;
93 [[nodiscard]]
inline uint32_t
crc32c( uint32_t
hash, uint8_t ch )
noexcept;
106 [[nodiscard]]
inline constexpr uint32_t
crc32cSoft( uint32_t
hash, uint8_t ch )
noexcept;
126 template <Hash32or64 HashType = u
int32_t, u
int64_t MixConstant = constants::SEED_MIX_MULTIPLIER_64>
127 [[nodiscard]]
inline constexpr HashType
seedMix( HashType seed, HashType
hash, uint64_t size )
noexcept;
143 template <Hash32or64 HashType = u
int32_t>
144 [[nodiscard]]
inline constexpr HashType
combine( HashType existingHash, HashType newHash, HashType prime )
noexcept;
168 template <Hash32or64 HashType = u
int32_t>
169 [[nodiscard]]
inline constexpr HashType
combine( HashType existingHash, HashType newHash )
noexcept;
172#include "nfx/detail/hashing/Algorithms.inl"
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.
Mathematical constants for hash algorithms.
HashType hash(const T &value) noexcept
Hash a value with explicit type and hash size specification.
C++20 concepts and type traits for nfx-hashing library.