Warning: you were redirected to the latest documentation corresponding to your major release ( 2019.2.15.7667 ). Should you wish to access your specific version's documentation, please download the offline documentation from the Audiokinetic Launcher and check the Offline Documentation option in Wwise Authoring.
Go to the documentation of this file.
52 static inline unsigned int Bits() {
return 32;}
59 static inline unsigned int Bits() {
return 30;}
66 static inline unsigned int Bits() {
return 64;}
71 template <
class HashParams>
75 inline FNVHash(
typename HashParams::HashType in_uBase = HashParams::s_offsetBasis );
80 inline typename HashParams::HashType
Compute(
const void* in_pData,
typename HashParams::SizeType in_dataSize );
81 inline typename HashParams::HashType
Get()
const {
return m_uHash; }
84 inline typename HashParams::HashType
Compute(
const T& in_pData) {
return Compute(&in_pData,
sizeof(T)); }
87 typename HashParams::HashType m_uHash;
92 #pragma warning(disable:4127)
95 template <
class HashParams>
101 template <
class HashParams>
104 const unsigned char* pData = (
const unsigned char*) in_pData;
105 const unsigned char* pEnd = pData + in_dataSize;
107 typename HashParams::HashType hval = m_uHash;
110 while( pData < pEnd )
112 hval *= HashParams::Prime();
119 if( HashParams::Bits() >=
sizeof(
typename HashParams::HashType) * 8 )
122 typename HashParams::HashType mask =
static_cast<typename HashParams::HashType
>(((
typename HashParams::HashType)1 << HashParams::Bits())-1);
123 return (
typename HashParams::HashType)(hval >> HashParams::Bits()) ^ (hval & mask);
126 #if defined(_MSC_VER)
FNVHash< Hash32 > FNVHash32
static unsigned int Bits()
static unsigned int Bits()
static const HashType s_offsetBasis
FNVHash(typename HashParams::HashType in_uBase=HashParams::s_offsetBasis)
Constructor.
static const HashType s_offsetBasis
unsigned long long SizeType
HashParams::HashType Compute(const T &in_pData)
unsigned long long HashType
static unsigned int Bits()
FNVHash< Hash64 > FNVHash64
FNVHash< Hash30 > FNVHash30
HashParams::HashType Compute(const void *in_pData, typename HashParams::SizeType in_dataSize)
HashParams::HashType Get() const
Tell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise