Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Functions
opencascade::FNVHash Namespace Reference

Implementation of FNV-1a with autodetect of sizeof(size_t). This function should work on unsigned char, otherwise it does not correctly implement the FNV-1a algorithm. The existing behaviour is retained for backwards compatibility. More...

Functions

uint32_t FNVHash1A (const void *theKey, int theLen, uint32_t theSeed) noexcept
 
uint64_t FNVHash64A (const void *theKey, int theLen, uint64_t theSeed) noexcept
 
template<typename T = size_t>
constexproptimalSeed () noexcept
 

Detailed Description

Implementation of FNV-1a with autodetect of sizeof(size_t). This function should work on unsigned char, otherwise it does not correctly implement the FNV-1a algorithm. The existing behaviour is retained for backwards compatibility.

The default value for the seed is optimal for general cases at a certain hash size.

Function Documentation

◆ FNVHash1A()

uint32_t opencascade::FNVHash::FNVHash1A ( const void * theKey,
int theLen,
uint32_t theSeed )
noexcept

◆ FNVHash64A()

uint64_t opencascade::FNVHash::FNVHash64A ( const void * theKey,
int theLen,
uint64_t theSeed )
noexcept

◆ optimalSeed()

template<typename T = size_t>
constexpr T opencascade::FNVHash::optimalSeed ( )
constexprnoexcept