HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
farmhash.h File Reference
#include <OpenImageIO/hash.h>
#include <byteswap.h>
#include <algorithm>
+ Include dependency graph for farmhash.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 farmhash
 
 farmhash::inlined
 
 farmhash::farmhashna
 
 farmhash::farmhashuo
 
 farmhash::farmhashxo
 
 farmhash::farmhashte
 
 farmhash::farmhashnt
 
 farmhash::farmhashmk
 
 farmhash::farmhashsu
 
 farmhash::farmhashsa
 
 farmhash::farmhashcc
 

Macros

#define NAMESPACE_FOR_HASH_FUNCTIONS   OIIO::farmhash
 
#define FARMHASH_CAN_USE_CXX11   0
 
#define STATIC_INLINE   OIIO_HOSTDEVICE inline OIIO_CONSTEXPR14
 
#define FARMHASH_DIE_IF_MISCONFIGURED   do { *(char*)(len % 17) = 0; } while (0)
 
#define FARMHASH_UNKNOWN_ENDIAN   1
 
#define uint32_in_expected_order(x)   (x)
 
#define uint64_in_expected_order(x)   (x)
 
#define uint128_t   OIIO::farmhash::uint128_t
 
#define Uint128   OIIO::farmhash::Uint128
 
#define CopyUint128   OIIO::farmhash::CopyUint128
 
#define Uint128Low64   OIIO::farmhash::Uint128Low64
 
#define Uint128High64   OIIO::farmhash::Uint128High64
 
#define Hash128to64   OIIO::farmhash::Hash128to64
 
#define FARMHASH_DEBUG   0 /*OIIO addition to ensure no debug vs opt differences*/
 
#define debug_mode   0
 
#define x86_64   0
 
#define x86   x86_64
 
#define is_64bit   (x86_64 || (sizeof(void*) == 8))
 
#define can_use_ssse3   0
 
#define can_use_sse41   0
 
#define can_use_sse42   0
 
#define can_use_aesni   0
 
#define can_use_avx   0
 
#define PERMUTE3(a, b, c)   do { simpleSwap(a, b); simpleSwap(a, c); } while (0)
 
#define Fetch   farmhash::inlined::Fetch64
 
#define Rotate   farmhash::inlined::Rotate64
 
#define Bswap   farmhash::inlined::Bswap64
 
#define Fetch   inlined::Fetch64
 
#define Rotate   inlined::Rotate64
 
#define Fetch   inlined::Fetch64
 
#define Rotate   inlined::Rotate64
 
#define Fetch   inlined::Fetch32
 
#define Rotate   inlined::Rotate32
 
#define Bswap   inlined::Bswap32
 
#define fmix   farmhash::inlined::fmix
 
#define Fetch   inlined::Fetch32
 
#define Rotate   inlined::Rotate32
 
#define Bswap   inlined::Bswap32
 
#define fmix   farmhash::inlined::fmix
 
#define Fetch   farmhash::inlined::Fetch64
 
#define Rotate   inlined::Rotate64
 
#define Bswap   inlined::Bswap64
 
#define DebugTweak   farmhash::inlined::DebugTweak
 

Functions

template<typename T >
STATIC_INLINE void simpleSwap (T &a, T &b)
 
STATIC_INLINE uint64_t farmhash::inlined::Fetch64 (const char *p)
 
STATIC_INLINE uint32_t farmhash::inlined::Fetch32 (const char *p)
 
STATIC_INLINE uint32_t farmhash::inlined::Bswap32 (uint32_t val)
 
STATIC_INLINE uint64_t farmhash::inlined::Bswap64 (uint64_t val)
 
STATIC_INLINE uint32_t farmhash::inlined::BasicRotate32 (uint32_t val, int shift)
 
STATIC_INLINE uint64_t farmhash::inlined::BasicRotate64 (uint64_t val, int shift)
 
STATIC_INLINE uint32_t farmhash::inlined::Rotate32 (uint32_t val, int shift)
 
STATIC_INLINE uint64_t farmhash::inlined::Rotate64 (uint64_t val, int shift)
 
STATIC_INLINE uint32_t farmhash::inlined::fmix (uint32_t h)
 
STATIC_INLINE uint32_t farmhash::inlined::Mur (uint32_t a, uint32_t h)
 
template<typename T >
STATIC_INLINEfarmhash::inlined::DebugTweak (T x)
 
template<>
STATIC_INLINE uint128_t farmhash::inlined::DebugTweak (uint128_t x)
 
STATIC_INLINE uint64_t farmhash::farmhashna::ShiftMix (uint64_t val)
 
STATIC_INLINE uint64_t farmhash::farmhashna::HashLen16 (uint64_t u, uint64_t v)
 
STATIC_INLINE uint64_t farmhash::farmhashna::HashLen16 (uint64_t u, uint64_t v, uint64_t mul)
 
STATIC_INLINE uint64_t farmhash::farmhashna::HashLen0to16 (const char *s, size_t len)
 
STATIC_INLINE uint64_t farmhash::farmhashna::HashLen17to32 (const char *s, size_t len)
 
STATIC_INLINE pair< uint64_t,
uint64_t > 
farmhash::farmhashna::WeakHashLen32WithSeeds (uint64_t w, uint64_t x, uint64_t y, uint64_t z, uint64_t a, uint64_t b)
 
STATIC_INLINE pair< uint64_t,
uint64_t > 
farmhash::farmhashna::WeakHashLen32WithSeeds (const char *s, uint64_t a, uint64_t b)
 
STATIC_INLINE uint64_t farmhash::farmhashna::HashLen33to64 (const char *s, size_t len)
 
STATIC_INLINE uint64_t farmhash::farmhashna::Hash64 (const char *s, size_t len)
 
STATIC_INLINE uint64_t farmhash::farmhashna::Hash64WithSeeds (const char *s, size_t len, uint64_t seed0, uint64_t seed1)
 
STATIC_INLINE uint64_t farmhash::farmhashna::Hash64WithSeed (const char *s, size_t len, uint64_t seed)
 
STATIC_INLINE uint64_t farmhash::farmhashuo::H (uint64_t x, uint64_t y, uint64_t mul, int r)
 
STATIC_INLINE uint64_t farmhash::farmhashuo::Hash64WithSeeds (const char *s, size_t len, uint64_t seed0, uint64_t seed1)
 
STATIC_INLINE uint64_t farmhash::farmhashuo::Hash64WithSeed (const char *s, size_t len, uint64_t seed)
 
STATIC_INLINE uint64_t farmhash::farmhashuo::Hash64 (const char *s, size_t len)
 
STATIC_INLINE uint64_t farmhash::farmhashxo::H32 (const char *s, size_t len, uint64_t mul, uint64_t seed0=0, uint64_t seed1=0)
 
STATIC_INLINE uint64_t farmhash::farmhashxo::HashLen33to64 (const char *s, size_t len)
 
STATIC_INLINE uint64_t farmhash::farmhashxo::HashLen65to96 (const char *s, size_t len)
 
STATIC_INLINE uint64_t farmhash::farmhashxo::Hash64 (const char *s, size_t len)
 
STATIC_INLINE uint64_t farmhash::farmhashxo::Hash64WithSeeds (const char *s, size_t len, uint64_t seed0, uint64_t seed1)
 
STATIC_INLINE uint64_t farmhash::farmhashxo::Hash64WithSeed (const char *s, size_t len, uint64_t seed)
 
STATIC_INLINE uint64_t farmhash::farmhashte::Hash64 (const char *s, size_t len)
 
STATIC_INLINE uint64_t farmhash::farmhashte::Hash64WithSeed (const char *s, size_t len, uint64_t seed)
 
STATIC_INLINE uint64_t farmhash::farmhashte::Hash64WithSeeds (const char *s, size_t len, uint64_t seed0, uint64_t seed1)
 
STATIC_INLINE uint32_t farmhash::farmhashnt::Hash32 (const char *s, size_t len)
 
STATIC_INLINE uint32_t farmhash::farmhashnt::Hash32WithSeed (const char *s, size_t len, uint32_t seed)
 
STATIC_INLINE uint32_t farmhash::farmhashmk::Hash32Len13to24 (const char *s, size_t len, uint32_t seed=0)
 
STATIC_INLINE uint32_t farmhash::farmhashmk::Hash32Len0to4 (const char *s, size_t len, uint32_t seed=0)
 
STATIC_INLINE uint32_t farmhash::farmhashmk::Hash32Len5to12 (const char *s, size_t len, uint32_t seed=0)
 
STATIC_INLINE uint32_t farmhash::farmhashmk::Hash32 (const char *s, size_t len)
 
STATIC_INLINE uint32_t farmhash::farmhashmk::Hash32WithSeed (const char *s, size_t len, uint32_t seed)
 
STATIC_INLINE uint32_t farmhash::farmhashsu::Hash32 (const char *s, size_t len)
 
STATIC_INLINE uint32_t farmhash::farmhashsu::Hash32WithSeed (const char *s, size_t len, uint32_t seed)
 
STATIC_INLINE uint32_t farmhash::farmhashsa::Hash32 (const char *s, size_t len)
 
STATIC_INLINE uint32_t farmhash::farmhashsa::Hash32WithSeed (const char *s, size_t len, uint32_t seed)
 
STATIC_INLINE uint32_t farmhash::farmhashcc::Hash32Len13to24 (const char *s, size_t len)
 
STATIC_INLINE uint32_t farmhash::farmhashcc::Hash32Len0to4 (const char *s, size_t len)
 
STATIC_INLINE uint32_t farmhash::farmhashcc::Hash32Len5to12 (const char *s, size_t len)
 
STATIC_INLINE uint32_t farmhash::farmhashcc::Hash32 (const char *s, size_t len)
 
STATIC_INLINE uint32_t farmhash::farmhashcc::Hash32WithSeed (const char *s, size_t len, uint32_t seed)
 
STATIC_INLINE uint64_t farmhash::farmhashcc::ShiftMix (uint64_t val)
 
STATIC_INLINE uint64_t farmhash::farmhashcc::HashLen16 (uint64_t u, uint64_t v)
 
STATIC_INLINE uint64_t farmhash::farmhashcc::HashLen16 (uint64_t u, uint64_t v, uint64_t mul)
 
STATIC_INLINE uint64_t farmhash::farmhashcc::HashLen0to16 (const char *s, size_t len)
 
STATIC_INLINE pair< uint64_t,
uint64_t > 
farmhash::farmhashcc::WeakHashLen32WithSeeds (uint64_t w, uint64_t x, uint64_t y, uint64_t z, uint64_t a, uint64_t b)
 
STATIC_INLINE pair< uint64_t,
uint64_t > 
farmhash::farmhashcc::WeakHashLen32WithSeeds (const char *s, uint64_t a, uint64_t b)
 
STATIC_INLINE uint128_t farmhash::farmhashcc::CityMurmur (const char *s, size_t len, uint128_t seed)
 
STATIC_INLINE uint128_t farmhash::farmhashcc::CityHash128WithSeed (const char *s, size_t len, uint128_t seed)
 
STATIC_INLINE uint128_t farmhash::farmhashcc::CityHash128 (const char *s, size_t len)
 
uint128_t STATIC_INLINE farmhash::farmhashcc::Fingerprint128 (const char *s, size_t len)
 
STATIC_INLINE uint32_t farmhash::inlined::Hash32 (const char *s, size_t len)
 
STATIC_INLINE uint32_t farmhash::inlined::Hash32WithSeed (const char *s, size_t len, uint32_t seed)
 
STATIC_INLINE uint64_t farmhash::inlined::Hash64 (const char *s, size_t len)
 
STATIC_INLINE size_t farmhash::inlined::Hash (const char *s, size_t len)
 
STATIC_INLINE uint64_t farmhash::inlined::Hash64WithSeed (const char *s, size_t len, uint64_t seed)
 
STATIC_INLINE uint64_t farmhash::inlined::Hash64WithSeeds (const char *s, size_t len, uint64_t seed0, uint64_t seed1)
 
STATIC_INLINE uint128_t farmhash::inlined::Hash128 (const char *s, size_t len)
 
STATIC_INLINE uint128_t farmhash::inlined::Hash128WithSeed (const char *s, size_t len, uint128_t seed)
 
STATIC_INLINE uint32_t farmhash::inlined::Fingerprint32 (const char *s, size_t len)
 
STATIC_INLINE uint64_t farmhash::inlined::Fingerprint64 (const char *s, size_t len)
 
STATIC_INLINE uint128_t farmhash::inlined::Fingerprint128 (const char *s, size_t len)
 

Macro Definition Documentation

#define Bswap   farmhash::inlined::Bswap64

Definition at line 1813 of file farmhash.h.

#define Bswap   inlined::Bswap32

Definition at line 1813 of file farmhash.h.

#define Bswap   inlined::Bswap32

Definition at line 1813 of file farmhash.h.

#define Bswap   inlined::Bswap64

Definition at line 1813 of file farmhash.h.

#define can_use_aesni   0

Definition at line 406 of file farmhash.h.

#define can_use_avx   0

Definition at line 416 of file farmhash.h.

#define can_use_sse41   0

Definition at line 384 of file farmhash.h.

#define can_use_sse42   0

Definition at line 395 of file farmhash.h.

#define can_use_ssse3   0

Definition at line 373 of file farmhash.h.

#define CopyUint128   OIIO::farmhash::CopyUint128

Definition at line 214 of file farmhash.h.

#define debug_mode   0

Definition at line 342 of file farmhash.h.

#define DebugTweak   farmhash::inlined::DebugTweak

Definition at line 1816 of file farmhash.h.

#define FARMHASH_CAN_USE_CXX11   0

Definition at line 73 of file farmhash.h.

#define FARMHASH_DEBUG   0 /*OIIO addition to ensure no debug vs opt differences*/

Definition at line 332 of file farmhash.h.

#define FARMHASH_DIE_IF_MISCONFIGURED   do { *(char*)(len % 17) = 0; } while (0)

Definition at line 92 of file farmhash.h.

#define FARMHASH_UNKNOWN_ENDIAN   1

Definition at line 108 of file farmhash.h.

#define Fetch   farmhash::inlined::Fetch64

Definition at line 1807 of file farmhash.h.

#define Fetch   inlined::Fetch64

Definition at line 1807 of file farmhash.h.

#define Fetch   inlined::Fetch64

Definition at line 1807 of file farmhash.h.

#define Fetch   inlined::Fetch32

Definition at line 1807 of file farmhash.h.

#define Fetch   inlined::Fetch32

Definition at line 1807 of file farmhash.h.

#define Fetch   farmhash::inlined::Fetch64

Definition at line 1807 of file farmhash.h.

#define fmix   farmhash::inlined::fmix

Definition at line 1694 of file farmhash.h.

#define fmix   farmhash::inlined::fmix

Definition at line 1694 of file farmhash.h.

#define Hash128to64   OIIO::farmhash::Hash128to64

Definition at line 217 of file farmhash.h.

#define is_64bit   (x86_64 || (sizeof(void*) == 8))

Definition at line 362 of file farmhash.h.

#define NAMESPACE_FOR_HASH_FUNCTIONS   OIIO::farmhash

Definition at line 31 of file farmhash.h.

#define PERMUTE3 (   a,
  b,
 
)    do { simpleSwap(a, b); simpleSwap(a, c); } while (0)

Definition at line 450 of file farmhash.h.

#define Rotate   farmhash::inlined::Rotate64

Definition at line 1810 of file farmhash.h.

#define Rotate   inlined::Rotate64

Definition at line 1810 of file farmhash.h.

#define Rotate   inlined::Rotate64

Definition at line 1810 of file farmhash.h.

#define Rotate   inlined::Rotate32

Definition at line 1810 of file farmhash.h.

#define Rotate   inlined::Rotate32

Definition at line 1810 of file farmhash.h.

#define Rotate   inlined::Rotate64

Definition at line 1810 of file farmhash.h.

#define STATIC_INLINE   OIIO_HOSTDEVICE inline OIIO_CONSTEXPR14

Definition at line 84 of file farmhash.h.

#define Uint128   OIIO::farmhash::Uint128

Definition at line 213 of file farmhash.h.

#define uint128_t   OIIO::farmhash::uint128_t

Definition at line 202 of file farmhash.h.

#define Uint128High64   OIIO::farmhash::Uint128High64

Definition at line 216 of file farmhash.h.

#define Uint128Low64   OIIO::farmhash::Uint128Low64

Definition at line 215 of file farmhash.h.

#define uint32_in_expected_order (   x)    (x)

Definition at line 197 of file farmhash.h.

#define uint64_in_expected_order (   x)    (x)

Definition at line 198 of file farmhash.h.

#define x86   x86_64

Definition at line 358 of file farmhash.h.

#define x86_64   0

Definition at line 351 of file farmhash.h.

Function Documentation

template<typename T >
STATIC_INLINE void simpleSwap ( T &  a,
T &  b 
)

Definition at line 207 of file farmhash.h.