nfx-hashing 0.1.2
Modern C++20 header-only hashing library with hardware acceleration
Loading...
Searching...
No Matches
Constants.h File Reference

Mathematical constants for hash algorithms. More...

#include <cstdint>
Include dependency graph for Constants.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Variables

constexpr uint32_t nfx::hashing::constants::FNV_OFFSET_BASIS_32 { 0x811C9DC5 }
 FNV-1a 32-bit offset basis constant.
constexpr uint32_t nfx::hashing::constants::FNV_PRIME_32 { 0x01000193 }
 FNV-1a 32-bit prime constant.
constexpr uint64_t nfx::hashing::constants::FNV_OFFSET_BASIS_64 { 0xCBF29CE484222325ULL }
 FNV-1a 64-bit offset basis constant.
constexpr uint64_t nfx::hashing::constants::FNV_PRIME_64 { 0x00000100000001B3ULL }
 FNV-1a 64-bit prime constant.
constexpr uint32_t nfx::hashing::constants::KNUTH_MULTIPLIER_32 { 0x45d9f3b }
 Knuth's multiplicative constant for 32-bit integer hashing.
constexpr uint64_t nfx::hashing::constants::WANG_MULTIPLIER_64_C1 { 0xbf58476d1ce4e5b9ull }
 Wang's first multiplicative constant for 64-bit integer hashing.
constexpr uint64_t nfx::hashing::constants::WANG_MULTIPLIER_64_C2 { 0x94d049bb133111ebull }
 Wang's second multiplicative constant for 64-bit integer hashing.
constexpr uint32_t nfx::hashing::constants::GOLDEN_RATIO_32 { 0x9e3779b9 }
 Golden ratio constant for 32-bit hash combining (φ = 2^32 / golden_ratio).
constexpr uint64_t nfx::hashing::constants::GOLDEN_RATIO_64 { 0x9e3779b97f4a7c15ULL }
 Golden ratio constant for 64-bit hash combining (φ = 2^64 / golden_ratio).
constexpr uint64_t nfx::hashing::constants::MURMUR3_MULTIPLIER_C1 { 0xff51afd7ed558ccdULL }
 MurmurHash3 first multiplicative constant for avalanche mixing.
constexpr uint64_t nfx::hashing::constants::MURMUR3_MULTIPLIER_C2 { 0xc4ceb9fe1a85ec53ULL }
 MurmurHash3 second multiplicative constant for avalanche mixing.
constexpr uint64_t nfx::hashing::constants::SEED_MIX_MULTIPLIER_64 { 0x2545F4914F6CDD1DUL }
 Multiplicative constant for seed mixing.

Detailed Description

Mathematical constants for hash algorithms.

Defines FNV-1a primes, integer hashing multipliers (Knuth/Wang), hash combining constants (golden ratio, MurmurHash3), and seed mixing parameters

Definition in file Constants.h.

Variable Documentation

◆ FNV_OFFSET_BASIS_32

uint32_t nfx::hashing::constants::FNV_OFFSET_BASIS_32 { 0x811C9DC5 }
inlineconstexpr

FNV-1a 32-bit offset basis constant.

Definition at line 47 of file Constants.h.

◆ FNV_OFFSET_BASIS_64

uint64_t nfx::hashing::constants::FNV_OFFSET_BASIS_64 { 0xCBF29CE484222325ULL }
inlineconstexpr

FNV-1a 64-bit offset basis constant.

Definition at line 53 of file Constants.h.

◆ FNV_PRIME_32

uint32_t nfx::hashing::constants::FNV_PRIME_32 { 0x01000193 }
inlineconstexpr

FNV-1a 32-bit prime constant.

Definition at line 50 of file Constants.h.

◆ FNV_PRIME_64

uint64_t nfx::hashing::constants::FNV_PRIME_64 { 0x00000100000001B3ULL }
inlineconstexpr

FNV-1a 64-bit prime constant.

Definition at line 56 of file Constants.h.

◆ GOLDEN_RATIO_32

uint32_t nfx::hashing::constants::GOLDEN_RATIO_32 { 0x9e3779b9 }
inlineconstexpr

Golden ratio constant for 32-bit hash combining (φ = 2^32 / golden_ratio).

Definition at line 76 of file Constants.h.

◆ GOLDEN_RATIO_64

uint64_t nfx::hashing::constants::GOLDEN_RATIO_64 { 0x9e3779b97f4a7c15ULL }
inlineconstexpr

Golden ratio constant for 64-bit hash combining (φ = 2^64 / golden_ratio).

Definition at line 79 of file Constants.h.

◆ KNUTH_MULTIPLIER_32

uint32_t nfx::hashing::constants::KNUTH_MULTIPLIER_32 { 0x45d9f3b }
inlineconstexpr

Knuth's multiplicative constant for 32-bit integer hashing.

Definition at line 63 of file Constants.h.

◆ MURMUR3_MULTIPLIER_C1

uint64_t nfx::hashing::constants::MURMUR3_MULTIPLIER_C1 { 0xff51afd7ed558ccdULL }
inlineconstexpr

MurmurHash3 first multiplicative constant for avalanche mixing.

Definition at line 82 of file Constants.h.

◆ MURMUR3_MULTIPLIER_C2

uint64_t nfx::hashing::constants::MURMUR3_MULTIPLIER_C2 { 0xc4ceb9fe1a85ec53ULL }
inlineconstexpr

MurmurHash3 second multiplicative constant for avalanche mixing.

Definition at line 85 of file Constants.h.

◆ SEED_MIX_MULTIPLIER_64

uint64_t nfx::hashing::constants::SEED_MIX_MULTIPLIER_64 { 0x2545F4914F6CDD1DUL }
inlineconstexpr

Multiplicative constant for seed mixing.

Definition at line 92 of file Constants.h.

◆ WANG_MULTIPLIER_64_C1

uint64_t nfx::hashing::constants::WANG_MULTIPLIER_64_C1 { 0xbf58476d1ce4e5b9ull }
inlineconstexpr

Wang's first multiplicative constant for 64-bit integer hashing.

Definition at line 66 of file Constants.h.

◆ WANG_MULTIPLIER_64_C2

uint64_t nfx::hashing::constants::WANG_MULTIPLIER_64_C2 { 0x94d049bb133111ebull }
inlineconstexpr

Wang's second multiplicative constant for 64-bit integer hashing.

Definition at line 69 of file Constants.h.