Open CASCADE Technology 7.8.0
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)
 
uint64_t FNVHash64A (const void *theKey, int theLen, uint64_t theSeed)
 
template<typename T = size_t>
constexproptimalSeed ()
 

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 
)

◆ FNVHash64A()

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

◆ optimalSeed()

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