8#ifndef PXR_BASE_TRACE_STRING_HASH_H
9#define PXR_BASE_TRACE_STRING_HASH_H
15PXR_NAMESPACE_OPEN_SCOPE
29 static constexpr std::uint32_t
Hash(
const char (&str)[N]) {
30 return djb2HashStr<N-1>(str);
37 static constexpr std::uint32_t djb2HashStr(
const char* str) {
38 return (djb2HashStr<N-1>(str) * 33) ^ str[N-1];
44constexpr std::uint32_t TraceStringHash::djb2HashStr<0>(
const char* str) {
48PXR_NAMESPACE_CLOSE_SCOPE
This class provides a function to compute compile time hashes for string literals.
static constexpr std::uint32_t Hash(const char(&str)[N])
Computes a compile time hash of str.