Antkeeper
0.0.1
|
Hash functions. More...
Namespaces | |
literals | |
User-defined literals for compile-time string hashing. | |
types | |
Distinct hash value types for different hash algorithms. | |
Functions | |
template<std::unsigned_integral HashT, std::integral DataT> | |
constexpr HashT | fnv1a (std::span< const DataT > data, HashT offset, HashT prime) noexcept |
FNV-1a hash function. More... | |
template<std::integral DataT> | |
constexpr std::uint32_t | fnv1a32 (std::span< const DataT > data) noexcept |
32-bit FNV-1a hash function. More... | |
template<std::integral DataT> | |
constexpr std::uint64_t | fnv1a64 (std::span< const DataT > data) noexcept |
64-bit FNV-1a hash function. More... | |
Hash functions.
|
constexprnoexcept |
FNV-1a hash function.
HashT | Unsigned integral hash type. |
DataT | Data element type. |
data | Array of data to hash. |
offset | FNV offset basis value. |
prime | FNV prime value. |
@TODO reinterpret_cast
is not supported in consteval. C++23 has if consteval
which can selectively enable reinterpret_cast at runtime, and extract bytes manually at compile-time.
|
constexprnoexcept |
|
constexprnoexcept |