NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
city-hash.hpp File Reference
#include <stdlib.h>
#include <stdint.h>
#include <utility>
Include dependency graph for city-hash.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef uint8_t uint8
 
typedef uint32_t uint32
 
typedef uint64_t uint64
 
typedef std::pair< uint64, uint64uint128
 

Functions

uint64 Uint128Low64 (const uint128 &x)
 
uint64 Uint128High64 (const uint128 &x)
 
uint64 CityHash64 (const char *buf, size_t len)
 
uint64 CityHash64WithSeed (const char *buf, size_t len, uint64 seed)
 
uint64 CityHash64WithSeeds (const char *buf, size_t len, uint64 seed0, uint64 seed1)
 
uint128 CityHash128 (const char *s, size_t len)
 
uint128 CityHash128WithSeed (const char *s, size_t len, uint128 seed)
 
uint32 CityHash32 (const char *buf, size_t len)
 
uint64 Hash128to64 (const uint128 &x)
 

Typedef Documentation

◆ uint8

typedef uint8_t uint8

Definition at line 69 of file city-hash.hpp.

◆ uint32

typedef uint32_t uint32

Definition at line 70 of file city-hash.hpp.

◆ uint64

typedef uint64_t uint64

Definition at line 71 of file city-hash.hpp.

◆ uint128

typedef std::pair<uint64, uint64> uint128

Definition at line 72 of file city-hash.hpp.

Function Documentation

◆ Uint128Low64()

uint64 Uint128Low64 ( const uint128 x)
inline

Definition at line 74 of file city-hash.hpp.

Referenced by CityHash128WithSeed(), CityMurmur(), and Hash128to64().

◆ Uint128High64()

uint64 Uint128High64 ( const uint128 x)
inline

◆ CityHash64()

◆ CityHash64WithSeed()

uint64 CityHash64WithSeed ( const char *  buf,
size_t  len,
uint64  seed 
)

Definition at line 397 of file city-hash.cpp.

References CityHash64WithSeeds(), and k2.

Referenced by nfd::DeadNonceList::add(), and Uint128High64().

◆ CityHash64WithSeeds()

uint64 CityHash64WithSeeds ( const char *  buf,
size_t  len,
uint64  seed0,
uint64  seed1 
)

Definition at line 401 of file city-hash.cpp.

References CityHash64(), and HashLen16().

Referenced by CityHash64WithSeed(), and Uint128High64().

◆ CityHash128()

uint128 CityHash128 ( const char *  s,
size_t  len 
)

Definition at line 501 of file city-hash.cpp.

References CityHash128WithSeed(), Fetch64(), k0, and k1.

Referenced by Uint128High64().

◆ CityHash128WithSeed()

uint128 CityHash128WithSeed ( const char *  s,
size_t  len,
uint128  seed 
)

◆ CityHash32()

uint32 CityHash32 ( const char *  buf,
size_t  len 
)

◆ Hash128to64()

uint64 Hash128to64 ( const uint128 x)
inline

Definition at line 101 of file city-hash.hpp.

References Uint128High64(), and Uint128Low64().

Referenced by HashLen16().