This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdint> | |
namespace detail | |
{ | |
// FNV-1a 32bit hashing algorithm. | |
constexpr std::uint32_t fnv1a_32(char const* s, std::size_t count) | |
{ | |
return ((count ? fnv1a_32(s, count - 1) : 2166136261u) ^ s[count]) * 16777619u; | |
} | |
} // namespace detail |