NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Hash.hpp File Reference
#include "base/Math.hpp"
#include "base/String.hpp"

Go to the source code of this file.

Classes

class  FW::Set< T >
 
struct  FW::HashEntry< K, V >
 
class  FW::Hash< K, V >
 
struct  FW::GenericHashKey
 

Namespaces

 FW
 Scene class declarations.
 

Macros

#define FW_HASH_MAGIC   (0x9e3779b9u)
 
#define FW_JENKINS_MIX(a, b, c)
 

Functions

U32 FW::hashBits (U32 a, U32 b=FW_HASH_MAGIC, U32 c=0)
 
U32 FW::hashBits (U32 a, U32 b, U32 c, U32 d, U32 e=0, U32 f=0)
 
bool FW::equalsBuffer (const void *ptrA, const void *ptrB, int size)
 
bool FW::equalsBuffer (const void *ptrA, int sizeA, const void *ptrB, int sizeB)
 
U32 FW::hashBuffer (const void *ptr, int size)
 
U32 FW::hashBufferAlign (const void *ptr, int size)
 
template<class T >
bool FW::equalsArray (const T *ptrA, int sizeA, const T *ptrB, int sizeB)
 
template<class T >
U32 FW::hashArray (const T *ptr, int size)
 
template<class T >
bool FW::equals (const T &a, const T &b)
 
template<class T >
U32 FW::hash (const T &value)
 
template<>
bool FW::equalsArray< S8 > (const S8 *ptrA, int sizeA, const S8 *ptrB, int sizeB)
 
template<>
bool FW::equalsArray< U8 > (const U8 *ptrA, int sizeA, const U8 *ptrB, int sizeB)
 
template<>
bool FW::equalsArray< S16 > (const S16 *ptrA, int sizeA, const S16 *ptrB, int sizeB)
 
template<>
bool FW::equalsArray< U16 > (const U16 *ptrA, int sizeA, const U16 *ptrB, int sizeB)
 
template<>
bool FW::equalsArray< S32 > (const S32 *ptrA, int sizeA, const S32 *ptrB, int sizeB)
 
template<>
bool FW::equalsArray< U32 > (const U32 *ptrA, int sizeA, const U32 *ptrB, int sizeB)
 
template<>
bool FW::equalsArray< F32 > (const F32 *ptrA, int sizeA, const F32 *ptrB, int sizeB)
 
template<>
bool FW::equalsArray< S64 > (const S64 *ptrA, int sizeA, const S64 *ptrB, int sizeB)
 
template<>
bool FW::equalsArray< U64 > (const U64 *ptrA, int sizeA, const U64 *ptrB, int sizeB)
 
template<>
bool FW::equalsArray< F64 > (const F64 *ptrA, int sizeA, const F64 *ptrB, int sizeB)
 
template<>
U32 FW::hashArray< S8 > (const S8 *ptr, int size)
 
template<>
U32 FW::hashArray< U8 > (const U8 *ptr, int size)
 
template<>
U32 FW::hashArray< S16 > (const S16 *ptr, int size)
 
template<>
U32 FW::hashArray< U16 > (const U16 *ptr, int size)
 
template<>
U32 FW::hashArray< S32 > (const S32 *ptr, int size)
 
template<>
U32 FW::hashArray< U32 > (const U32 *ptr, int size)
 
template<>
U32 FW::hashArray< F32 > (const F32 *ptr, int size)
 
template<>
U32 FW::hashArray< S64 > (const S64 *ptr, int size)
 
template<>
U32 FW::hashArray< U64 > (const U64 *ptr, int size)
 
template<>
U32 FW::hashArray< F64 > (const F64 *ptr, int size)
 
template<>
bool FW::equals< S8 > (const S8 &a, const S8 &b)
 
template<>
bool FW::equals< U8 > (const U8 &a, const U8 &b)
 
template<>
bool FW::equals< S16 > (const S16 &a, const S16 &b)
 
template<>
bool FW::equals< U16 > (const U16 &a, const U16 &b)
 
template<>
bool FW::equals< S32 > (const S32 &a, const S32 &b)
 
template<>
bool FW::equals< U32 > (const U32 &a, const U32 &b)
 
template<>
bool FW::equals< F32 > (const F32 &a, const F32 &b)
 
template<>
bool FW::equals< S64 > (const S64 &a, const S64 &b)
 
template<>
bool FW::equals< U64 > (const U64 &a, const U64 &b)
 
template<>
bool FW::equals< F64 > (const F64 &a, const F64 &b)
 
template<>
U32 FW::hash< S8 > (const S8 &value)
 
template<>
U32 FW::hash< U8 > (const U8 &value)
 
template<>
U32 FW::hash< S16 > (const S16 &value)
 
template<>
U32 FW::hash< U16 > (const U16 &value)
 
template<>
U32 FW::hash< S32 > (const S32 &value)
 
template<>
U32 FW::hash< U32 > (const U32 &value)
 
template<>
U32 FW::hash< F32 > (const F32 &value)
 
template<>
U32 FW::hash< S64 > (const S64 &value)
 
template<>
U32 FW::hash< U64 > (const U64 &value)
 
template<>
U32 FW::hash< F64 > (const F64 &value)
 
template<>
bool FW::equals< Vec2i > (const Vec2i &a, const Vec2i &b)
 
template<>
bool FW::equals< Vec2f > (const Vec2f &a, const Vec2f &b)
 
template<>
bool FW::equals< Vec3i > (const Vec3i &a, const Vec3i &b)
 
template<>
bool FW::equals< Vec3f > (const Vec3f &a, const Vec3f &b)
 
template<>
bool FW::equals< Vec4i > (const Vec4i &a, const Vec4i &b)
 
template<>
bool FW::equals< Vec4f > (const Vec4f &a, const Vec4f &b)
 
template<>
bool FW::equals< Mat2f > (const Mat2f &a, const Mat2f &b)
 
template<>
bool FW::equals< Mat3f > (const Mat3f &a, const Mat3f &b)
 
template<>
bool FW::equals< Mat4f > (const Mat4f &a, const Mat4f &b)
 
template<>
bool FW::equals< String > (const String &a, const String &b)
 
template<>
U32 FW::hash< Vec2i > (const Vec2i &value)
 
template<>
U32 FW::hash< Vec2f > (const Vec2f &value)
 
template<>
U32 FW::hash< Vec3i > (const Vec3i &value)
 
template<>
U32 FW::hash< Vec3f > (const Vec3f &value)
 
template<>
U32 FW::hash< Vec4i > (const Vec4i &value)
 
template<>
U32 FW::hash< Vec4f > (const Vec4f &value)
 
template<>
U32 FW::hash< Mat2f > (const Mat2f &value)
 
template<>
U32 FW::hash< Mat3f > (const Mat3f &value)
 
template<>
U32 FW::hash< Mat4f > (const Mat4f &value)
 
template<>
U32 FW::hash< String > (const String &value)
 
template<class T , class TT >
bool FW::equals (TT *const &a, TT *const &b)
 
template<class T , class TT >
U32 FW::hash (TT *const &value)
 
template<class T , class K , class V >
bool FW::equals (const HashEntry< K, V > &a, const HashEntry< K, V > &b)
 
template<class T , class K , class V >
U32 FW::hash (const HashEntry< K, V > &value)
 
template<class T , class TT >
bool FW::equals (const Array< TT > &a, const Array< TT > &b)
 
template<class T , class TT >
U32 FW::hash (const Array< TT > &value)
 
template<>
bool FW::equals< GenericHashKey > (const GenericHashKey &a, const GenericHashKey &b)
 
template<>
U32 FW::hash< GenericHashKey > (const GenericHashKey &value)
 

Macro Definition Documentation

#define FW_HASH_MAGIC   (0x9e3779b9u)

Definition at line 169 of file Hash.hpp.

#define FW_JENKINS_MIX (   a,
  b,
 
)
Value:
a -= b; a -= c; a ^= (c>>13); \
b -= c; b -= a; b ^= (a<<8); \
c -= a; c -= b; c ^= (b>>13); \
a -= b; a -= c; a ^= (c>>12); \
b -= c; b -= a; b ^= (a<<16); \
c -= a; c -= b; c ^= (b>>5); \
a -= b; a -= c; a ^= (c>>3); \
b -= c; b -= a; b ^= (a<<10); \
c -= a; c -= b; c ^= (b>>15);

Definition at line 172 of file Hash.hpp.