HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
hash.h
Go to the documentation of this file.
1
//
2
// Copyright 2016 Pixar
3
//
4
// Licensed under the terms set forth in the LICENSE.txt file available at
5
// https://openusd.org/license.
6
//
7
#ifndef PXR_BASE_ARCH_HASH_H
8
#define PXR_BASE_ARCH_HASH_H
9
10
/// \file arch/hash.h
11
/// Hash functions.
12
13
#include "
pxr/pxr.h
"
14
#include "
pxr/base/arch/api.h
"
15
#include "
pxr/base/arch/inttypes.h
"
16
17
PXR_NAMESPACE_OPEN_SCOPE
18
19
/// Hash \a len bytes of \a data.
20
///
21
/// To compute a hash value for data that is not contiguous in memory, iterate
22
/// over all the contiguous blocks of memory and accumulate the hash value by
23
/// passing it on as \p seed. Note that this is *not* equivalent to hashing the
24
/// contiguous pieces as a whole. Support for that may be added in future.
25
///
26
ARCH_API
uint32_t
ArchHash
(
const
char
*
data
,
size_t
len);
27
/// \overload
28
ARCH_API
uint32_t
ArchHash
(
const
char
*
data
,
size_t
len, uint32_t seed);
29
30
/// Hash \a len bytes of \a data.
31
///
32
/// To compute a hash value for data that is not contiguous in memory, iterate
33
/// over all the contiguous blocks of memory and accumulate the hash value by
34
/// passing it on as \p seed. Note that this is *not* equivalent to hashing the
35
/// contiguous pieces as a whole. Support for that may be added in future.
36
///
37
ARCH_API
uint64_t
ArchHash64
(
const
char
*
data
,
size_t
len);
38
/// \overload
39
ARCH_API
uint64_t
ArchHash64
(
const
char
*
data
,
size_t
len, uint64_t seed);
40
41
PXR_NAMESPACE_CLOSE_SCOPE
42
43
#endif // PXR_BASE_ARCH_HASH_H
pxr.h
ArchHash64
ARCH_API uint64_t ArchHash64(const char *data, size_t len)
inttypes.h
PXR_NAMESPACE_OPEN_SCOPE
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition:
path.h:1425
api.h
PXR_NAMESPACE_CLOSE_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition:
pxr.h:74
ARCH_API
#define ARCH_API
Definition:
api.h:23
ArchHash
PXR_NAMESPACE_OPEN_SCOPE ARCH_API uint32_t ArchHash(const char *data, size_t len)
data
Definition:
format.h:1821
pxr
base
arch
hash.h
Generated on Wed Sep 3 2025 02:33:51 for HDK by
1.8.6