Classes | Macros | Typedefs | Enumerations | Functions | Variables
xxhash.c File Reference
#include "xxhash.h"
#include <stdlib.h>
#include <string.h>
Include dependency graph for xxhash.c:

Go to the source code of this file.

Classes

struct  _U32_S
 
struct  XXH_state32_t
 

Macros

#define _PACKED
 
#define A32(x)   (((U32_S *)(x))->v)
 
#define FORCE_INLINE   static inline
 
#define GCC_VERSION   (__GNUC__ * 100 + __GNUC_MINOR__)
 
#define PRIME32_1   2654435761U
 
#define PRIME32_2   2246822519U
 
#define PRIME32_3   3266489917U
 
#define PRIME32_4   668265263U
 
#define PRIME32_5   374761393U
 
#define XXH_CPU_LITTLE_ENDIAN   (*(char*)(&one))
 
#define XXH_FORCE_NATIVE_FORMAT   0
 
#define XXH_rotl32(x, r)   ((x << r) | (x >> (32 - r)))
 
#define XXH_STATIC_ASSERT(c)   { enum { XXH_static_assert = 1/(!!(c)) }; }
 

Typedefs

typedef unsigned char BYTE
 
typedef signed int S32
 
typedef unsigned short U16
 
typedef unsigned int U32
 
typedef struct _U32_S U32_S
 
typedef unsigned long long U64
 

Enumerations

enum  XXH_alignment { XXH_aligned, XXH_unaligned }
 
enum  XXH_endianess { XXH_bigEndian =0, XXH_littleEndian =1 }
 

Functions

U32 XXH32 (const void *input, int len, U32 seed)
 
U32 XXH32_digest (void *state_in)
 
FORCE_INLINE U32 XXH32_endian_align (const void *input, int len, U32 seed, XXH_endianess endian, XXH_alignment align)
 
void * XXH32_init (U32 seed)
 
U32 XXH32_intermediateDigest (void *state_in)
 
FORCE_INLINE U32 XXH32_intermediateDigest_endian (void *state_in, XXH_endianess endian)
 
XXH_errorcode XXH32_resetState (void *state_in, U32 seed)
 
int XXH32_sizeofState ()
 
XXH_errorcode XXH32_update (void *state_in, const void *input, int len)
 
FORCE_INLINE XXH_errorcode XXH32_update_endian (void *state_in, const void *input, int len, XXH_endianess endian)
 
FORCE_INLINE void XXH_free (void *p)
 
FORCE_INLINE void * XXH_malloc (size_t s)
 
FORCE_INLINE void * XXH_memcpy (void *dest, const void *src, size_t size)
 
FORCE_INLINE U32 XXH_readLE32 (const U32 *ptr, XXH_endianess endian)
 
FORCE_INLINE U32 XXH_readLE32_align (const U32 *ptr, XXH_endianess endian, XXH_alignment align)
 
static U32 XXH_swap32 (U32 x)
 

Variables

static const int one = 1
 

Macro Definition Documentation

#define _PACKED

Definition at line 116 of file xxhash.c.

#define A32 (   x)    (((U32_S *)(x))->v)

Definition at line 133 of file xxhash.c.

#define FORCE_INLINE   static inline

Definition at line 76 of file xxhash.c.

#define GCC_VERSION   (__GNUC__ * 100 + __GNUC_MINOR__)

Definition at line 139 of file xxhash.c.

#define PRIME32_1   2654435761U

Definition at line 164 of file xxhash.c.

#define PRIME32_2   2246822519U

Definition at line 165 of file xxhash.c.

#define PRIME32_3   3266489917U

Definition at line 166 of file xxhash.c.

#define PRIME32_4   668265263U

Definition at line 167 of file xxhash.c.

#define PRIME32_5   374761393U

Definition at line 168 of file xxhash.c.

#define XXH_CPU_LITTLE_ENDIAN   (*(char*)(&one))

Definition at line 177 of file xxhash.c.

#define XXH_FORCE_NATIVE_FORMAT   0

Definition at line 59 of file xxhash.c.

#define XXH_rotl32 (   x,
 
)    ((x << r) | (x >> (32 - r)))

Definition at line 145 of file xxhash.c.

#define XXH_STATIC_ASSERT (   c)    { enum { XXH_static_assert = 1/(!!(c)) }; }

Definition at line 184 of file xxhash.c.

Typedef Documentation

typedef unsigned char BYTE

Definition at line 106 of file xxhash.c.

typedef signed int S32

Definition at line 109 of file xxhash.c.

typedef unsigned short U16

Definition at line 107 of file xxhash.c.

typedef unsigned int U32

Definition at line 108 of file xxhash.c.

typedef struct _U32_S U32_S
typedef unsigned long long U64

Definition at line 110 of file xxhash.c.

Enumeration Type Documentation

Enumerator
XXH_aligned 
XXH_unaligned 

Definition at line 190 of file xxhash.c.

Enumerator
XXH_bigEndian 
XXH_littleEndian 

Definition at line 174 of file xxhash.c.

Function Documentation

U32 XXH32 ( const void *  input,
int  len,
unsigned int  seed 
)

XXH_NAMESPACE, aka Namespace Emulation :

If you want to include and expose xxHash functions from within your own library, but also want to avoid symbol collisions with other libraries which may also include xxHash,

you can use XXH_NAMESPACE, to automatically prefix any public symbol from xxhash library with the value of XXH_NAMESPACE (therefore, avoid NULL and numeric values).

Note that no change is required within the calling program as long as it includes xxhash.h : regular symbol name will be automatically translated by this header.

Definition at line 265 of file xxhash.c.

U32 XXH32_digest ( void *  state_in)

Definition at line 468 of file xxhash.c.

FORCE_INLINE U32 XXH32_endian_align ( const void *  input,
int  len,
U32  seed,
XXH_endianess  endian,
XXH_alignment  align 
)

Definition at line 206 of file xxhash.c.

void* XXH32_init ( U32  seed)

Definition at line 331 of file xxhash.c.

U32 XXH32_intermediateDigest ( void *  state_in)

Definition at line 457 of file xxhash.c.

FORCE_INLINE U32 XXH32_intermediateDigest_endian ( void *  state_in,
XXH_endianess  endian 
)

Definition at line 415 of file xxhash.c.

XXH_errorcode XXH32_resetState ( void *  state_in,
U32  seed 
)

Definition at line 317 of file xxhash.c.

int XXH32_sizeofState ( )

Definition at line 310 of file xxhash.c.

XXH_errorcode XXH32_update ( void *  state_in,
const void *  input,
int  len 
)

Definition at line 403 of file xxhash.c.

FORCE_INLINE XXH_errorcode XXH32_update_endian ( void *  state_in,
const void *  input,
int  len,
XXH_endianess  endian 
)

Definition at line 339 of file xxhash.c.

FORCE_INLINE void XXH_free ( void *  p)

Definition at line 89 of file xxhash.c.

FORCE_INLINE void* XXH_malloc ( size_t  s)

Definition at line 88 of file xxhash.c.

FORCE_INLINE void* XXH_memcpy ( void *  dest,
const void *  src,
size_t  size 
)

Definition at line 92 of file xxhash.c.

FORCE_INLINE U32 XXH_readLE32 ( const U32 ptr,
XXH_endianess  endian 
)

Definition at line 200 of file xxhash.c.

FORCE_INLINE U32 XXH_readLE32_align ( const U32 ptr,
XXH_endianess  endian,
XXH_alignment  align 
)

Definition at line 192 of file xxhash.c.

static U32 XXH_swap32 ( U32  x)
inlinestatic

Definition at line 153 of file xxhash.c.

Variable Documentation

const int one = 1
static

Definition at line 176 of file xxhash.c.



roslz4
Author(s): Ben Charrow
autogenerated on Sun Feb 3 2019 03:29:46