IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::detail::murmur2_hash Namespace Reference

Classes

struct  mm2_x64_64

Functions

constexpr auto cexpr_murmur2_x64_64 (std::u8string_view key, ice::u64 seed) noexcept -> mm2_x64_64
constexpr auto cexpr_murmur2_x64_64 (std::string_view key, ice::u64 seed) noexcept -> mm2_x64_64
constexpr auto crotate (ice::u64 a) noexcept -> ice::u64
template<typename CharType>
constexpr auto cfinalize_h (CharType const *data, size_t key, ice::u64 h) noexcept -> ice::u64
template<typename CharType>
constexpr auto cfinalize (CharType const *data, size_t len, ice::u64 h) noexcept -> ice::u64
template<typename CharType>
constexpr auto cblock (CharType const *data, size_t offset=0) noexcept -> ice::u64
template<typename CharType>
constexpr auto cmix_h (CharType const *data, ice::u64 h, size_t offset) noexcept -> ice::u64
template<typename CharType>
constexpr auto cmix (CharType const *data, size_t len, ice::u64 h, size_t offset=0) noexcept -> ice::u64

Variables

constexpr ice::u64 m = 0xc6a4a7935bd1e995
constexpr ice::u32 r = 47

Detailed Description

Copyright 2022 - 2025, Dandielo dandi.nosp@m.elo@.nosp@m.icesh.nosp@m.ard..nosp@m.net SPDX-License-Identifier: MIT

The below code was taken from https://gist.github.com/Teknoman117/d4d952942b4314781432 It is used by the stringid_t type to calculate the hash value from the given string at compile time.

Function Documentation

◆ cblock()

template<typename CharType>
auto ice::detail::murmur2_hash::cblock ( CharType const * data,
size_t offset = 0 ) -> ice::u64
constexprnoexcept

◆ cexpr_murmur2_x64_64() [1/2]

auto ice::detail::murmur2_hash::cexpr_murmur2_x64_64 ( std::string_view key,
ice::u64 seed ) -> mm2_x64_64
constexprnoexcept

◆ cexpr_murmur2_x64_64() [2/2]

auto ice::detail::murmur2_hash::cexpr_murmur2_x64_64 ( std::u8string_view key,
ice::u64 seed ) -> mm2_x64_64
constexprnoexcept

◆ cfinalize()

template<typename CharType>
auto ice::detail::murmur2_hash::cfinalize ( CharType const * data,
size_t len,
ice::u64 h ) -> ice::u64
constexprnoexcept

◆ cfinalize_h()

template<typename CharType>
auto ice::detail::murmur2_hash::cfinalize_h ( CharType const * data,
size_t key,
ice::u64 h ) -> ice::u64
constexprnoexcept

◆ cmix()

template<typename CharType>
auto ice::detail::murmur2_hash::cmix ( CharType const * data,
size_t len,
ice::u64 h,
size_t offset = 0 ) -> ice::u64
constexprnoexcept

◆ cmix_h()

template<typename CharType>
auto ice::detail::murmur2_hash::cmix_h ( CharType const * data,
ice::u64 h,
size_t offset ) -> ice::u64
constexprnoexcept

◆ crotate()

auto ice::detail::murmur2_hash::crotate ( ice::u64 a) -> ice::u64
constexprnoexcept

Variable Documentation

◆ m

ice::u64 ice::detail::murmur2_hash::m = 0xc6a4a7935bd1e995
constexpr

◆ r

ice::u32 ice::detail::murmur2_hash::r = 47
constexpr