HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hash.h File Reference
#include "pxr/pxr.h"
#include "pxr/base/arch/api.h"
#include "pxr/base/arch/inttypes.h"
+ Include dependency graph for hash.h:

Go to the source code of this file.

Functions

PXR_NAMESPACE_OPEN_SCOPE
ARCH_API uint32_t 
ArchHash (const char *data, size_t len)
 
ARCH_API uint32_t ArchHash (const char *data, size_t len, uint32_t seed)
 
ARCH_API uint64_t ArchHash64 (const char *data, size_t len)
 
ARCH_API uint64_t ArchHash64 (const char *data, size_t len, uint64_t seed)
 

Detailed Description

Hash functions.

Definition in file hash.h.

Function Documentation

PXR_NAMESPACE_OPEN_SCOPE ARCH_API uint32_t ArchHash ( const char *  data,
size_t  len 
)

Hash len bytes of data.

To compute a hash value for data that is not contiguous in memory, iterate over all the contiguous blocks of memory and accumulate the hash value by passing it on as seed. Note that this is not equivalent to hashing the contiguous pieces as a whole. Support for that may be added in future.

ARCH_API uint32_t ArchHash ( const char *  data,
size_t  len,
uint32_t  seed 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

ARCH_API uint64_t ArchHash64 ( const char *  data,
size_t  len 
)

Hash len bytes of data.

To compute a hash value for data that is not contiguous in memory, iterate over all the contiguous blocks of memory and accumulate the hash value by passing it on as seed. Note that this is not equivalent to hashing the contiguous pieces as a whole. Support for that may be added in future.

ARCH_API uint64_t ArchHash64 ( const char *  data,
size_t  len,
uint64_t  seed 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.