HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dataSourceHash.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 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_IMAGING_HD_DATASOURCE_HASH_H
8 #define PXR_IMAGING_HD_DATASOURCE_HASH_H
9 
10 #include "pxr/pxr.h"
11 
12 #include "pxr/imaging/hd/api.h"
14 
16 
17 using HdDataSourceHashType = size_t;
18 
19 /// Compute hash of a data source by using sampled from startTime to
20 /// endTime.
21 ///
22 /// Warning: this hash is not strong and is bad for fingerprinting
23 /// where the hash for two data sources being equal has to imply that
24 /// the two data sources have equal data with high probability.
25 /// The has is only 64bit and makes various performance tradeoffs
26 /// such that is suitable for a hashtable but not for fingerprinting.
27 ///
28 HD_API
30 HdDataSourceHash(HdDataSourceBaseHandle const &ds,
31  const HdSampledDataSource::Time startTime,
32  const HdSampledDataSource::Time endTime);
33 
35 
36 #endif
size_t HdDataSourceHashType
#define HD_API
Definition: api.h:23
HD_API HdDataSourceHashType HdDataSourceHash(HdDataSourceBaseHandle const &ds, const HdSampledDataSource::Time startTime, const HdSampledDataSource::Time endTime)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74