/src/dawn/src/tint/utils/math/hash.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright 2021 The Tint Authors |
2 | | // |
3 | | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | | // you may not use this file except in compliance with the License. |
5 | | // You may obtain a copy of the License at |
6 | | // |
7 | | // http://www.apache.org/licenses/LICENSE-2.0 |
8 | | // |
9 | | // Unless required by applicable law or agreed to in writing, software |
10 | | // distributed under the License is distributed on an "AS IS" BASIS, |
11 | | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | | // See the License for the specific language governing permissions and |
13 | | // limitations under the License. |
14 | | |
15 | | #ifndef SRC_TINT_UTILS_MATH_HASH_H_ |
16 | | #define SRC_TINT_UTILS_MATH_HASH_H_ |
17 | | |
18 | | #include <stdint.h> |
19 | | #include <cstdio> |
20 | | #include <functional> |
21 | | #include <string> |
22 | | #include <tuple> |
23 | | #include <utility> |
24 | | #include <variant> |
25 | | #include <vector> |
26 | | |
27 | | #include "src/tint/utils/math/crc32.h" |
28 | | |
29 | | namespace tint { |
30 | | namespace detail { |
31 | | |
32 | | /// Helper for obtaining a seed bias value for HashCombine with a bit-width |
33 | | /// dependent on the size of size_t. |
34 | | template <int SIZE_OF_SIZE_T> |
35 | | struct HashCombineOffset {}; |
36 | | |
37 | | /// Specialization of HashCombineOffset for size_t == 4. |
38 | | template <> |
39 | | struct HashCombineOffset<4> { |
40 | | /// @returns the seed bias value for HashCombine() |
41 | 0 | static constexpr inline uint32_t value() { |
42 | 0 | constexpr uint32_t base = 0x7f4a7c16; |
43 | 0 | #ifdef TINT_HASH_SEED |
44 | 0 | return base ^ static_cast<uint32_t>(TINT_HASH_SEED); |
45 | 0 | #endif |
46 | 0 | return base; |
47 | 0 | } |
48 | | }; |
49 | | |
50 | | /// Specialization of HashCombineOffset for size_t == 8. |
51 | | template <> |
52 | | struct HashCombineOffset<8> { |
53 | | /// @returns the seed bias value for HashCombine() |
54 | 0 | static constexpr inline uint64_t value() { |
55 | 0 | constexpr uint64_t base = 0x9e3779b97f4a7c16; |
56 | 0 | #ifdef TINT_HASH_SEED |
57 | 0 | return base ^ static_cast<uint64_t>(TINT_HASH_SEED); |
58 | 0 | #endif |
59 | 0 | return base; |
60 | 0 | } |
61 | | }; |
62 | | |
63 | | template <typename T, typename = void> |
64 | | struct HasHashCodeMember : std::false_type {}; |
65 | | |
66 | | template <typename T> |
67 | | struct HasHashCodeMember< |
68 | | T, |
69 | | std::enable_if_t<std::is_member_function_pointer_v<decltype(&T::HashCode)>>> : std::true_type { |
70 | | }; |
71 | | |
72 | | } // namespace detail |
73 | | |
74 | | /// Forward declarations (see below) |
75 | | template <typename... ARGS> |
76 | | size_t Hash(const ARGS&... values); |
77 | | |
78 | | template <typename... ARGS> |
79 | | size_t HashCombine(size_t hash, const ARGS&... values); |
80 | | |
81 | | /// A STL-compatible hasher that does a more thorough job than most implementations of std::hash. |
82 | | /// Hasher has been optimized for a better quality hash at the expense of increased computation |
83 | | /// costs. |
84 | | /// Hasher is specialized for various core Tint data types. The default implementation will use a |
85 | | /// `size_t HashCode()` method on the `T` type, and will fallback to `std::hash<T>` if |
86 | | /// `T::HashCode` is missing. |
87 | | template <typename T> |
88 | | struct Hasher { |
89 | | /// @param value the value to hash |
90 | | /// @returns a hash of the value |
91 | 3.36G | size_t operator()(const T& value) const { |
92 | 3.36G | if constexpr (detail::HasHashCodeMember<T>::value) { |
93 | 3.35G | return value.HashCode(); |
94 | 3.35G | } else { |
95 | 3.35G | return std::hash<T>()(value); |
96 | 3.35G | } |
97 | 3.36G | } tint::Hasher<unsigned int>::operator()(unsigned int const&) const Line | Count | Source | 91 | 372M | size_t operator()(const T& value) const { | 92 | 372M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 372M | return value.HashCode(); | 94 | 372M | } else { | 95 | 372M | return std::hash<T>()(value); | 96 | 372M | } | 97 | 372M | } |
tint::Hasher<tint::BindingPoint>::operator()(tint::BindingPoint const&) const Line | Count | Source | 91 | 73.7k | size_t operator()(const T& value) const { | 92 | 73.7k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 73.7k | return value.HashCode(); | 94 | 73.7k | } else { | 95 | 73.7k | return std::hash<T>()(value); | 96 | 73.7k | } | 97 | 73.7k | } |
tint::Hasher<unsigned long>::operator()(unsigned long const&) const Line | Count | Source | 91 | 355M | size_t operator()(const T& value) const { | 92 | 355M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 355M | return value.HashCode(); | 94 | 355M | } else { | 95 | 355M | return std::hash<T>()(value); | 96 | 355M | } | 97 | 355M | } |
tint::Hasher<unsigned char>::operator()(unsigned char const&) const Line | Count | Source | 91 | 2.66M | size_t operator()(const T& value) const { | 92 | 2.66M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 2.66M | return value.HashCode(); | 94 | 2.66M | } else { | 95 | 2.66M | return std::hash<T>()(value); | 96 | 2.66M | } | 97 | 2.66M | } |
tint::Hasher<tint::wgsl::Extension>::operator()(tint::wgsl::Extension const&) const Line | Count | Source | 91 | 413k | size_t operator()(const T& value) const { | 92 | 413k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 413k | return value.HashCode(); | 94 | 413k | } else { | 95 | 413k | return std::hash<T>()(value); | 96 | 413k | } | 97 | 413k | } |
tint::Hasher<bool>::operator()(bool const&) const Line | Count | Source | 91 | 40.1M | size_t operator()(const T& value) const { | 92 | 40.1M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 40.1M | return value.HashCode(); | 94 | 40.1M | } else { | 95 | 40.1M | return std::hash<T>()(value); | 96 | 40.1M | } | 97 | 40.1M | } |
tint::Hasher<std::__1::basic_string_view<char, std::__1::char_traits<char> > >::operator()(std::__1::basic_string_view<char, std::__1::char_traits<char> > const&) const Line | Count | Source | 91 | 747M | size_t operator()(const T& value) const { | 92 | 747M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 747M | return value.HashCode(); | 94 | 747M | } else { | 95 | 747M | return std::hash<T>()(value); | 96 | 747M | } | 97 | 747M | } |
Unexecuted instantiation: tint::Hasher<tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::DataType>::operator()(tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::DataType const&) const Unexecuted instantiation: tint::Hasher<tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::Op>::operator()(tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::Op const&) const Unexecuted instantiation: tint::Hasher<tint::Vector<tint::sem::Parameter const*, 8ul> >::operator()(tint::Vector<tint::sem::Parameter const*, 8ul> const&) const Unexecuted instantiation: tint::Hasher<tint::EnumSet<tint::ast::PipelineStage> >::operator()(tint::EnumSet<tint::ast::PipelineStage> const&) const tint::Hasher<tint::wgsl::BuiltinFn>::operator()(tint::wgsl::BuiltinFn const&) const Line | Count | Source | 91 | 1.46M | size_t operator()(const T& value) const { | 92 | 1.46M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 1.46M | return value.HashCode(); | 94 | 1.46M | } else { | 95 | 1.46M | return std::hash<T>()(value); | 96 | 1.46M | } | 97 | 1.46M | } |
tint::Hasher<tint::Symbol>::operator()(tint::Symbol const&) const Line | Count | Source | 91 | 1.33G | size_t operator()(const T& value) const { | 92 | 1.33G | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 1.33G | return value.HashCode(); | 94 | 1.33G | } else { | 95 | 1.33G | return std::hash<T>()(value); | 96 | 1.33G | } | 97 | 1.33G | } |
tint::Hasher<tint::core::AddressSpace>::operator()(tint::core::AddressSpace const&) const Line | Count | Source | 91 | 74.2M | size_t operator()(const T& value) const { | 92 | 74.2M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 74.2M | return value.HashCode(); | 94 | 74.2M | } else { | 95 | 74.2M | return std::hash<T>()(value); | 96 | 74.2M | } | 97 | 74.2M | } |
tint::Hasher<tint::core::Access>::operator()(tint::core::Access const&) const Line | Count | Source | 91 | 69.9M | size_t operator()(const T& value) const { | 92 | 69.9M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 69.9M | return value.HashCode(); | 94 | 69.9M | } else { | 95 | 69.9M | return std::hash<T>()(value); | 96 | 69.9M | } | 97 | 69.9M | } |
tint::Hasher<tint::core::type::SamplerKind>::operator()(tint::core::type::SamplerKind const&) const Line | Count | Source | 91 | 51.7k | size_t operator()(const T& value) const { | 92 | 51.7k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 51.7k | return value.HashCode(); | 94 | 51.7k | } else { | 95 | 51.7k | return std::hash<T>()(value); | 96 | 51.7k | } | 97 | 51.7k | } |
tint::Hasher<tint::core::type::TextureDimension>::operator()(tint::core::type::TextureDimension const&) const Line | Count | Source | 91 | 68.7k | size_t operator()(const T& value) const { | 92 | 68.7k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 68.7k | return value.HashCode(); | 94 | 68.7k | } else { | 95 | 68.7k | return std::hash<T>()(value); | 96 | 68.7k | } | 97 | 68.7k | } |
tint::Hasher<tint::core::TexelFormat>::operator()(tint::core::TexelFormat const&) const Line | Count | Source | 91 | 34.3k | size_t operator()(const T& value) const { | 92 | 34.3k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 34.3k | return value.HashCode(); | 94 | 34.3k | } else { | 95 | 34.3k | return std::hash<T>()(value); | 96 | 34.3k | } | 97 | 34.3k | } |
tint::Hasher<tint::spirv::writer::ScalarConstant::Kind>::operator()(tint::spirv::writer::ScalarConstant::Kind const&) const Line | Count | Source | 91 | 692k | size_t operator()(const T& value) const { | 92 | 692k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 692k | return value.HashCode(); | 94 | 692k | } else { | 95 | 692k | return std::hash<T>()(value); | 96 | 692k | } | 97 | 692k | } |
tint::Hasher<float>::operator()(float const&) const Line | Count | Source | 91 | 48.3M | size_t operator()(const T& value) const { | 92 | 48.3M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 48.3M | return value.HashCode(); | 94 | 48.3M | } else { | 95 | 48.3M | return std::hash<T>()(value); | 96 | 48.3M | } | 97 | 48.3M | } |
tint::Hasher<tint::core::BinaryOp>::operator()(tint::core::BinaryOp const&) const Line | Count | Source | 91 | 764 | size_t operator()(const T& value) const { | 92 | 764 | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 764 | return value.HashCode(); | 94 | 764 | } else { | 95 | 764 | return std::hash<T>()(value); | 96 | 764 | } | 97 | 764 | } |
tint::Hasher<tint::core::BuiltinValue>::operator()(tint::core::BuiltinValue const&) const Line | Count | Source | 91 | 213k | size_t operator()(const T& value) const { | 92 | 213k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 213k | return value.HashCode(); | 94 | 213k | } else { | 95 | 213k | return std::hash<T>()(value); | 96 | 213k | } | 97 | 213k | } |
direct_variable_access.cc:tint::Hasher<tint::ast::transform::(anonymous namespace)::AccessShape>::operator()(tint::ast::transform::(anonymous namespace)::AccessShape const&) const Line | Count | Source | 91 | 2.28k | size_t operator()(const T& value) const { | 92 | 2.28k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 2.28k | return value.HashCode(); | 94 | 2.28k | } else { | 95 | 2.28k | return std::hash<T>()(value); | 96 | 2.28k | } | 97 | 2.28k | } |
direct_variable_access.cc:tint::Hasher<tint::ast::transform::(anonymous namespace)::AccessRoot>::operator()(tint::ast::transform::(anonymous namespace)::AccessRoot const&) const Line | Count | Source | 91 | 2.28k | size_t operator()(const T& value) const { | 92 | 2.28k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 2.28k | return value.HashCode(); | 94 | 2.28k | } else { | 95 | 2.28k | return std::hash<T>()(value); | 96 | 2.28k | } | 97 | 2.28k | } |
direct_variable_access.cc:tint::Hasher<tint::Vector<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex>, 8ul> >::operator()(tint::Vector<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex>, 8ul> const&) const Line | Count | Source | 91 | 2.28k | size_t operator()(const T& value) const { | 92 | 2.28k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 2.28k | return value.HashCode(); | 94 | 2.28k | } else { | 95 | 2.28k | return std::hash<T>()(value); | 96 | 2.28k | } | 97 | 2.28k | } |
direct_variable_access.cc:tint::Hasher<tint::ast::transform::(anonymous namespace)::DynamicIndex>::operator()(tint::ast::transform::(anonymous namespace)::DynamicIndex const&) const Line | Count | Source | 91 | 1.36k | size_t operator()(const T& value) const { | 92 | 1.36k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 1.36k | return value.HashCode(); | 94 | 1.36k | } else { | 95 | 1.36k | return std::hash<T>()(value); | 96 | 1.36k | } | 97 | 1.36k | } |
Unexecuted instantiation: std140.cc:tint::Hasher<tint::Vector<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> >, 8ul> >::operator()(tint::Vector<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> >, 8ul> const&) const Unexecuted instantiation: std140.cc:tint::Hasher<tint::ast::transform::(anonymous namespace)::UniformVariable>::operator()(tint::ast::transform::(anonymous namespace)::UniformVariable const&) const Unexecuted instantiation: tint::Hasher<tint::core::Number<unsigned int> >::operator()(tint::core::Number<unsigned int> const&) const Unexecuted instantiation: std140.cc:tint::Hasher<tint::ast::transform::(anonymous namespace)::DynamicIndex>::operator()(tint::ast::transform::(anonymous namespace)::DynamicIndex const&) const Unexecuted instantiation: tint::Hasher<tint::Vector<unsigned int, 4ul> >::operator()(tint::Vector<unsigned int, 4ul> const&) const tint::Hasher<tint::core::ParameterUsage>::operator()(tint::core::ParameterUsage const&) const Line | Count | Source | 91 | 4.39M | size_t operator()(const T& value) const { | 92 | 4.39M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 4.39M | return value.HashCode(); | 94 | 4.39M | } else { | 95 | 4.39M | return std::hash<T>()(value); | 96 | 4.39M | } | 97 | 4.39M | } |
tint::Hasher<tint::OverrideId>::operator()(tint::OverrideId const&) const Line | Count | Source | 91 | 20.2k | size_t operator()(const T& value) const { | 92 | 20.2k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 20.2k | return value.HashCode(); | 94 | 20.2k | } else { | 95 | 20.2k | return std::hash<T>()(value); | 96 | 20.2k | } | 97 | 20.2k | } |
tint::Hasher<tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> > >::operator()(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> > const&) const Line | Count | Source | 91 | 1.35M | size_t operator()(const T& value) const { | 92 | 1.35M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 1.35M | return value.HashCode(); | 94 | 1.35M | } else { | 95 | 1.35M | return std::hash<T>()(value); | 96 | 1.35M | } | 97 | 1.35M | } |
tint::Hasher<tint::core::EvaluationStage>::operator()(tint::core::EvaluationStage const&) const Line | Count | Source | 91 | 4.27M | size_t operator()(const T& value) const { | 92 | 4.27M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 4.27M | return value.HashCode(); | 94 | 4.27M | } else { | 95 | 4.27M | return std::hash<T>()(value); | 96 | 4.27M | } | 97 | 4.27M | } |
tint::Hasher<tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> > >::operator()(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> > const&) const Line | Count | Source | 91 | 2.98M | size_t operator()(const T& value) const { | 92 | 2.98M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 2.98M | return value.HashCode(); | 94 | 2.98M | } else { | 95 | 2.98M | return std::hash<T>()(value); | 96 | 2.98M | } | 97 | 2.98M | } |
tint::Hasher<tint::wgsl::CoreDiagnosticRule>::operator()(tint::wgsl::CoreDiagnosticRule const&) const Line | Count | Source | 91 | 890k | size_t operator()(const T& value) const { | 92 | 890k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 890k | return value.HashCode(); | 94 | 890k | } else { | 95 | 890k | return std::hash<T>()(value); | 96 | 890k | } | 97 | 890k | } |
tint::Hasher<tint::wgsl::ChromiumDiagnosticRule>::operator()(tint::wgsl::ChromiumDiagnosticRule const&) const Line | Count | Source | 91 | 1.37M | size_t operator()(const T& value) const { | 92 | 1.37M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 1.37M | return value.HashCode(); | 94 | 1.37M | } else { | 95 | 1.37M | return std::hash<T>()(value); | 96 | 1.37M | } | 97 | 1.37M | } |
tint::Hasher<tint::resolver::TypeAndAddressSpace>::operator()(tint::resolver::TypeAndAddressSpace const&) const Line | Count | Source | 91 | 4.33M | size_t operator()(const T& value) const { | 92 | 4.33M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 4.33M | return value.HashCode(); | 94 | 4.33M | } else { | 95 | 4.33M | return std::hash<T>()(value); | 96 | 4.33M | } | 97 | 4.33M | } |
tint::Hasher<long>::operator()(long const&) const Line | Count | Source | 91 | 91.0M | size_t operator()(const T& value) const { | 92 | 91.0M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 91.0M | return value.HashCode(); | 94 | 91.0M | } else { | 95 | 91.0M | return std::hash<T>()(value); | 96 | 91.0M | } | 97 | 91.0M | } |
Unexecuted instantiation: tint::Hasher<tint::Vector<tint::core::ir::Value*, 4ul> >::operator()(tint::Vector<tint::core::ir::Value*, 4ul> const&) const tint::Hasher<double>::operator()(double const&) const Line | Count | Source | 91 | 27.6k | size_t operator()(const T& value) const { | 92 | 27.6k | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 27.6k | return value.HashCode(); | 94 | 27.6k | } else { | 95 | 27.6k | return std::hash<T>()(value); | 96 | 27.6k | } | 97 | 27.6k | } |
tint::Hasher<int>::operator()(int const&) const Line | Count | Source | 91 | 198M | size_t operator()(const T& value) const { | 92 | 198M | if constexpr (detail::HasHashCodeMember<T>::value) { | 93 | 198M | return value.HashCode(); | 94 | 198M | } else { | 95 | 198M | return std::hash<T>()(value); | 96 | 198M | } | 97 | 198M | } |
|
98 | | }; |
99 | | |
100 | | /// Hasher specialization for pointers |
101 | | /// std::hash<T*> typically uses a reinterpret of the pointer to a size_t. |
102 | | /// As most pointers a 4 or 16 byte aligned, this usually results in the LSBs of the hash being 0, |
103 | | /// resulting in bad hashes for hashtables. This implementation mixes up those LSBs. |
104 | | template <typename T> |
105 | | struct Hasher<T*> { |
106 | | /// @param ptr the pointer to hash |
107 | | /// @returns a hash of the pointer |
108 | 3.03G | size_t operator()(T* ptr) const { |
109 | 3.03G | auto hash = std::hash<T*>()(ptr); |
110 | | #ifdef TINT_HASH_SEED |
111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); |
112 | | #endif |
113 | 3.03G | return hash ^ (hash >> 4); |
114 | 3.03G | } tint::Hasher<tint::core::ir::Instruction*>::operator()(tint::core::ir::Instruction*) const Line | Count | Source | 108 | 6.34M | size_t operator()(T* ptr) const { | 109 | 6.34M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 6.34M | return hash ^ (hash >> 4); | 114 | 6.34M | } |
tint::Hasher<tint::sem::Variable const*>::operator()(tint::sem::Variable const*) const Line | Count | Source | 108 | 106M | size_t operator()(T* ptr) const { | 109 | 106M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 106M | return hash ^ (hash >> 4); | 114 | 106M | } |
tint::Hasher<tint::core::type::Struct const*>::operator()(tint::core::type::Struct const*) const Line | Count | Source | 108 | 2.94M | size_t operator()(T* ptr) const { | 109 | 2.94M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 2.94M | return hash ^ (hash >> 4); | 114 | 2.94M | } |
tint::Hasher<tint::core::ir::Value*>::operator()(tint::core::ir::Value*) const Line | Count | Source | 108 | 12.0M | size_t operator()(T* ptr) const { | 109 | 12.0M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 12.0M | return hash ^ (hash >> 4); | 114 | 12.0M | } |
tint::Hasher<tint::core::type::Type const*>::operator()(tint::core::type::Type const*) const Line | Count | Source | 108 | 653M | size_t operator()(T* ptr) const { | 109 | 653M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 653M | return hash ^ (hash >> 4); | 114 | 653M | } |
tint::Hasher<tint::sem::Parameter const*>::operator()(tint::sem::Parameter const*) const Line | Count | Source | 108 | 10.4k | size_t operator()(T* ptr) const { | 109 | 10.4k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 10.4k | return hash ^ (hash >> 4); | 114 | 10.4k | } |
tint::Hasher<tint::ast::BlockStatement const*>::operator()(tint::ast::BlockStatement const*) const Line | Count | Source | 108 | 1.33k | size_t operator()(T* ptr) const { | 109 | 1.33k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 1.33k | return hash ^ (hash >> 4); | 114 | 1.33k | } |
tint::Hasher<void const*>::operator()(void const*) const Line | Count | Source | 108 | 138M | size_t operator()(T* ptr) const { | 109 | 138M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 138M | return hash ^ (hash >> 4); | 114 | 138M | } |
tint::Hasher<tint::ast::Node const*>::operator()(tint::ast::Node const*) const Line | Count | Source | 108 | 971M | size_t operator()(T* ptr) const { | 109 | 971M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 971M | return hash ^ (hash >> 4); | 114 | 971M | } |
tint::Hasher<tint::ast::SwitchStatement const*>::operator()(tint::ast::SwitchStatement const*) const Line | Count | Source | 108 | 111 | size_t operator()(T* ptr) const { | 109 | 111 | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 111 | return hash ^ (hash >> 4); | 114 | 111 | } |
tint::Hasher<tint::sem::LoopBlockStatement const*>::operator()(tint::sem::LoopBlockStatement const*) const Line | Count | Source | 108 | 30 | size_t operator()(T* ptr) const { | 109 | 30 | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 30 | return hash ^ (hash >> 4); | 114 | 30 | } |
Unexecuted instantiation: tint::Hasher<tint::sem::StructMember const*>::operator()(tint::sem::StructMember const*) const Unexecuted instantiation: tint::Hasher<tint::sem::Struct const*>::operator()(tint::sem::Struct const*) const tint::Hasher<tint::sem::Function const*>::operator()(tint::sem::Function const*) const Line | Count | Source | 108 | 1.50k | size_t operator()(T* ptr) const { | 109 | 1.50k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 1.50k | return hash ^ (hash >> 4); | 114 | 1.50k | } |
tint::Hasher<tint::sem::ValueExpression const*>::operator()(tint::sem::ValueExpression const*) const Line | Count | Source | 108 | 53.0k | size_t operator()(T* ptr) const { | 109 | 53.0k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 53.0k | return hash ^ (hash >> 4); | 114 | 53.0k | } |
tint::Hasher<tint::spirv::reader::ast_parser::Type const*>::operator()(tint::spirv::reader::ast_parser::Type const*) const Line | Count | Source | 108 | 20.3M | size_t operator()(T* ptr) const { | 109 | 20.3M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 20.3M | return hash ^ (hash >> 4); | 114 | 20.3M | } |
tint::Hasher<tint::core::type::StructMember const*>::operator()(tint::core::type::StructMember const*) const Line | Count | Source | 108 | 1.00M | size_t operator()(T* ptr) const { | 109 | 1.00M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 1.00M | return hash ^ (hash >> 4); | 114 | 1.00M | } |
tint::Hasher<tint::core::type::Matrix const*>::operator()(tint::core::type::Matrix const*) const Line | Count | Source | 108 | 3.14k | size_t operator()(T* ptr) const { | 109 | 3.14k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 3.14k | return hash ^ (hash >> 4); | 114 | 3.14k | } |
tint::Hasher<tint::core::constant::Value const*>::operator()(tint::core::constant::Value const*) const Line | Count | Source | 108 | 5.12M | size_t operator()(T* ptr) const { | 109 | 5.12M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 5.12M | return hash ^ (hash >> 4); | 114 | 5.12M | } |
tint::Hasher<tint::ast::Expression const*>::operator()(tint::ast::Expression const*) const Line | Count | Source | 108 | 275M | size_t operator()(T* ptr) const { | 109 | 275M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 275M | return hash ^ (hash >> 4); | 114 | 275M | } |
Unexecuted instantiation: tint::Hasher<tint::CastableBase*>::operator()(tint::CastableBase*) const tint::Hasher<tint::core::ir::Block*>::operator()(tint::core::ir::Block*) const Line | Count | Source | 108 | 28.3k | size_t operator()(T* ptr) const { | 109 | 28.3k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 28.3k | return hash ^ (hash >> 4); | 114 | 28.3k | } |
tint::Hasher<tint::core::ir::ControlInstruction*>::operator()(tint::core::ir::ControlInstruction*) const Line | Count | Source | 108 | 14.0k | size_t operator()(T* ptr) const { | 109 | 14.0k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 14.0k | return hash ^ (hash >> 4); | 114 | 14.0k | } |
tint::Hasher<tint::ast::Struct const*>::operator()(tint::ast::Struct const*) const Line | Count | Source | 108 | 4 | size_t operator()(T* ptr) const { | 109 | 4 | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 4 | return hash ^ (hash >> 4); | 114 | 4 | } |
tint::Hasher<tint::sem::BuiltinFn const*>::operator()(tint::sem::BuiltinFn const*) const Line | Count | Source | 108 | 922 | size_t operator()(T* ptr) const { | 109 | 922 | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 922 | return hash ^ (hash >> 4); | 114 | 922 | } |
tint::Hasher<tint::ast::BuiltinAttribute const*>::operator()(tint::ast::BuiltinAttribute const*) const Line | Count | Source | 108 | 26.4k | size_t operator()(T* ptr) const { | 109 | 26.4k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 26.4k | return hash ^ (hash >> 4); | 114 | 26.4k | } |
tint::Hasher<tint::sem::Call const*>::operator()(tint::sem::Call const*) const Line | Count | Source | 108 | 854 | size_t operator()(T* ptr) const { | 109 | 854 | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 854 | return hash ^ (hash >> 4); | 114 | 854 | } |
Unexecuted instantiation: tint::Hasher<tint::ast::IfStatement const*>::operator()(tint::ast::IfStatement const*) const Unexecuted instantiation: tint::Hasher<tint::sem::ForLoopStatement const*>::operator()(tint::sem::ForLoopStatement const*) const Unexecuted instantiation: tint::Hasher<tint::sem::WhileStatement const*>::operator()(tint::sem::WhileStatement const*) const Unexecuted instantiation: tint::Hasher<tint::sem::CallTarget const*>::operator()(tint::sem::CallTarget const*) const Unexecuted instantiation: tint::Hasher<tint::sem::GlobalVariable const*>::operator()(tint::sem::GlobalVariable const*) const tint::Hasher<tint::core::intrinsic::OverloadInfo const*>::operator()(tint::core::intrinsic::OverloadInfo const*) const Line | Count | Source | 108 | 6.30M | size_t operator()(T* ptr) const { | 109 | 6.30M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 6.30M | return hash ^ (hash >> 4); | 114 | 6.30M | } |
tint::Hasher<tint::core::type::Array const*>::operator()(tint::core::type::Array const*) const Line | Count | Source | 108 | 1.33M | size_t operator()(T* ptr) const { | 109 | 1.33M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 1.33M | return hash ^ (hash >> 4); | 114 | 1.33M | } |
tint::Hasher<tint::ast::Identifier const*>::operator()(tint::ast::Identifier const*) const Line | Count | Source | 108 | 641M | size_t operator()(T* ptr) const { | 109 | 641M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 641M | return hash ^ (hash >> 4); | 114 | 641M | } |
tint::Hasher<tint::ast::Function const*>::operator()(tint::ast::Function const*) const Line | Count | Source | 108 | 2.39M | size_t operator()(T* ptr) const { | 109 | 2.39M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 2.39M | return hash ^ (hash >> 4); | 114 | 2.39M | } |
tint::Hasher<tint::sem::Statement const*>::operator()(tint::sem::Statement const*) const Line | Count | Source | 108 | 593k | size_t operator()(T* ptr) const { | 109 | 593k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 593k | return hash ^ (hash >> 4); | 114 | 593k | } |
tint::Hasher<tint::TypeInfo const*>::operator()(tint::TypeInfo const*) const Line | Count | Source | 108 | 41.9M | size_t operator()(T* ptr) const { | 109 | 41.9M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 41.9M | return hash ^ (hash >> 4); | 114 | 41.9M | } |
dependency_graph.cc:tint::Hasher<tint::resolver::(anonymous namespace)::Global const*>::operator()(tint::resolver::(anonymous namespace)::Global const*) const Line | Count | Source | 108 | 144M | size_t operator()(T* ptr) const { | 109 | 144M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 144M | return hash ^ (hash >> 4); | 114 | 144M | } |
tint::Hasher<tint::ast::Variable const*>::operator()(tint::ast::Variable const*) const Line | Count | Source | 108 | 2.62k | size_t operator()(T* ptr) const { | 109 | 2.62k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 2.62k | return hash ^ (hash >> 4); | 114 | 2.62k | } |
tint::Hasher<tint::core::ir::Function*>::operator()(tint::core::ir::Function*) const Line | Count | Source | 108 | 9.85k | size_t operator()(T* ptr) const { | 109 | 9.85k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 9.85k | return hash ^ (hash >> 4); | 114 | 9.85k | } |
tint::Hasher<tint::core::ir::Var*>::operator()(tint::core::ir::Var*) const Line | Count | Source | 108 | 1.67k | size_t operator()(T* ptr) const { | 109 | 1.67k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 1.67k | return hash ^ (hash >> 4); | 114 | 1.67k | } |
tint::Hasher<tint::core::ir::Exit*>::operator()(tint::core::ir::Exit*) const Line | Count | Source | 108 | 8.43k | size_t operator()(T* ptr) const { | 109 | 8.43k | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 8.43k | return hash ^ (hash >> 4); | 114 | 8.43k | } |
Unexecuted instantiation: tint::Hasher<tint::core::ir::If*>::operator()(tint::core::ir::If*) const Unexecuted instantiation: tint::Hasher<tint::core::ir::Loop*>::operator()(tint::core::ir::Loop*) const Unexecuted instantiation: tint::Hasher<tint::core::ir::Switch*>::operator()(tint::core::ir::Switch*) const tint::Hasher<tint::core::type::ArrayCount const*>::operator()(tint::core::type::ArrayCount const*) const Line | Count | Source | 108 | 3.82M | size_t operator()(T* ptr) const { | 109 | 3.82M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 3.82M | return hash ^ (hash >> 4); | 114 | 3.82M | } |
tint::Hasher<tint::core::type::Vector const*>::operator()(tint::core::type::Vector const*) const Line | Count | Source | 108 | 3.78M | size_t operator()(T* ptr) const { | 109 | 3.78M | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 3.78M | return hash ^ (hash >> 4); | 114 | 3.78M | } |
tint::Hasher<char const*>::operator()(char const*) const Line | Count | Source | 108 | 996 | size_t operator()(T* ptr) const { | 109 | 996 | auto hash = std::hash<T*>()(ptr); | 110 | | #ifdef TINT_HASH_SEED | 111 | | hash ^= static_cast<uint32_t>(TINT_HASH_SEED); | 112 | | #endif | 113 | 996 | return hash ^ (hash >> 4); | 114 | 996 | } |
|
115 | | }; |
116 | | |
117 | | /// Hasher specialization for std::vector |
118 | | template <typename T> |
119 | | struct Hasher<std::vector<T>> { |
120 | | /// @param vector the vector to hash |
121 | | /// @returns a hash of the vector |
122 | 58.6k | size_t operator()(const std::vector<T>& vector) const { |
123 | 58.6k | auto hash = Hash(vector.size()); |
124 | 540k | for (auto& el : vector) { |
125 | 540k | hash = HashCombine(hash, el); |
126 | 540k | } |
127 | 58.6k | return hash; |
128 | 58.6k | } Unexecuted instantiation: tint::Hasher<std::__1::vector<unsigned int, std::__1::allocator<unsigned int> > >::operator()(std::__1::vector<unsigned int, std::__1::allocator<unsigned int> > const&) const tint::Hasher<std::__1::vector<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > >::operator()(std::__1::vector<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&) const Line | Count | Source | 122 | 58.6k | size_t operator()(const std::vector<T>& vector) const { | 123 | 58.6k | auto hash = Hash(vector.size()); | 124 | 540k | for (auto& el : vector) { | 125 | 540k | hash = HashCombine(hash, el); | 126 | 540k | } | 127 | 58.6k | return hash; | 128 | 58.6k | } |
Unexecuted instantiation: tint::Hasher<std::__1::vector<tint::core::type::Type const*, std::__1::allocator<tint::core::type::Type const*> > >::operator()(std::__1::vector<tint::core::type::Type const*, std::__1::allocator<tint::core::type::Type const*> > const&) const |
129 | | }; |
130 | | |
131 | | /// Hasher specialization for std::tuple |
132 | | template <typename... TYPES> |
133 | | struct Hasher<std::tuple<TYPES...>> { |
134 | | /// @param tuple the tuple to hash |
135 | | /// @returns a hash of the tuple |
136 | 4.27M | size_t operator()(const std::tuple<TYPES...>& tuple) const { |
137 | 4.27M | return std::apply(Hash<TYPES...>, tuple); |
138 | 4.27M | } Unexecuted instantiation: tint::Hasher<std::__1::tuple<tint::core::type::Type const*, tint::core::type::Type const*> >::operator()(std::__1::tuple<tint::core::type::Type const*, tint::core::type::Type const*> const&) const tint::Hasher<std::__1::tuple<tint::core::AddressSpace, tint::core::type::Struct const*> >::operator()(std::__1::tuple<tint::core::AddressSpace, tint::core::type::Struct const*> const&) const Line | Count | Source | 136 | 96 | size_t operator()(const std::tuple<TYPES...>& tuple) const { | 137 | 96 | return std::apply(Hash<TYPES...>, tuple); | 138 | 96 | } |
Unexecuted instantiation: tint::Hasher<std::__1::tuple<tint::core::type::Matrix const*, tint::core::type::Matrix const*> >::operator()(std::__1::tuple<tint::core::type::Matrix const*, tint::core::type::Matrix const*> const&) const tint::Hasher<std::__1::tuple<tint::core::BinaryOp, tint::core::type::Type const*, tint::core::type::Type const*> >::operator()(std::__1::tuple<tint::core::BinaryOp, tint::core::type::Type const*, tint::core::type::Type const*> const&) const Line | Count | Source | 136 | 764 | size_t operator()(const std::tuple<TYPES...>& tuple) const { | 137 | 764 | return std::apply(Hash<TYPES...>, tuple); | 138 | 764 | } |
tint::Hasher<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> >::operator()(std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> const&) const Line | Count | Source | 136 | 1.33M | size_t operator()(const std::tuple<TYPES...>& tuple) const { | 137 | 1.33M | return std::apply(Hash<TYPES...>, tuple); | 138 | 1.33M | } |
tint::Hasher<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> >::operator()(std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> const&) const Line | Count | Source | 136 | 2.94M | size_t operator()(const std::tuple<TYPES...>& tuple) const { | 137 | 2.94M | return std::apply(Hash<TYPES...>, tuple); | 138 | 2.94M | } |
|
139 | | }; |
140 | | |
141 | | /// Hasher specialization for std::pair |
142 | | template <typename A, typename B> |
143 | | struct Hasher<std::pair<A, B>> { |
144 | | /// @param tuple the tuple to hash |
145 | | /// @returns a hash of the tuple |
146 | 122M | size_t operator()(const std::pair<A, B>& tuple) const { return std::apply(Hash<A, B>, tuple); } tint::Hasher<std::__1::pair<tint::core::intrinsic::Overload, tint::wgsl::BuiltinFn> >::operator()(std::__1::pair<tint::core::intrinsic::Overload, tint::wgsl::BuiltinFn> const&) const Line | Count | Source | 146 | 1.46M | size_t operator()(const std::pair<A, B>& tuple) const { return std::apply(Hash<A, B>, tuple); } |
tint::Hasher<std::__1::pair<unsigned int, unsigned int> >::operator()(std::__1::pair<unsigned int, unsigned int> const&) const Line | Count | Source | 146 | 121M | size_t operator()(const std::pair<A, B>& tuple) const { return std::apply(Hash<A, B>, tuple); } |
Unexecuted instantiation: tint::Hasher<std::__1::pair<tint::Symbol, tint::Symbol> >::operator()(std::__1::pair<tint::Symbol, tint::Symbol> const&) const |
147 | | }; |
148 | | |
149 | | /// Hasher specialization for std::variant |
150 | | template <typename... TYPES> |
151 | | struct Hasher<std::variant<TYPES...>> { |
152 | | /// @param variant the variant to hash |
153 | | /// @returns a hash of the tuple |
154 | 2.80M | size_t operator()(const std::variant<TYPES...>& variant) const { |
155 | 2.80M | return std::visit([](auto&& val) { return Hash(val); }, variant); auto tint::Hasher<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::operator()(std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) const::{lambda(auto:1&&)#1}::operator()<unsigned int const&>(unsigned int const&) const Line | Count | Source | 155 | 540k | return std::visit([](auto&& val) { return Hash(val); }, variant); |
Unexecuted instantiation: auto tint::Hasher<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::operator()(std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) const::{lambda(auto:1&&)#1}::operator()<float const&>(float const&) const Unexecuted instantiation: auto tint::Hasher<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::operator()(std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) const::{lambda(auto:1&&)#1}::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const direct_variable_access.cc:auto tint::Hasher<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex> >::operator()(std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex> const&) const::{lambda(auto:1&&)#1}::operator()<tint::Symbol const&>(tint::Symbol const&) const Line | Count | Source | 155 | 1.81k | return std::visit([](auto&& val) { return Hash(val); }, variant); |
direct_variable_access.cc:auto tint::Hasher<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex> >::operator()(std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex> const&) const::{lambda(auto:1&&)#1}::operator()<tint::ast::transform::(anonymous namespace)::DynamicIndex const&>(tint::ast::transform::(anonymous namespace)::DynamicIndex const&) const Line | Count | Source | 155 | 1.36k | return std::visit([](auto&& val) { return Hash(val); }, variant); |
Unexecuted instantiation: std140.cc:auto tint::Hasher<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > >::operator()(std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > const&) const::{lambda(auto:1&&)#1}::operator()<tint::ast::transform::(anonymous namespace)::UniformVariable const&>(tint::ast::transform::(anonymous namespace)::UniformVariable const&) const Unexecuted instantiation: std140.cc:auto tint::Hasher<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > >::operator()(std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > const&) const::{lambda(auto:1&&)#1}::operator()<tint::core::Number<unsigned int> const&>(tint::core::Number<unsigned int> const&) const Unexecuted instantiation: std140.cc:auto tint::Hasher<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > >::operator()(std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > const&) const::{lambda(auto:1&&)#1}::operator()<tint::ast::transform::(anonymous namespace)::DynamicIndex const&>(tint::ast::transform::(anonymous namespace)::DynamicIndex const&) const Unexecuted instantiation: std140.cc:auto tint::Hasher<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > >::operator()(std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > const&) const::{lambda(auto:1&&)#1}::operator()<tint::Vector<unsigned int, 4ul> const&>(tint::Vector<unsigned int, 4ul> const&) const auto tint::Hasher<std::__1::variant<tint::wgsl::CoreDiagnosticRule, tint::wgsl::ChromiumDiagnosticRule> >::operator()(std::__1::variant<tint::wgsl::CoreDiagnosticRule, tint::wgsl::ChromiumDiagnosticRule> const&) const::{lambda(auto:1&&)#1}::operator()<tint::wgsl::CoreDiagnosticRule const&>(tint::wgsl::CoreDiagnosticRule const&) const Line | Count | Source | 155 | 890k | return std::visit([](auto&& val) { return Hash(val); }, variant); |
auto tint::Hasher<std::__1::variant<tint::wgsl::CoreDiagnosticRule, tint::wgsl::ChromiumDiagnosticRule> >::operator()(std::__1::variant<tint::wgsl::CoreDiagnosticRule, tint::wgsl::ChromiumDiagnosticRule> const&) const::{lambda(auto:1&&)#1}::operator()<tint::wgsl::ChromiumDiagnosticRule const&>(tint::wgsl::ChromiumDiagnosticRule const&) const Line | Count | Source | 155 | 1.37M | return std::visit([](auto&& val) { return Hash(val); }, variant); |
|
156 | 2.80M | } tint::Hasher<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::operator()(std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) const Line | Count | Source | 154 | 540k | size_t operator()(const std::variant<TYPES...>& variant) const { | 155 | 540k | return std::visit([](auto&& val) { return Hash(val); }, variant); | 156 | 540k | } |
direct_variable_access.cc:tint::Hasher<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex> >::operator()(std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex> const&) const Line | Count | Source | 154 | 3.17k | size_t operator()(const std::variant<TYPES...>& variant) const { | 155 | 3.17k | return std::visit([](auto&& val) { return Hash(val); }, variant); | 156 | 3.17k | } |
Unexecuted instantiation: std140.cc:tint::Hasher<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > >::operator()(std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > const&) const tint::Hasher<std::__1::variant<tint::wgsl::CoreDiagnosticRule, tint::wgsl::ChromiumDiagnosticRule> >::operator()(std::__1::variant<tint::wgsl::CoreDiagnosticRule, tint::wgsl::ChromiumDiagnosticRule> const&) const Line | Count | Source | 154 | 2.26M | size_t operator()(const std::variant<TYPES...>& variant) const { | 155 | 2.26M | return std::visit([](auto&& val) { return Hash(val); }, variant); | 156 | 2.26M | } |
|
157 | | }; |
158 | | |
159 | | /// Hasher specialization for std::string, which also supports hashing of const char* and |
160 | | /// std::string_view without first constructing a std::string. |
161 | | template <> |
162 | | struct Hasher<std::string> { |
163 | | /// @param str the string to hash |
164 | | /// @returns a hash of the string |
165 | 9.06M | size_t operator()(const std::string& str) const { |
166 | 9.06M | return std::hash<std::string_view>()(std::string_view(str)); |
167 | 9.06M | } |
168 | | |
169 | | /// @param str the string to hash |
170 | | /// @returns a hash of the string |
171 | 0 | size_t operator()(const char* str) const { |
172 | 0 | return std::hash<std::string_view>()(std::string_view(str)); |
173 | 0 | } |
174 | | |
175 | | /// @param str the string to hash |
176 | | /// @returns a hash of the string |
177 | 0 | size_t operator()(const std::string_view& str) const { |
178 | 0 | return std::hash<std::string_view>()(str); |
179 | 0 | } |
180 | | }; |
181 | | |
182 | | /// @param args the arguments to hash |
183 | | /// @returns a hash of the variadic list of arguments. |
184 | | /// The returned hash is dependent on the order of the arguments. |
185 | | template <typename... ARGS> |
186 | 2.86G | size_t Hash(const ARGS&... args) { |
187 | 2.86G | if constexpr (sizeof...(ARGS) == 0) { |
188 | 2.86G | return 0; |
189 | 2.86G | } else if constexpr (sizeof...(ARGS) == 1) { |
190 | 820M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; |
191 | 820M | return Hasher<T>()(args...); |
192 | 820M | } else { |
193 | 820M | size_t hash = 102931; // seed with an arbitrary prime |
194 | 820M | return HashCombine(hash, args...); |
195 | 820M | } |
196 | 2.86G | } unsigned long tint::Hash<unsigned int, unsigned int>(unsigned int const&, unsigned int const&) Line | Count | Source | 186 | 130M | size_t Hash(const ARGS&... args) { | 187 | 130M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 130M | return 0; | 189 | 130M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 130M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 130M | return Hasher<T>()(args...); | 192 | 130M | } else { | 193 | 130M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 130M | return HashCombine(hash, args...); | 195 | 130M | } | 196 | 130M | } |
unsigned long tint::Hash<unsigned int>(unsigned int const&) Line | Count | Source | 186 | 370M | size_t Hash(const ARGS&... args) { | 187 | 370M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 370M | return 0; | 189 | 370M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 370M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 370M | return Hasher<T>()(args...); | 192 | 370M | } else { | 193 | 370M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 370M | return HashCombine(hash, args...); | 195 | 370M | } | 196 | 370M | } |
unsigned long tint::Hash<tint::BindingPoint, tint::BindingPoint>(tint::BindingPoint const&, tint::BindingPoint const&) Line | Count | Source | 186 | 682 | size_t Hash(const ARGS&... args) { | 187 | 682 | if constexpr (sizeof...(ARGS) == 0) { | 188 | 682 | return 0; | 189 | 682 | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 682 | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 682 | return Hasher<T>()(args...); | 192 | 682 | } else { | 193 | 682 | size_t hash = 102931; // seed with an arbitrary prime | 194 | 682 | return HashCombine(hash, args...); | 195 | 682 | } | 196 | 682 | } |
unsigned long tint::Hash<tint::BindingPoint>(tint::BindingPoint const&) Line | Count | Source | 186 | 1.36k | size_t Hash(const ARGS&... args) { | 187 | 1.36k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.36k | return 0; | 189 | 1.36k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.36k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.36k | return Hasher<T>()(args...); | 192 | 1.36k | } else { | 193 | 1.36k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.36k | return HashCombine(hash, args...); | 195 | 1.36k | } | 196 | 1.36k | } |
unsigned long tint::Hash<tint::core::ir::Instruction*, unsigned long>(tint::core::ir::Instruction* const&, unsigned long const&) Line | Count | Source | 186 | 6.34M | size_t Hash(const ARGS&... args) { | 187 | 6.34M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 6.34M | return 0; | 189 | 6.34M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 6.34M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 6.34M | return Hasher<T>()(args...); | 192 | 6.34M | } else { | 193 | 6.34M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 6.34M | return HashCombine(hash, args...); | 195 | 6.34M | } | 196 | 6.34M | } |
unsigned long tint::Hash<unsigned long>(unsigned long const&) Line | Count | Source | 186 | 355M | size_t Hash(const ARGS&... args) { | 187 | 355M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 355M | return 0; | 189 | 355M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 355M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 355M | return Hasher<T>()(args...); | 192 | 355M | } else { | 193 | 355M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 355M | return HashCombine(hash, args...); | 195 | 355M | } | 196 | 355M | } |
unsigned long tint::Hash<tint::core::ir::Instruction*>(tint::core::ir::Instruction* const&) Line | Count | Source | 186 | 6.34M | size_t Hash(const ARGS&... args) { | 187 | 6.34M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 6.34M | return 0; | 189 | 6.34M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 6.34M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 6.34M | return Hasher<T>()(args...); | 192 | 6.34M | } else { | 193 | 6.34M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 6.34M | return HashCombine(hash, args...); | 195 | 6.34M | } | 196 | 6.34M | } |
unsigned long tint::Hash<unsigned char>(unsigned char const&) Line | Count | Source | 186 | 2.66M | size_t Hash(const ARGS&... args) { | 187 | 2.66M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 2.66M | return 0; | 189 | 2.66M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 2.66M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 2.66M | return Hasher<T>()(args...); | 192 | 2.66M | } else { | 193 | 2.66M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 2.66M | return HashCombine(hash, args...); | 195 | 2.66M | } | 196 | 2.66M | } |
unsigned long tint::Hash<tint::sem::Variable const*, tint::sem::Variable const*>(tint::sem::Variable const* const&, tint::sem::Variable const* const&) Line | Count | Source | 186 | 13.6k | size_t Hash(const ARGS&... args) { | 187 | 13.6k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 13.6k | return 0; | 189 | 13.6k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 13.6k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 13.6k | return Hasher<T>()(args...); | 192 | 13.6k | } else { | 193 | 13.6k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 13.6k | return HashCombine(hash, args...); | 195 | 13.6k | } | 196 | 13.6k | } |
unsigned long tint::Hash<tint::sem::Variable const*>(tint::sem::Variable const* const&) Line | Count | Source | 186 | 30.9k | size_t Hash(const ARGS&... args) { | 187 | 30.9k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 30.9k | return 0; | 189 | 30.9k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 30.9k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 30.9k | return Hasher<T>()(args...); | 192 | 30.9k | } else { | 193 | 30.9k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 30.9k | return HashCombine(hash, args...); | 195 | 30.9k | } | 196 | 30.9k | } |
Unexecuted instantiation: unsigned long tint::Hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: unsigned long tint::Hash<std::__1::vector<unsigned int, std::__1::allocator<unsigned int> > >(std::__1::vector<unsigned int, std::__1::allocator<unsigned int> > const&) unsigned long tint::Hash<tint::core::type::Type const*, bool, bool>(tint::core::type::Type const* const&, bool const&, bool const&) Line | Count | Source | 186 | 2.48M | size_t Hash(const ARGS&... args) { | 187 | 2.48M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 2.48M | return 0; | 189 | 2.48M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 2.48M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 2.48M | return Hasher<T>()(args...); | 192 | 2.48M | } else { | 193 | 2.48M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 2.48M | return HashCombine(hash, args...); | 195 | 2.48M | } | 196 | 2.48M | } |
unsigned long tint::Hash<bool>(bool const&) Line | Count | Source | 186 | 40.1M | size_t Hash(const ARGS&... args) { | 187 | 40.1M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 40.1M | return 0; | 189 | 40.1M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 40.1M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 40.1M | return Hasher<T>()(args...); | 192 | 40.1M | } else { | 193 | 40.1M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 40.1M | return HashCombine(hash, args...); | 195 | 40.1M | } | 196 | 40.1M | } |
unsigned long tint::Hash<tint::core::type::Type const*>(tint::core::type::Type const* const&) Line | Count | Source | 186 | 579M | size_t Hash(const ARGS&... args) { | 187 | 579M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 579M | return 0; | 189 | 579M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 579M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 579M | return Hasher<T>()(args...); | 192 | 579M | } else { | 193 | 579M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 579M | return HashCombine(hash, args...); | 195 | 579M | } | 196 | 579M | } |
unsigned long tint::Hash<tint::core::type::Type const*, unsigned long, unsigned long>(tint::core::type::Type const* const&, unsigned long const&, unsigned long const&) Line | Count | Source | 186 | 73.7M | size_t Hash(const ARGS&... args) { | 187 | 73.7M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 73.7M | return 0; | 189 | 73.7M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 73.7M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 73.7M | return Hasher<T>()(args...); | 192 | 73.7M | } else { | 193 | 73.7M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 73.7M | return HashCombine(hash, args...); | 195 | 73.7M | } | 196 | 73.7M | } |
Unexecuted instantiation: unsigned long tint::Hash<tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::Op, tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::DataType>(tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::Op const&, tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::DataType const&) Unexecuted instantiation: unsigned long tint::Hash<tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::DataType>(tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::DataType const&) Unexecuted instantiation: unsigned long tint::Hash<tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::Op>(tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::Op const&) Unexecuted instantiation: unsigned long tint::Hash<std::__1::tuple<tint::core::type::Type const*, tint::core::type::Type const*> >(std::__1::tuple<tint::core::type::Type const*, tint::core::type::Type const*> const&) Unexecuted instantiation: unsigned long tint::Hash<tint::core::type::Type const*, tint::core::type::Type const*>(tint::core::type::Type const* const&, tint::core::type::Type const* const&) Unexecuted instantiation: unsigned long tint::Hash<tint::wgsl::BuiltinFn, tint::EnumSet<tint::ast::PipelineStage>, tint::core::type::Type const*, tint::Vector<tint::sem::Parameter const*, 8ul>, bool>(tint::wgsl::BuiltinFn const&, tint::EnumSet<tint::ast::PipelineStage> const&, tint::core::type::Type const* const&, tint::Vector<tint::sem::Parameter const*, 8ul> const&, bool const&) Unexecuted instantiation: unsigned long tint::Hash<tint::Vector<tint::sem::Parameter const*, 8ul> >(tint::Vector<tint::sem::Parameter const*, 8ul> const&) unsigned long tint::Hash<tint::sem::Parameter const*>(tint::sem::Parameter const* const&) Line | Count | Source | 186 | 781 | size_t Hash(const ARGS&... args) { | 187 | 781 | if constexpr (sizeof...(ARGS) == 0) { | 188 | 781 | return 0; | 189 | 781 | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 781 | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 781 | return Hasher<T>()(args...); | 192 | 781 | } else { | 193 | 781 | size_t hash = 102931; // seed with an arbitrary prime | 194 | 781 | return HashCombine(hash, args...); | 195 | 781 | } | 196 | 781 | } |
Unexecuted instantiation: unsigned long tint::Hash<tint::EnumSet<tint::ast::PipelineStage> >(tint::EnumSet<tint::ast::PipelineStage> const&) unsigned long tint::Hash<tint::wgsl::BuiltinFn>(tint::wgsl::BuiltinFn const&) Line | Count | Source | 186 | 1.46M | size_t Hash(const ARGS&... args) { | 187 | 1.46M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.46M | return 0; | 189 | 1.46M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.46M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.46M | return Hasher<T>()(args...); | 192 | 1.46M | } else { | 193 | 1.46M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.46M | return HashCombine(hash, args...); | 195 | 1.46M | } | 196 | 1.46M | } |
unsigned long tint::Hash<tint::ast::BlockStatement const*, tint::sem::Variable const*>(tint::ast::BlockStatement const* const&, tint::sem::Variable const* const&) Line | Count | Source | 186 | 1.33k | size_t Hash(const ARGS&... args) { | 187 | 1.33k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.33k | return 0; | 189 | 1.33k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.33k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.33k | return Hasher<T>()(args...); | 192 | 1.33k | } else { | 193 | 1.33k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.33k | return HashCombine(hash, args...); | 195 | 1.33k | } | 196 | 1.33k | } |
unsigned long tint::Hash<tint::ast::BlockStatement const*>(tint::ast::BlockStatement const* const&) Line | Count | Source | 186 | 1.33k | size_t Hash(const ARGS&... args) { | 187 | 1.33k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.33k | return 0; | 189 | 1.33k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.33k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.33k | return Hasher<T>()(args...); | 192 | 1.33k | } else { | 193 | 1.33k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.33k | return HashCombine(hash, args...); | 195 | 1.33k | } | 196 | 1.33k | } |
unsigned long tint::Hash<tint::core::type::Type const*, tint::wgsl::BuiltinFn, tint::Symbol>(tint::core::type::Type const* const&, tint::wgsl::BuiltinFn const&, tint::Symbol const&) Line | Count | Source | 186 | 44 | size_t Hash(const ARGS&... args) { | 187 | 44 | if constexpr (sizeof...(ARGS) == 0) { | 188 | 44 | return 0; | 189 | 44 | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 44 | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 44 | return Hasher<T>()(args...); | 192 | 44 | } else { | 193 | 44 | size_t hash = 102931; // seed with an arbitrary prime | 194 | 44 | return HashCombine(hash, args...); | 195 | 44 | } | 196 | 44 | } |
unsigned long tint::Hash<tint::Symbol>(tint::Symbol const&) Line | Count | Source | 186 | 6.27M | size_t Hash(const ARGS&... args) { | 187 | 6.27M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 6.27M | return 0; | 189 | 6.27M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 6.27M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 6.27M | return Hasher<T>()(args...); | 192 | 6.27M | } else { | 193 | 6.27M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 6.27M | return HashCombine(hash, args...); | 195 | 6.27M | } | 196 | 6.27M | } |
unsigned long tint::Hash<tint::core::type::Type const*, tint::Symbol>(tint::core::type::Type const* const&, tint::Symbol const&) Line | Count | Source | 186 | 9.61k | size_t Hash(const ARGS&... args) { | 187 | 9.61k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 9.61k | return 0; | 189 | 9.61k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 9.61k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 9.61k | return Hasher<T>()(args...); | 192 | 9.61k | } else { | 193 | 9.61k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 9.61k | return HashCombine(hash, args...); | 195 | 9.61k | } | 196 | 9.61k | } |
unsigned long tint::Hash<tint::Symbol, tint::Symbol>(tint::Symbol const&, tint::Symbol const&) Line | Count | Source | 186 | 1.21k | size_t Hash(const ARGS&... args) { | 187 | 1.21k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.21k | return 0; | 189 | 1.21k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.21k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.21k | return Hasher<T>()(args...); | 192 | 1.21k | } else { | 193 | 1.21k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.21k | return HashCombine(hash, args...); | 195 | 1.21k | } | 196 | 1.21k | } |
unsigned long tint::Hash<std::__1::tuple<tint::core::AddressSpace, tint::core::type::Struct const*> >(std::__1::tuple<tint::core::AddressSpace, tint::core::type::Struct const*> const&) Line | Count | Source | 186 | 96 | size_t Hash(const ARGS&... args) { | 187 | 96 | if constexpr (sizeof...(ARGS) == 0) { | 188 | 96 | return 0; | 189 | 96 | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 96 | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 96 | return Hasher<T>()(args...); | 192 | 96 | } else { | 193 | 96 | size_t hash = 102931; // seed with an arbitrary prime | 194 | 96 | return HashCombine(hash, args...); | 195 | 96 | } | 196 | 96 | } |
unsigned long tint::Hash<tint::core::AddressSpace, tint::core::type::Struct const*>(tint::core::AddressSpace const&, tint::core::type::Struct const* const&) Line | Count | Source | 186 | 96 | size_t Hash(const ARGS&... args) { | 187 | 96 | if constexpr (sizeof...(ARGS) == 0) { | 188 | 96 | return 0; | 189 | 96 | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 96 | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 96 | return Hasher<T>()(args...); | 192 | 96 | } else { | 193 | 96 | size_t hash = 102931; // seed with an arbitrary prime | 194 | 96 | return HashCombine(hash, args...); | 195 | 96 | } | 196 | 96 | } |
unsigned long tint::Hash<tint::core::AddressSpace>(tint::core::AddressSpace const&) Line | Count | Source | 186 | 74.2M | size_t Hash(const ARGS&... args) { | 187 | 74.2M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 74.2M | return 0; | 189 | 74.2M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 74.2M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 74.2M | return Hasher<T>()(args...); | 192 | 74.2M | } else { | 193 | 74.2M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 74.2M | return HashCombine(hash, args...); | 195 | 74.2M | } | 196 | 74.2M | } |
unsigned long tint::Hash<tint::core::type::Struct const*>(tint::core::type::Struct const* const&) Line | Count | Source | 186 | 2.94M | size_t Hash(const ARGS&... args) { | 187 | 2.94M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 2.94M | return 0; | 189 | 2.94M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 2.94M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 2.94M | return Hasher<T>()(args...); | 192 | 2.94M | } else { | 193 | 2.94M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 2.94M | return HashCombine(hash, args...); | 195 | 2.94M | } | 196 | 2.94M | } |
unsigned long tint::Hash<tint::core::AddressSpace, tint::spirv::reader::ast_parser::Type const*, tint::core::Access>(tint::core::AddressSpace const&, tint::spirv::reader::ast_parser::Type const* const&, tint::core::Access const&) Line | Count | Source | 186 | 3.26M | size_t Hash(const ARGS&... args) { | 187 | 3.26M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 3.26M | return 0; | 189 | 3.26M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 3.26M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 3.26M | return Hasher<T>()(args...); | 192 | 3.26M | } else { | 193 | 3.26M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 3.26M | return HashCombine(hash, args...); | 195 | 3.26M | } | 196 | 3.26M | } |
unsigned long tint::Hash<tint::spirv::reader::ast_parser::Type const*>(tint::spirv::reader::ast_parser::Type const* const&) Line | Count | Source | 186 | 20.3M | size_t Hash(const ARGS&... args) { | 187 | 20.3M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 20.3M | return 0; | 189 | 20.3M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 20.3M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 20.3M | return Hasher<T>()(args...); | 192 | 20.3M | } else { | 193 | 20.3M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 20.3M | return HashCombine(hash, args...); | 195 | 20.3M | } | 196 | 20.3M | } |
unsigned long tint::Hash<tint::core::Access>(tint::core::Access const&) Line | Count | Source | 186 | 69.9M | size_t Hash(const ARGS&... args) { | 187 | 69.9M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 69.9M | return 0; | 189 | 69.9M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 69.9M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 69.9M | return Hasher<T>()(args...); | 192 | 69.9M | } else { | 193 | 69.9M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 69.9M | return HashCombine(hash, args...); | 195 | 69.9M | } | 196 | 69.9M | } |
unsigned long tint::Hash<tint::spirv::reader::ast_parser::Type const*, unsigned int>(tint::spirv::reader::ast_parser::Type const* const&, unsigned int const&) Line | Count | Source | 186 | 11.3M | size_t Hash(const ARGS&... args) { | 187 | 11.3M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 11.3M | return 0; | 189 | 11.3M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 11.3M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 11.3M | return Hasher<T>()(args...); | 192 | 11.3M | } else { | 193 | 11.3M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 11.3M | return HashCombine(hash, args...); | 195 | 11.3M | } | 196 | 11.3M | } |
unsigned long tint::Hash<tint::spirv::reader::ast_parser::Type const*, unsigned int, unsigned int>(tint::spirv::reader::ast_parser::Type const* const&, unsigned int const&, unsigned int const&) Line | Count | Source | 186 | 5.74M | size_t Hash(const ARGS&... args) { | 187 | 5.74M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 5.74M | return 0; | 189 | 5.74M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 5.74M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 5.74M | return Hasher<T>()(args...); | 192 | 5.74M | } else { | 193 | 5.74M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 5.74M | return HashCombine(hash, args...); | 195 | 5.74M | } | 196 | 5.74M | } |
unsigned long tint::Hash<tint::core::type::SamplerKind>(tint::core::type::SamplerKind const&) Line | Count | Source | 186 | 51.7k | size_t Hash(const ARGS&... args) { | 187 | 51.7k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 51.7k | return 0; | 189 | 51.7k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 51.7k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 51.7k | return Hasher<T>()(args...); | 192 | 51.7k | } else { | 193 | 51.7k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 51.7k | return HashCombine(hash, args...); | 195 | 51.7k | } | 196 | 51.7k | } |
unsigned long tint::Hash<tint::core::type::TextureDimension>(tint::core::type::TextureDimension const&) Line | Count | Source | 186 | 68.7k | size_t Hash(const ARGS&... args) { | 187 | 68.7k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 68.7k | return 0; | 189 | 68.7k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 68.7k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 68.7k | return Hasher<T>()(args...); | 192 | 68.7k | } else { | 193 | 68.7k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 68.7k | return HashCombine(hash, args...); | 195 | 68.7k | } | 196 | 68.7k | } |
unsigned long tint::Hash<tint::core::type::TextureDimension, tint::spirv::reader::ast_parser::Type const*>(tint::core::type::TextureDimension const&, tint::spirv::reader::ast_parser::Type const* const&) Line | Count | Source | 186 | 2.66k | size_t Hash(const ARGS&... args) { | 187 | 2.66k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 2.66k | return 0; | 189 | 2.66k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 2.66k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 2.66k | return Hasher<T>()(args...); | 192 | 2.66k | } else { | 193 | 2.66k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 2.66k | return HashCombine(hash, args...); | 195 | 2.66k | } | 196 | 2.66k | } |
unsigned long tint::Hash<tint::core::type::TextureDimension, tint::core::TexelFormat, tint::core::Access>(tint::core::type::TextureDimension const&, tint::core::TexelFormat const&, tint::core::Access const&) Line | Count | Source | 186 | 7.12k | size_t Hash(const ARGS&... args) { | 187 | 7.12k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 7.12k | return 0; | 189 | 7.12k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 7.12k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 7.12k | return Hasher<T>()(args...); | 192 | 7.12k | } else { | 193 | 7.12k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 7.12k | return HashCombine(hash, args...); | 195 | 7.12k | } | 196 | 7.12k | } |
unsigned long tint::Hash<tint::core::TexelFormat>(tint::core::TexelFormat const&) Line | Count | Source | 186 | 34.3k | size_t Hash(const ARGS&... args) { | 187 | 34.3k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 34.3k | return 0; | 189 | 34.3k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 34.3k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 34.3k | return Hasher<T>()(args...); | 192 | 34.3k | } else { | 193 | 34.3k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 34.3k | return HashCombine(hash, args...); | 195 | 34.3k | } | 196 | 34.3k | } |
unsigned long tint::Hash<unsigned int, tint::core::type::Matrix const*>(unsigned int const&, tint::core::type::Matrix const* const&) Line | Count | Source | 186 | 3.14k | size_t Hash(const ARGS&... args) { | 187 | 3.14k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 3.14k | return 0; | 189 | 3.14k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 3.14k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 3.14k | return Hasher<T>()(args...); | 192 | 3.14k | } else { | 193 | 3.14k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 3.14k | return HashCombine(hash, args...); | 195 | 3.14k | } | 196 | 3.14k | } |
unsigned long tint::Hash<tint::core::type::Matrix const*>(tint::core::type::Matrix const* const&) Line | Count | Source | 186 | 3.14k | size_t Hash(const ARGS&... args) { | 187 | 3.14k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 3.14k | return 0; | 189 | 3.14k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 3.14k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 3.14k | return Hasher<T>()(args...); | 192 | 3.14k | } else { | 193 | 3.14k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 3.14k | return HashCombine(hash, args...); | 195 | 3.14k | } | 196 | 3.14k | } |
unsigned long tint::Hash<unsigned int, tint::spirv::writer::ScalarConstant::Kind>(unsigned int const&, tint::spirv::writer::ScalarConstant::Kind const&) Line | Count | Source | 186 | 692k | size_t Hash(const ARGS&... args) { | 187 | 692k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 692k | return 0; | 189 | 692k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 692k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 692k | return Hasher<T>()(args...); | 192 | 692k | } else { | 193 | 692k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 692k | return HashCombine(hash, args...); | 195 | 692k | } | 196 | 692k | } |
unsigned long tint::Hash<tint::spirv::writer::ScalarConstant::Kind>(tint::spirv::writer::ScalarConstant::Kind const&) Line | Count | Source | 186 | 692k | size_t Hash(const ARGS&... args) { | 187 | 692k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 692k | return 0; | 189 | 692k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 692k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 692k | return Hasher<T>()(args...); | 192 | 692k | } else { | 193 | 692k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 692k | return HashCombine(hash, args...); | 195 | 692k | } | 196 | 692k | } |
unsigned long tint::Hash<std::__1::vector<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > >(std::__1::vector<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&) Line | Count | Source | 186 | 58.6k | size_t Hash(const ARGS&... args) { | 187 | 58.6k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 58.6k | return 0; | 189 | 58.6k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 58.6k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 58.6k | return Hasher<T>()(args...); | 192 | 58.6k | } else { | 193 | 58.6k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 58.6k | return HashCombine(hash, args...); | 195 | 58.6k | } | 196 | 58.6k | } |
unsigned long tint::Hash<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >(std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) Line | Count | Source | 186 | 540k | size_t Hash(const ARGS&... args) { | 187 | 540k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 540k | return 0; | 189 | 540k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 540k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 540k | return Hasher<T>()(args...); | 192 | 540k | } else { | 193 | 540k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 540k | return HashCombine(hash, args...); | 195 | 540k | } | 196 | 540k | } |
unsigned long tint::Hash<float>(float const&) Line | Count | Source | 186 | 48.3M | size_t Hash(const ARGS&... args) { | 187 | 48.3M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 48.3M | return 0; | 189 | 48.3M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 48.3M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 48.3M | return Hasher<T>()(args...); | 192 | 48.3M | } else { | 193 | 48.3M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 48.3M | return HashCombine(hash, args...); | 195 | 48.3M | } | 196 | 48.3M | } |
Unexecuted instantiation: unsigned long tint::Hash<std::__1::tuple<tint::core::type::Matrix const*, tint::core::type::Matrix const*> >(std::__1::tuple<tint::core::type::Matrix const*, tint::core::type::Matrix const*> const&) Unexecuted instantiation: unsigned long tint::Hash<tint::core::type::Matrix const*, tint::core::type::Matrix const*>(tint::core::type::Matrix const* const&, tint::core::type::Matrix const* const&) unsigned long tint::Hash<tint::core::BinaryOp, tint::core::type::Type const*, tint::core::type::Type const*>(tint::core::BinaryOp const&, tint::core::type::Type const* const&, tint::core::type::Type const* const&) Line | Count | Source | 186 | 764 | size_t Hash(const ARGS&... args) { | 187 | 764 | if constexpr (sizeof...(ARGS) == 0) { | 188 | 764 | return 0; | 189 | 764 | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 764 | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 764 | return Hasher<T>()(args...); | 192 | 764 | } else { | 193 | 764 | size_t hash = 102931; // seed with an arbitrary prime | 194 | 764 | return HashCombine(hash, args...); | 195 | 764 | } | 196 | 764 | } |
unsigned long tint::Hash<tint::core::BinaryOp>(tint::core::BinaryOp const&) Line | Count | Source | 186 | 764 | size_t Hash(const ARGS&... args) { | 187 | 764 | if constexpr (sizeof...(ARGS) == 0) { | 188 | 764 | return 0; | 189 | 764 | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 764 | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 764 | return Hasher<T>()(args...); | 192 | 764 | } else { | 193 | 764 | size_t hash = 102931; // seed with an arbitrary prime | 194 | 764 | return HashCombine(hash, args...); | 195 | 764 | } | 196 | 764 | } |
direct_variable_access.cc:unsigned long tint::Hash<tint::sem::Parameter const*, tint::ast::transform::(anonymous namespace)::AccessShape>(tint::sem::Parameter const* const&, tint::ast::transform::(anonymous namespace)::AccessShape const&) Line | Count | Source | 186 | 781 | size_t Hash(const ARGS&... args) { | 187 | 781 | if constexpr (sizeof...(ARGS) == 0) { | 188 | 781 | return 0; | 189 | 781 | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 781 | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 781 | return Hasher<T>()(args...); | 192 | 781 | } else { | 193 | 781 | size_t hash = 102931; // seed with an arbitrary prime | 194 | 781 | return HashCombine(hash, args...); | 195 | 781 | } | 196 | 781 | } |
direct_variable_access.cc:unsigned long tint::Hash<tint::ast::transform::(anonymous namespace)::AccessShape>(tint::ast::transform::(anonymous namespace)::AccessShape const&) Line | Count | Source | 186 | 781 | size_t Hash(const ARGS&... args) { | 187 | 781 | if constexpr (sizeof...(ARGS) == 0) { | 188 | 781 | return 0; | 189 | 781 | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 781 | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 781 | return Hasher<T>()(args...); | 192 | 781 | } else { | 193 | 781 | size_t hash = 102931; // seed with an arbitrary prime | 194 | 781 | return HashCombine(hash, args...); | 195 | 781 | } | 196 | 781 | } |
direct_variable_access.cc:unsigned long tint::Hash<tint::ast::transform::(anonymous namespace)::AccessRoot, tint::Vector<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex>, 8ul> >(tint::ast::transform::(anonymous namespace)::AccessRoot const&, tint::Vector<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex>, 8ul> const&) Line | Count | Source | 186 | 2.28k | size_t Hash(const ARGS&... args) { | 187 | 2.28k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 2.28k | return 0; | 189 | 2.28k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 2.28k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 2.28k | return Hasher<T>()(args...); | 192 | 2.28k | } else { | 193 | 2.28k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 2.28k | return HashCombine(hash, args...); | 195 | 2.28k | } | 196 | 2.28k | } |
direct_variable_access.cc:unsigned long tint::Hash<tint::ast::transform::(anonymous namespace)::AccessRoot>(tint::ast::transform::(anonymous namespace)::AccessRoot const&) Line | Count | Source | 186 | 2.28k | size_t Hash(const ARGS&... args) { | 187 | 2.28k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 2.28k | return 0; | 189 | 2.28k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 2.28k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 2.28k | return Hasher<T>()(args...); | 192 | 2.28k | } else { | 193 | 2.28k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 2.28k | return HashCombine(hash, args...); | 195 | 2.28k | } | 196 | 2.28k | } |
unsigned long tint::Hash<tint::core::type::Type const*, tint::sem::Variable const*>(tint::core::type::Type const* const&, tint::sem::Variable const* const&) Line | Count | Source | 186 | 2.28k | size_t Hash(const ARGS&... args) { | 187 | 2.28k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 2.28k | return 0; | 189 | 2.28k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 2.28k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 2.28k | return Hasher<T>()(args...); | 192 | 2.28k | } else { | 193 | 2.28k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 2.28k | return HashCombine(hash, args...); | 195 | 2.28k | } | 196 | 2.28k | } |
direct_variable_access.cc:unsigned long tint::Hash<tint::Vector<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex>, 8ul> >(tint::Vector<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex>, 8ul> const&) Line | Count | Source | 186 | 2.28k | size_t Hash(const ARGS&... args) { | 187 | 2.28k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 2.28k | return 0; | 189 | 2.28k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 2.28k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 2.28k | return Hasher<T>()(args...); | 192 | 2.28k | } else { | 193 | 2.28k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 2.28k | return HashCombine(hash, args...); | 195 | 2.28k | } | 196 | 2.28k | } |
direct_variable_access.cc:unsigned long tint::Hash<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex> >(std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex> const&) Line | Count | Source | 186 | 3.17k | size_t Hash(const ARGS&... args) { | 187 | 3.17k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 3.17k | return 0; | 189 | 3.17k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 3.17k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 3.17k | return Hasher<T>()(args...); | 192 | 3.17k | } else { | 193 | 3.17k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 3.17k | return HashCombine(hash, args...); | 195 | 3.17k | } | 196 | 3.17k | } |
direct_variable_access.cc:unsigned long tint::Hash<tint::ast::transform::(anonymous namespace)::DynamicIndex>(tint::ast::transform::(anonymous namespace)::DynamicIndex const&) Line | Count | Source | 186 | 1.36k | size_t Hash(const ARGS&... args) { | 187 | 1.36k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.36k | return 0; | 189 | 1.36k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.36k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.36k | return Hasher<T>()(args...); | 192 | 1.36k | } else { | 193 | 1.36k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.36k | return HashCombine(hash, args...); | 195 | 1.36k | } | 196 | 1.36k | } |
Unexecuted instantiation: std140.cc:unsigned long tint::Hash<tint::sem::GlobalVariable const*, tint::Vector<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> >, 8ul> >(tint::sem::GlobalVariable const* const&, tint::Vector<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> >, 8ul> const&) Unexecuted instantiation: unsigned long tint::Hash<tint::sem::GlobalVariable const*>(tint::sem::GlobalVariable const* const&) Unexecuted instantiation: std140.cc:unsigned long tint::Hash<tint::Vector<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> >, 8ul> >(tint::Vector<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> >, 8ul> const&) Unexecuted instantiation: std140.cc:unsigned long tint::Hash<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > >(std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > const&) Unexecuted instantiation: std140.cc:unsigned long tint::Hash<tint::ast::transform::(anonymous namespace)::UniformVariable>(tint::ast::transform::(anonymous namespace)::UniformVariable const&) Unexecuted instantiation: unsigned long tint::Hash<tint::core::Number<unsigned int> >(tint::core::Number<unsigned int> const&) Unexecuted instantiation: std140.cc:unsigned long tint::Hash<tint::ast::transform::(anonymous namespace)::DynamicIndex>(tint::ast::transform::(anonymous namespace)::DynamicIndex const&) Unexecuted instantiation: unsigned long tint::Hash<tint::Vector<unsigned int, 4ul> >(tint::Vector<unsigned int, 4ul> const&) unsigned long tint::Hash<tint::core::ParameterUsage>(tint::core::ParameterUsage const&) Line | Count | Source | 186 | 4.39M | size_t Hash(const ARGS&... args) { | 187 | 4.39M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 4.39M | return 0; | 189 | 4.39M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 4.39M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 4.39M | return Hasher<T>()(args...); | 192 | 4.39M | } else { | 193 | 4.39M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 4.39M | return HashCombine(hash, args...); | 195 | 4.39M | } | 196 | 4.39M | } |
unsigned long tint::Hash<unsigned long, tint::core::intrinsic::OverloadInfo const*, tint::core::type::Type const*>(unsigned long const&, tint::core::intrinsic::OverloadInfo const* const&, tint::core::type::Type const* const&) Line | Count | Source | 186 | 6.30M | size_t Hash(const ARGS&... args) { | 187 | 6.30M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 6.30M | return 0; | 189 | 6.30M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 6.30M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 6.30M | return Hasher<T>()(args...); | 192 | 6.30M | } else { | 193 | 6.30M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 6.30M | return HashCombine(hash, args...); | 195 | 6.30M | } | 196 | 6.30M | } |
unsigned long tint::Hash<tint::core::intrinsic::OverloadInfo const*>(tint::core::intrinsic::OverloadInfo const* const&) Line | Count | Source | 186 | 6.30M | size_t Hash(const ARGS&... args) { | 187 | 6.30M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 6.30M | return 0; | 189 | 6.30M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 6.30M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 6.30M | return Hasher<T>()(args...); | 192 | 6.30M | } else { | 193 | 6.30M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 6.30M | return HashCombine(hash, args...); | 195 | 6.30M | } | 196 | 6.30M | } |
unsigned long tint::Hash<tint::core::type::Type const*, tint::core::AddressSpace>(tint::core::type::Type const* const&, tint::core::AddressSpace const&) Line | Count | Source | 186 | 4.33M | size_t Hash(const ARGS&... args) { | 187 | 4.33M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 4.33M | return 0; | 189 | 4.33M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 4.33M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 4.33M | return Hasher<T>()(args...); | 192 | 4.33M | } else { | 193 | 4.33M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 4.33M | return HashCombine(hash, args...); | 195 | 4.33M | } | 196 | 4.33M | } |
unsigned long tint::Hash<tint::core::intrinsic::Overload, tint::wgsl::BuiltinFn>(tint::core::intrinsic::Overload const&, tint::wgsl::BuiltinFn const&) Line | Count | Source | 186 | 1.46M | size_t Hash(const ARGS&... args) { | 187 | 1.46M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.46M | return 0; | 189 | 1.46M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.46M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.46M | return Hasher<T>()(args...); | 192 | 1.46M | } else { | 193 | 1.46M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.46M | return HashCombine(hash, args...); | 195 | 1.46M | } | 196 | 1.46M | } |
unsigned long tint::Hash<tint::core::intrinsic::Overload>(tint::core::intrinsic::Overload const&) Line | Count | Source | 186 | 1.46M | size_t Hash(const ARGS&... args) { | 187 | 1.46M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.46M | return 0; | 189 | 1.46M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.46M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.46M | return Hasher<T>()(args...); | 192 | 1.46M | } else { | 193 | 1.46M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.46M | return HashCombine(hash, args...); | 195 | 1.46M | } | 196 | 1.46M | } |
unsigned long tint::Hash<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> >(std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> const&) Line | Count | Source | 186 | 1.33M | size_t Hash(const ARGS&... args) { | 187 | 1.33M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.33M | return 0; | 189 | 1.33M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.33M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.33M | return Hasher<T>()(args...); | 192 | 1.33M | } else { | 193 | 1.33M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.33M | return HashCombine(hash, args...); | 195 | 1.33M | } | 196 | 1.33M | } |
unsigned long tint::Hash<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage>(tint::core::type::Array const* const&, unsigned long const&, tint::core::EvaluationStage const&) Line | Count | Source | 186 | 1.33M | size_t Hash(const ARGS&... args) { | 187 | 1.33M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.33M | return 0; | 189 | 1.33M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.33M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.33M | return Hasher<T>()(args...); | 192 | 1.33M | } else { | 193 | 1.33M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.33M | return HashCombine(hash, args...); | 195 | 1.33M | } | 196 | 1.33M | } |
unsigned long tint::Hash<tint::core::type::Array const*>(tint::core::type::Array const* const&) Line | Count | Source | 186 | 1.33M | size_t Hash(const ARGS&... args) { | 187 | 1.33M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.33M | return 0; | 189 | 1.33M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.33M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.33M | return Hasher<T>()(args...); | 192 | 1.33M | } else { | 193 | 1.33M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.33M | return HashCombine(hash, args...); | 195 | 1.33M | } | 196 | 1.33M | } |
unsigned long tint::Hash<tint::core::EvaluationStage>(tint::core::EvaluationStage const&) Line | Count | Source | 186 | 4.27M | size_t Hash(const ARGS&... args) { | 187 | 4.27M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 4.27M | return 0; | 189 | 4.27M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 4.27M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 4.27M | return Hasher<T>()(args...); | 192 | 4.27M | } else { | 193 | 4.27M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 4.27M | return HashCombine(hash, args...); | 195 | 4.27M | } | 196 | 4.27M | } |
unsigned long tint::Hash<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> >(std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> const&) Line | Count | Source | 186 | 2.94M | size_t Hash(const ARGS&... args) { | 187 | 2.94M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 2.94M | return 0; | 189 | 2.94M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 2.94M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 2.94M | return Hasher<T>()(args...); | 192 | 2.94M | } else { | 193 | 2.94M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 2.94M | return HashCombine(hash, args...); | 195 | 2.94M | } | 196 | 2.94M | } |
unsigned long tint::Hash<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage>(tint::core::type::Struct const* const&, unsigned long const&, tint::core::EvaluationStage const&) Line | Count | Source | 186 | 2.94M | size_t Hash(const ARGS&... args) { | 187 | 2.94M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 2.94M | return 0; | 189 | 2.94M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 2.94M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 2.94M | return Hasher<T>()(args...); | 192 | 2.94M | } else { | 193 | 2.94M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 2.94M | return HashCombine(hash, args...); | 195 | 2.94M | } | 196 | 2.94M | } |
unsigned long tint::Hash<tint::wgsl::CoreDiagnosticRule>(tint::wgsl::CoreDiagnosticRule const&) Line | Count | Source | 186 | 890k | size_t Hash(const ARGS&... args) { | 187 | 890k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 890k | return 0; | 189 | 890k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 890k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 890k | return Hasher<T>()(args...); | 192 | 890k | } else { | 193 | 890k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 890k | return HashCombine(hash, args...); | 195 | 890k | } | 196 | 890k | } |
unsigned long tint::Hash<tint::wgsl::ChromiumDiagnosticRule>(tint::wgsl::ChromiumDiagnosticRule const&) Line | Count | Source | 186 | 1.37M | size_t Hash(const ARGS&... args) { | 187 | 1.37M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.37M | return 0; | 189 | 1.37M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.37M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.37M | return Hasher<T>()(args...); | 192 | 1.37M | } else { | 193 | 1.37M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.37M | return HashCombine(hash, args...); | 195 | 1.37M | } | 196 | 1.37M | } |
dependency_graph.cc:unsigned long tint::Hash<tint::resolver::(anonymous namespace)::Global const*, tint::resolver::(anonymous namespace)::Global const*>(tint::resolver::(anonymous namespace)::Global const* const&, tint::resolver::(anonymous namespace)::Global const* const&) Line | Count | Source | 186 | 72.3M | size_t Hash(const ARGS&... args) { | 187 | 72.3M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 72.3M | return 0; | 189 | 72.3M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 72.3M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 72.3M | return Hasher<T>()(args...); | 192 | 72.3M | } else { | 193 | 72.3M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 72.3M | return HashCombine(hash, args...); | 195 | 72.3M | } | 196 | 72.3M | } |
dependency_graph.cc:unsigned long tint::Hash<tint::resolver::(anonymous namespace)::Global const*>(tint::resolver::(anonymous namespace)::Global const* const&) Line | Count | Source | 186 | 144M | size_t Hash(const ARGS&... args) { | 187 | 144M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 144M | return 0; | 189 | 144M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 144M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 144M | return Hasher<T>()(args...); | 192 | 144M | } else { | 193 | 144M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 144M | return HashCombine(hash, args...); | 195 | 144M | } | 196 | 144M | } |
unsigned long tint::Hash<unsigned long, tint::core::type::Type const*>(unsigned long const&, tint::core::type::Type const* const&) Line | Count | Source | 186 | 1.82M | size_t Hash(const ARGS&... args) { | 187 | 1.82M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.82M | return 0; | 189 | 1.82M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.82M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.82M | return Hasher<T>()(args...); | 192 | 1.82M | } else { | 193 | 1.82M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.82M | return HashCombine(hash, args...); | 195 | 1.82M | } | 196 | 1.82M | } |
Unexecuted instantiation: unsigned long tint::Hash<tint::core::ir::Value*, tint::Vector<tint::core::ir::Value*, 4ul> >(tint::core::ir::Value* const&, tint::Vector<tint::core::ir::Value*, 4ul> const&) Unexecuted instantiation: unsigned long tint::Hash<tint::core::ir::Value*>(tint::core::ir::Value* const&) Unexecuted instantiation: unsigned long tint::Hash<tint::Vector<tint::core::ir::Value*, 4ul> >(tint::Vector<tint::core::ir::Value*, 4ul> const&) unsigned long tint::Hash<tint::core::type::Type const*, long>(tint::core::type::Type const* const&, long const&) Line | Count | Source | 186 | 90.8M | size_t Hash(const ARGS&... args) { | 187 | 90.8M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 90.8M | return 0; | 189 | 90.8M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 90.8M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 90.8M | return Hasher<T>()(args...); | 192 | 90.8M | } else { | 193 | 90.8M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 90.8M | return HashCombine(hash, args...); | 195 | 90.8M | } | 196 | 90.8M | } |
unsigned long tint::Hash<long>(long const&) Line | Count | Source | 186 | 90.8M | size_t Hash(const ARGS&... args) { | 187 | 90.8M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 90.8M | return 0; | 189 | 90.8M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 90.8M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 90.8M | return Hasher<T>()(args...); | 192 | 90.8M | } else { | 193 | 90.8M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 90.8M | return HashCombine(hash, args...); | 195 | 90.8M | } | 196 | 90.8M | } |
unsigned long tint::Hash<tint::core::type::Type const*, double>(tint::core::type::Type const* const&, double const&) Line | Count | Source | 186 | 27.6k | size_t Hash(const ARGS&... args) { | 187 | 27.6k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 27.6k | return 0; | 189 | 27.6k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 27.6k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 27.6k | return Hasher<T>()(args...); | 192 | 27.6k | } else { | 193 | 27.6k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 27.6k | return HashCombine(hash, args...); | 195 | 27.6k | } | 196 | 27.6k | } |
unsigned long tint::Hash<double>(double const&) Line | Count | Source | 186 | 27.6k | size_t Hash(const ARGS&... args) { | 187 | 27.6k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 27.6k | return 0; | 189 | 27.6k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 27.6k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 27.6k | return Hasher<T>()(args...); | 192 | 27.6k | } else { | 193 | 27.6k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 27.6k | return HashCombine(hash, args...); | 195 | 27.6k | } | 196 | 27.6k | } |
unsigned long tint::Hash<tint::core::type::Type const*, int>(tint::core::type::Type const* const&, int const&) Line | Count | Source | 186 | 198M | size_t Hash(const ARGS&... args) { | 187 | 198M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 198M | return 0; | 189 | 198M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 198M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 198M | return Hasher<T>()(args...); | 192 | 198M | } else { | 193 | 198M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 198M | return HashCombine(hash, args...); | 195 | 198M | } | 196 | 198M | } |
unsigned long tint::Hash<int>(int const&) Line | Count | Source | 186 | 198M | size_t Hash(const ARGS&... args) { | 187 | 198M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 198M | return 0; | 189 | 198M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 198M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 198M | return Hasher<T>()(args...); | 192 | 198M | } else { | 193 | 198M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 198M | return HashCombine(hash, args...); | 195 | 198M | } | 196 | 198M | } |
unsigned long tint::Hash<tint::core::type::Type const*, float>(tint::core::type::Type const* const&, float const&) Line | Count | Source | 186 | 48.3M | size_t Hash(const ARGS&... args) { | 187 | 48.3M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 48.3M | return 0; | 189 | 48.3M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 48.3M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 48.3M | return Hasher<T>()(args...); | 192 | 48.3M | } else { | 193 | 48.3M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 48.3M | return HashCombine(hash, args...); | 195 | 48.3M | } | 196 | 48.3M | } |
unsigned long tint::Hash<tint::core::type::Type const*, unsigned int>(tint::core::type::Type const* const&, unsigned int const&) Line | Count | Source | 186 | 46.3M | size_t Hash(const ARGS&... args) { | 187 | 46.3M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 46.3M | return 0; | 189 | 46.3M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 46.3M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 46.3M | return Hasher<T>()(args...); | 192 | 46.3M | } else { | 193 | 46.3M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 46.3M | return HashCombine(hash, args...); | 195 | 46.3M | } | 196 | 46.3M | } |
unsigned long tint::Hash<tint::core::type::Type const*, bool>(tint::core::type::Type const* const&, bool const&) Line | Count | Source | 186 | 11.6M | size_t Hash(const ARGS&... args) { | 187 | 11.6M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 11.6M | return 0; | 189 | 11.6M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 11.6M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 11.6M | return Hasher<T>()(args...); | 192 | 11.6M | } else { | 193 | 11.6M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 11.6M | return HashCombine(hash, args...); | 195 | 11.6M | } | 196 | 11.6M | } |
unsigned long tint::Hash<unsigned long, tint::core::type::ArrayCount const*, unsigned int, unsigned int, unsigned int>(unsigned long const&, tint::core::type::ArrayCount const* const&, unsigned int const&, unsigned int const&, unsigned int const&) Line | Count | Source | 186 | 3.82M | size_t Hash(const ARGS&... args) { | 187 | 3.82M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 3.82M | return 0; | 189 | 3.82M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 3.82M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 3.82M | return Hasher<T>()(args...); | 192 | 3.82M | } else { | 193 | 3.82M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 3.82M | return HashCombine(hash, args...); | 195 | 3.82M | } | 196 | 3.82M | } |
unsigned long tint::Hash<tint::core::type::ArrayCount const*>(tint::core::type::ArrayCount const* const&) Line | Count | Source | 186 | 3.82M | size_t Hash(const ARGS&... args) { | 187 | 3.82M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 3.82M | return 0; | 189 | 3.82M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 3.82M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 3.82M | return Hasher<T>()(args...); | 192 | 3.82M | } else { | 193 | 3.82M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 3.82M | return HashCombine(hash, args...); | 195 | 3.82M | } | 196 | 3.82M | } |
unsigned long tint::Hash<unsigned long, tint::core::type::TextureDimension>(unsigned long const&, tint::core::type::TextureDimension const&) Line | Count | Source | 186 | 8.70k | size_t Hash(const ARGS&... args) { | 187 | 8.70k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 8.70k | return 0; | 189 | 8.70k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 8.70k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 8.70k | return Hasher<T>()(args...); | 192 | 8.70k | } else { | 193 | 8.70k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 8.70k | return HashCombine(hash, args...); | 195 | 8.70k | } | 196 | 8.70k | } |
unsigned long tint::Hash<unsigned long, unsigned int, tint::core::type::Vector const*>(unsigned long const&, unsigned int const&, tint::core::type::Vector const* const&) Line | Count | Source | 186 | 3.78M | size_t Hash(const ARGS&... args) { | 187 | 3.78M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 3.78M | return 0; | 189 | 3.78M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 3.78M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 3.78M | return Hasher<T>()(args...); | 192 | 3.78M | } else { | 193 | 3.78M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 3.78M | return HashCombine(hash, args...); | 195 | 3.78M | } | 196 | 3.78M | } |
unsigned long tint::Hash<tint::core::type::Vector const*>(tint::core::type::Vector const* const&) Line | Count | Source | 186 | 3.78M | size_t Hash(const ARGS&... args) { | 187 | 3.78M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 3.78M | return 0; | 189 | 3.78M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 3.78M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 3.78M | return Hasher<T>()(args...); | 192 | 3.78M | } else { | 193 | 3.78M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 3.78M | return HashCombine(hash, args...); | 195 | 3.78M | } | 196 | 3.78M | } |
unsigned long tint::Hash<unsigned long, tint::core::type::TextureDimension, tint::core::type::Type const*>(unsigned long const&, tint::core::type::TextureDimension const&, tint::core::type::Type const* const&) Line | Count | Source | 186 | 21.9k | size_t Hash(const ARGS&... args) { | 187 | 21.9k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 21.9k | return 0; | 189 | 21.9k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 21.9k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 21.9k | return Hasher<T>()(args...); | 192 | 21.9k | } else { | 193 | 21.9k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 21.9k | return HashCombine(hash, args...); | 195 | 21.9k | } | 196 | 21.9k | } |
unsigned long tint::Hash<unsigned long, tint::core::AddressSpace, tint::core::type::Type const*, tint::core::Access>(unsigned long const&, tint::core::AddressSpace const&, tint::core::type::Type const* const&, tint::core::Access const&) Line | Count | Source | 186 | 66.6M | size_t Hash(const ARGS&... args) { | 187 | 66.6M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 66.6M | return 0; | 189 | 66.6M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 66.6M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 66.6M | return Hasher<T>()(args...); | 192 | 66.6M | } else { | 193 | 66.6M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 66.6M | return HashCombine(hash, args...); | 195 | 66.6M | } | 196 | 66.6M | } |
unsigned long tint::Hash<unsigned long, tint::core::type::SamplerKind>(unsigned long const&, tint::core::type::SamplerKind const&) Line | Count | Source | 186 | 48.0k | size_t Hash(const ARGS&... args) { | 187 | 48.0k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 48.0k | return 0; | 189 | 48.0k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 48.0k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 48.0k | return Hasher<T>()(args...); | 192 | 48.0k | } else { | 193 | 48.0k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 48.0k | return HashCombine(hash, args...); | 195 | 48.0k | } | 196 | 48.0k | } |
unsigned long tint::Hash<unsigned long, tint::core::type::TextureDimension, tint::core::TexelFormat, tint::core::Access>(unsigned long const&, tint::core::type::TextureDimension const&, tint::core::TexelFormat const&, tint::core::Access const&) Line | Count | Source | 186 | 27.2k | size_t Hash(const ARGS&... args) { | 187 | 27.2k | if constexpr (sizeof...(ARGS) == 0) { | 188 | 27.2k | return 0; | 189 | 27.2k | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 27.2k | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 27.2k | return Hasher<T>()(args...); | 192 | 27.2k | } else { | 193 | 27.2k | size_t hash = 102931; // seed with an arbitrary prime | 194 | 27.2k | return HashCombine(hash, args...); | 195 | 27.2k | } | 196 | 27.2k | } |
unsigned long tint::Hash<unsigned long, tint::Symbol>(unsigned long const&, tint::Symbol const&) Line | Count | Source | 186 | 1.40M | size_t Hash(const ARGS&... args) { | 187 | 1.40M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 1.40M | return 0; | 189 | 1.40M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 1.40M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 1.40M | return Hasher<T>()(args...); | 192 | 1.40M | } else { | 193 | 1.40M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 1.40M | return HashCombine(hash, args...); | 195 | 1.40M | } | 196 | 1.40M | } |
unsigned long tint::Hash<unsigned long, unsigned int, tint::core::type::Type const*, bool>(unsigned long const&, unsigned int const&, tint::core::type::Type const* const&, bool const&) Line | Count | Source | 186 | 23.5M | size_t Hash(const ARGS&... args) { | 187 | 23.5M | if constexpr (sizeof...(ARGS) == 0) { | 188 | 23.5M | return 0; | 189 | 23.5M | } else if constexpr (sizeof...(ARGS) == 1) { | 190 | 23.5M | using T = std::tuple_element_t<0, std::tuple<ARGS...>>; | 191 | 23.5M | return Hasher<T>()(args...); | 192 | 23.5M | } else { | 193 | 23.5M | size_t hash = 102931; // seed with an arbitrary prime | 194 | 23.5M | return HashCombine(hash, args...); | 195 | 23.5M | } | 196 | 23.5M | } |
|
197 | | |
198 | | /// @param hash the hash value to combine with |
199 | | /// @param values the values to hash |
200 | | /// @returns a hash of the variadic list of arguments. |
201 | | /// The returned hash is dependent on the order of the arguments. |
202 | | template <typename... ARGS> |
203 | 843M | size_t HashCombine(size_t hash, const ARGS&... values) { |
204 | 843M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); |
205 | 843M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); |
206 | 843M | return hash; |
207 | 843M | } unsigned long tint::HashCombine<unsigned int, unsigned int>(unsigned long, unsigned int const&, unsigned int const&) Line | Count | Source | 203 | 130M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 130M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 130M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 130M | return hash; | 207 | 130M | } |
unsigned long tint::HashCombine<tint::BindingPoint, tint::BindingPoint>(unsigned long, tint::BindingPoint const&, tint::BindingPoint const&) Line | Count | Source | 203 | 682 | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 682 | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 682 | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 682 | return hash; | 207 | 682 | } |
unsigned long tint::HashCombine<tint::core::ir::Instruction*, unsigned long>(unsigned long, tint::core::ir::Instruction* const&, unsigned long const&) Line | Count | Source | 203 | 6.34M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 6.34M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 6.34M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 6.34M | return hash; | 207 | 6.34M | } |
unsigned long tint::HashCombine<unsigned char>(unsigned long, unsigned char const&) Line | Count | Source | 203 | 2.66M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 2.66M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 2.66M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 2.66M | return hash; | 207 | 2.66M | } |
unsigned long tint::HashCombine<tint::sem::Variable const*, tint::sem::Variable const*>(unsigned long, tint::sem::Variable const* const&, tint::sem::Variable const* const&) Line | Count | Source | 203 | 13.6k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 13.6k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 13.6k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 13.6k | return hash; | 207 | 13.6k | } |
unsigned long tint::HashCombine<unsigned int>(unsigned long, unsigned int const&) Line | Count | Source | 203 | 12.6k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 12.6k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 12.6k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 12.6k | return hash; | 207 | 12.6k | } |
unsigned long tint::HashCombine<tint::core::type::Type const*, bool, bool>(unsigned long, tint::core::type::Type const* const&, bool const&, bool const&) Line | Count | Source | 203 | 2.48M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 2.48M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 2.48M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 2.48M | return hash; | 207 | 2.48M | } |
unsigned long tint::HashCombine<unsigned long>(unsigned long, unsigned long const&) Line | Count | Source | 203 | 15.5M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 15.5M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 15.5M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 15.5M | return hash; | 207 | 15.5M | } |
unsigned long tint::HashCombine<tint::core::type::Type const*, unsigned long, unsigned long>(unsigned long, tint::core::type::Type const* const&, unsigned long const&, unsigned long const&) Line | Count | Source | 203 | 73.7M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 73.7M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 73.7M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 73.7M | return hash; | 207 | 73.7M | } |
Unexecuted instantiation: unsigned long tint::HashCombine<tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::Op, tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::DataType>(unsigned long, tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::Op const&, tint::hlsl::writer::DecomposeMemoryAccess::Intrinsic::DataType const&) Unexecuted instantiation: unsigned long tint::HashCombine<tint::core::type::Type const*, tint::core::type::Type const*>(unsigned long, tint::core::type::Type const* const&, tint::core::type::Type const* const&) Unexecuted instantiation: unsigned long tint::HashCombine<tint::wgsl::BuiltinFn, tint::EnumSet<tint::ast::PipelineStage>, tint::core::type::Type const*, tint::Vector<tint::sem::Parameter const*, 8ul>, bool>(unsigned long, tint::wgsl::BuiltinFn const&, tint::EnumSet<tint::ast::PipelineStage> const&, tint::core::type::Type const* const&, tint::Vector<tint::sem::Parameter const*, 8ul> const&, bool const&) Unexecuted instantiation: unsigned long tint::HashCombine<tint::sem::Parameter const*>(unsigned long, tint::sem::Parameter const* const&) unsigned long tint::HashCombine<tint::ast::BlockStatement const*, tint::sem::Variable const*>(unsigned long, tint::ast::BlockStatement const* const&, tint::sem::Variable const* const&) Line | Count | Source | 203 | 1.33k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 1.33k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 1.33k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 1.33k | return hash; | 207 | 1.33k | } |
unsigned long tint::HashCombine<tint::core::type::Type const*, tint::wgsl::BuiltinFn, tint::Symbol>(unsigned long, tint::core::type::Type const* const&, tint::wgsl::BuiltinFn const&, tint::Symbol const&) Line | Count | Source | 203 | 44 | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 44 | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 44 | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 44 | return hash; | 207 | 44 | } |
unsigned long tint::HashCombine<tint::core::type::Type const*, tint::Symbol>(unsigned long, tint::core::type::Type const* const&, tint::Symbol const&) Line | Count | Source | 203 | 9.61k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 9.61k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 9.61k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 9.61k | return hash; | 207 | 9.61k | } |
unsigned long tint::HashCombine<tint::Symbol, tint::Symbol>(unsigned long, tint::Symbol const&, tint::Symbol const&) Line | Count | Source | 203 | 1.21k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 1.21k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 1.21k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 1.21k | return hash; | 207 | 1.21k | } |
unsigned long tint::HashCombine<tint::core::AddressSpace, tint::core::type::Struct const*>(unsigned long, tint::core::AddressSpace const&, tint::core::type::Struct const* const&) Line | Count | Source | 203 | 96 | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 96 | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 96 | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 96 | return hash; | 207 | 96 | } |
unsigned long tint::HashCombine<tint::core::AddressSpace, tint::spirv::reader::ast_parser::Type const*, tint::core::Access>(unsigned long, tint::core::AddressSpace const&, tint::spirv::reader::ast_parser::Type const* const&, tint::core::Access const&) Line | Count | Source | 203 | 3.26M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 3.26M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 3.26M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 3.26M | return hash; | 207 | 3.26M | } |
unsigned long tint::HashCombine<tint::spirv::reader::ast_parser::Type const*, unsigned int>(unsigned long, tint::spirv::reader::ast_parser::Type const* const&, unsigned int const&) Line | Count | Source | 203 | 11.3M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 11.3M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 11.3M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 11.3M | return hash; | 207 | 11.3M | } |
unsigned long tint::HashCombine<tint::spirv::reader::ast_parser::Type const*, unsigned int, unsigned int>(unsigned long, tint::spirv::reader::ast_parser::Type const* const&, unsigned int const&, unsigned int const&) Line | Count | Source | 203 | 5.74M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 5.74M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 5.74M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 5.74M | return hash; | 207 | 5.74M | } |
unsigned long tint::HashCombine<tint::core::type::TextureDimension, tint::spirv::reader::ast_parser::Type const*>(unsigned long, tint::core::type::TextureDimension const&, tint::spirv::reader::ast_parser::Type const* const&) Line | Count | Source | 203 | 2.66k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 2.66k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 2.66k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 2.66k | return hash; | 207 | 2.66k | } |
unsigned long tint::HashCombine<tint::core::type::TextureDimension, tint::core::TexelFormat, tint::core::Access>(unsigned long, tint::core::type::TextureDimension const&, tint::core::TexelFormat const&, tint::core::Access const&) Line | Count | Source | 203 | 7.12k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 7.12k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 7.12k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 7.12k | return hash; | 207 | 7.12k | } |
unsigned long tint::HashCombine<unsigned int, tint::core::type::Matrix const*>(unsigned long, unsigned int const&, tint::core::type::Matrix const* const&) Line | Count | Source | 203 | 3.14k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 3.14k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 3.14k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 3.14k | return hash; | 207 | 3.14k | } |
unsigned long tint::HashCombine<unsigned int, tint::spirv::writer::ScalarConstant::Kind>(unsigned long, unsigned int const&, tint::spirv::writer::ScalarConstant::Kind const&) Line | Count | Source | 203 | 692k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 692k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 692k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 692k | return hash; | 207 | 692k | } |
unsigned long tint::HashCombine<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >(unsigned long, std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) Line | Count | Source | 203 | 540k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 540k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 540k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 540k | return hash; | 207 | 540k | } |
Unexecuted instantiation: unsigned long tint::HashCombine<tint::core::type::Matrix const*, tint::core::type::Matrix const*>(unsigned long, tint::core::type::Matrix const* const&, tint::core::type::Matrix const* const&) unsigned long tint::HashCombine<tint::core::BinaryOp, tint::core::type::Type const*, tint::core::type::Type const*>(unsigned long, tint::core::BinaryOp const&, tint::core::type::Type const* const&, tint::core::type::Type const* const&) Line | Count | Source | 203 | 764 | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 764 | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 764 | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 764 | return hash; | 207 | 764 | } |
direct_variable_access.cc:unsigned long tint::HashCombine<tint::sem::Parameter const*, tint::ast::transform::(anonymous namespace)::AccessShape>(unsigned long, tint::sem::Parameter const* const&, tint::ast::transform::(anonymous namespace)::AccessShape const&) Line | Count | Source | 203 | 781 | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 781 | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 781 | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 781 | return hash; | 207 | 781 | } |
direct_variable_access.cc:unsigned long tint::HashCombine<tint::ast::transform::(anonymous namespace)::AccessRoot, tint::Vector<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex>, 8ul> >(unsigned long, tint::ast::transform::(anonymous namespace)::AccessRoot const&, tint::Vector<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex>, 8ul> const&) Line | Count | Source | 203 | 2.28k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 2.28k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 2.28k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 2.28k | return hash; | 207 | 2.28k | } |
unsigned long tint::HashCombine<tint::core::type::Type const*, tint::sem::Variable const*>(unsigned long, tint::core::type::Type const* const&, tint::sem::Variable const* const&) Line | Count | Source | 203 | 2.28k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 2.28k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 2.28k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 2.28k | return hash; | 207 | 2.28k | } |
direct_variable_access.cc:unsigned long tint::HashCombine<std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex> >(unsigned long, std::__1::variant<tint::Symbol, tint::ast::transform::(anonymous namespace)::DynamicIndex> const&) Line | Count | Source | 203 | 3.17k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 3.17k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 3.17k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 3.17k | return hash; | 207 | 3.17k | } |
Unexecuted instantiation: unsigned long tint::HashCombine<tint::core::type::Type const*>(unsigned long, tint::core::type::Type const* const&) Unexecuted instantiation: std140.cc:unsigned long tint::HashCombine<tint::sem::GlobalVariable const*, tint::Vector<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> >, 8ul> >(unsigned long, tint::sem::GlobalVariable const* const&, tint::Vector<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> >, 8ul> const&) Unexecuted instantiation: std140.cc:unsigned long tint::HashCombine<std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > >(unsigned long, std::__1::variant<tint::ast::transform::(anonymous namespace)::UniformVariable, tint::core::Number<unsigned int>, tint::ast::transform::(anonymous namespace)::DynamicIndex, tint::Vector<unsigned int, 4ul> > const&) unsigned long tint::HashCombine<tint::core::type::Type const*, tint::core::ParameterUsage>(unsigned long, tint::core::type::Type const* const&, tint::core::ParameterUsage const&) Line | Count | Source | 203 | 4.39M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 4.39M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 4.39M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 4.39M | return hash; | 207 | 4.39M | } |
unsigned long tint::HashCombine<unsigned long, tint::core::intrinsic::OverloadInfo const*, tint::core::type::Type const*>(unsigned long, unsigned long const&, tint::core::intrinsic::OverloadInfo const* const&, tint::core::type::Type const* const&) Line | Count | Source | 203 | 6.30M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 6.30M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 6.30M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 6.30M | return hash; | 207 | 6.30M | } |
unsigned long tint::HashCombine<tint::core::type::Type const*, tint::core::AddressSpace>(unsigned long, tint::core::type::Type const* const&, tint::core::AddressSpace const&) Line | Count | Source | 203 | 4.33M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 4.33M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 4.33M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 4.33M | return hash; | 207 | 4.33M | } |
unsigned long tint::HashCombine<tint::core::intrinsic::Overload, tint::wgsl::BuiltinFn>(unsigned long, tint::core::intrinsic::Overload const&, tint::wgsl::BuiltinFn const&) Line | Count | Source | 203 | 1.46M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 1.46M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 1.46M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 1.46M | return hash; | 207 | 1.46M | } |
unsigned long tint::HashCombine<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage>(unsigned long, tint::core::type::Array const* const&, unsigned long const&, tint::core::EvaluationStage const&) Line | Count | Source | 203 | 1.33M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 1.33M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 1.33M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 1.33M | return hash; | 207 | 1.33M | } |
unsigned long tint::HashCombine<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage>(unsigned long, tint::core::type::Struct const* const&, unsigned long const&, tint::core::EvaluationStage const&) Line | Count | Source | 203 | 2.94M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 2.94M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 2.94M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 2.94M | return hash; | 207 | 2.94M | } |
dependency_graph.cc:unsigned long tint::HashCombine<tint::resolver::(anonymous namespace)::Global const*, tint::resolver::(anonymous namespace)::Global const*>(unsigned long, tint::resolver::(anonymous namespace)::Global const* const&, tint::resolver::(anonymous namespace)::Global const* const&) Line | Count | Source | 203 | 72.3M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 72.3M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 72.3M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 72.3M | return hash; | 207 | 72.3M | } |
unsigned long tint::HashCombine<unsigned long, tint::core::type::Type const*>(unsigned long, unsigned long const&, tint::core::type::Type const* const&) Line | Count | Source | 203 | 1.82M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 1.82M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 1.82M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 1.82M | return hash; | 207 | 1.82M | } |
Unexecuted instantiation: unsigned long tint::HashCombine<tint::core::ir::Value*, tint::Vector<tint::core::ir::Value*, 4ul> >(unsigned long, tint::core::ir::Value* const&, tint::Vector<tint::core::ir::Value*, 4ul> const&) Unexecuted instantiation: unsigned long tint::HashCombine<tint::core::ir::Value*>(unsigned long, tint::core::ir::Value* const&) unsigned long tint::HashCombine<tint::core::type::Type const*, long>(unsigned long, tint::core::type::Type const* const&, long const&) Line | Count | Source | 203 | 90.8M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 90.8M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 90.8M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 90.8M | return hash; | 207 | 90.8M | } |
unsigned long tint::HashCombine<tint::core::type::Type const*, double>(unsigned long, tint::core::type::Type const* const&, double const&) Line | Count | Source | 203 | 27.6k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 27.6k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 27.6k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 27.6k | return hash; | 207 | 27.6k | } |
unsigned long tint::HashCombine<tint::core::type::Type const*, int>(unsigned long, tint::core::type::Type const* const&, int const&) Line | Count | Source | 203 | 198M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 198M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 198M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 198M | return hash; | 207 | 198M | } |
unsigned long tint::HashCombine<tint::core::type::Type const*, float>(unsigned long, tint::core::type::Type const* const&, float const&) Line | Count | Source | 203 | 48.3M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 48.3M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 48.3M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 48.3M | return hash; | 207 | 48.3M | } |
unsigned long tint::HashCombine<tint::core::type::Type const*, unsigned int>(unsigned long, tint::core::type::Type const* const&, unsigned int const&) Line | Count | Source | 203 | 46.3M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 46.3M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 46.3M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 46.3M | return hash; | 207 | 46.3M | } |
unsigned long tint::HashCombine<tint::core::type::Type const*, bool>(unsigned long, tint::core::type::Type const* const&, bool const&) Line | Count | Source | 203 | 11.6M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 11.6M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 11.6M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 11.6M | return hash; | 207 | 11.6M | } |
unsigned long tint::HashCombine<unsigned long, tint::core::type::ArrayCount const*, unsigned int, unsigned int, unsigned int>(unsigned long, unsigned long const&, tint::core::type::ArrayCount const* const&, unsigned int const&, unsigned int const&, unsigned int const&) Line | Count | Source | 203 | 3.82M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 3.82M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 3.82M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 3.82M | return hash; | 207 | 3.82M | } |
unsigned long tint::HashCombine<unsigned long, tint::core::type::TextureDimension>(unsigned long, unsigned long const&, tint::core::type::TextureDimension const&) Line | Count | Source | 203 | 8.70k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 8.70k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 8.70k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 8.70k | return hash; | 207 | 8.70k | } |
unsigned long tint::HashCombine<unsigned long, unsigned int, tint::core::type::Vector const*>(unsigned long, unsigned long const&, unsigned int const&, tint::core::type::Vector const* const&) Line | Count | Source | 203 | 3.78M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 3.78M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 3.78M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 3.78M | return hash; | 207 | 3.78M | } |
unsigned long tint::HashCombine<unsigned long, tint::core::type::TextureDimension, tint::core::type::Type const*>(unsigned long, unsigned long const&, tint::core::type::TextureDimension const&, tint::core::type::Type const* const&) Line | Count | Source | 203 | 21.9k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 21.9k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 21.9k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 21.9k | return hash; | 207 | 21.9k | } |
unsigned long tint::HashCombine<unsigned long, tint::core::AddressSpace, tint::core::type::Type const*, tint::core::Access>(unsigned long, unsigned long const&, tint::core::AddressSpace const&, tint::core::type::Type const* const&, tint::core::Access const&) Line | Count | Source | 203 | 66.6M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 66.6M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 66.6M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 66.6M | return hash; | 207 | 66.6M | } |
unsigned long tint::HashCombine<unsigned long, tint::core::type::SamplerKind>(unsigned long, unsigned long const&, tint::core::type::SamplerKind const&) Line | Count | Source | 203 | 48.0k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 48.0k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 48.0k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 48.0k | return hash; | 207 | 48.0k | } |
unsigned long tint::HashCombine<unsigned long, tint::core::type::TextureDimension, tint::core::TexelFormat, tint::core::Access>(unsigned long, unsigned long const&, tint::core::type::TextureDimension const&, tint::core::TexelFormat const&, tint::core::Access const&) Line | Count | Source | 203 | 27.2k | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 27.2k | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 27.2k | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 27.2k | return hash; | 207 | 27.2k | } |
unsigned long tint::HashCombine<unsigned long, tint::Symbol>(unsigned long, unsigned long const&, tint::Symbol const&) Line | Count | Source | 203 | 1.40M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 1.40M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 1.40M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 1.40M | return hash; | 207 | 1.40M | } |
unsigned long tint::HashCombine<unsigned long, unsigned int, tint::core::type::Type const*, bool>(unsigned long, unsigned long const&, unsigned int const&, tint::core::type::Type const* const&, bool const&) Line | Count | Source | 203 | 23.5M | size_t HashCombine(size_t hash, const ARGS&... values) { | 204 | 23.5M | constexpr size_t offset = tint::detail::HashCombineOffset<sizeof(size_t)>::value(); | 205 | 23.5M | ((hash ^= Hash(values) + (offset ^ (hash >> 2))), ...); | 206 | 23.5M | return hash; | 207 | 23.5M | } |
|
208 | | |
209 | | /// A STL-compatible equal_to implementation that specializes for types. |
210 | | template <typename T> |
211 | | struct EqualTo { |
212 | | /// @param lhs the left hand side value |
213 | | /// @param rhs the right hand side value |
214 | | /// @returns true if the two values are equal |
215 | 930M | constexpr bool operator()(const T& lhs, const T& rhs) const { |
216 | 930M | return std::equal_to<T>()(lhs, rhs); |
217 | 930M | } Unexecuted instantiation: tint::EqualTo<tint::core::type::Struct const*>::operator()(tint::core::type::Struct const* const&, tint::core::type::Struct const* const&) const tint::EqualTo<tint::core::ir::Value*>::operator()(tint::core::ir::Value* const&, tint::core::ir::Value* const&) const Line | Count | Source | 215 | 4.18M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 4.18M | return std::equal_to<T>()(lhs, rhs); | 217 | 4.18M | } |
tint::EqualTo<std::__1::basic_string_view<char, std::__1::char_traits<char> > >::operator()(std::__1::basic_string_view<char, std::__1::char_traits<char> > const&, std::__1::basic_string_view<char, std::__1::char_traits<char> > const&) const Line | Count | Source | 215 | 180M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 180M | return std::equal_to<T>()(lhs, rhs); | 217 | 180M | } |
tint::EqualTo<void const*>::operator()(void const* const&, void const* const&) const Line | Count | Source | 215 | 1.77M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 1.77M | return std::equal_to<T>()(lhs, rhs); | 217 | 1.77M | } |
tint::EqualTo<tint::ast::Node const*>::operator()(tint::ast::Node const* const&, tint::ast::Node const* const&) const Line | Count | Source | 215 | 1.19M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 1.19M | return std::equal_to<T>()(lhs, rhs); | 217 | 1.19M | } |
tint::EqualTo<tint::ast::SwitchStatement const*>::operator()(tint::ast::SwitchStatement const* const&, tint::ast::SwitchStatement const* const&) const Line | Count | Source | 215 | 51 | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 51 | return std::equal_to<T>()(lhs, rhs); | 217 | 51 | } |
Unexecuted instantiation: tint::EqualTo<tint::sem::LoopBlockStatement const*>::operator()(tint::sem::LoopBlockStatement const* const&, tint::sem::LoopBlockStatement const* const&) const Unexecuted instantiation: tint::EqualTo<tint::sem::Struct const*>::operator()(tint::sem::Struct const* const&, tint::sem::Struct const* const&) const tint::EqualTo<tint::sem::Function const*>::operator()(tint::sem::Function const* const&, tint::sem::Function const* const&) const Line | Count | Source | 215 | 427 | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 427 | return std::equal_to<T>()(lhs, rhs); | 217 | 427 | } |
tint::EqualTo<unsigned int>::operator()(unsigned int const&, unsigned int const&) const Line | Count | Source | 215 | 803k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 803k | return std::equal_to<T>()(lhs, rhs); | 217 | 803k | } |
tint::EqualTo<tint::core::type::Type const*>::operator()(tint::core::type::Type const* const&, tint::core::type::Type const* const&) const Line | Count | Source | 215 | 9.71M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 9.71M | return std::equal_to<T>()(lhs, rhs); | 217 | 9.71M | } |
tint::EqualTo<tint::core::type::StructMember const*>::operator()(tint::core::type::StructMember const* const&, tint::core::type::StructMember const* const&) const Line | Count | Source | 215 | 4.46k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 4.46k | return std::equal_to<T>()(lhs, rhs); | 217 | 4.46k | } |
tint::EqualTo<tint::sem::Variable const*>::operator()(tint::sem::Variable const* const&, tint::sem::Variable const* const&) const Line | Count | Source | 215 | 27.4M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 27.4M | return std::equal_to<T>()(lhs, rhs); | 217 | 27.4M | } |
tint::EqualTo<tint::core::constant::Value const*>::operator()(tint::core::constant::Value const* const&, tint::core::constant::Value const* const&) const Line | Count | Source | 215 | 2.47M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 2.47M | return std::equal_to<T>()(lhs, rhs); | 217 | 2.47M | } |
tint::EqualTo<tint::ast::Expression const*>::operator()(tint::ast::Expression const* const&, tint::ast::Expression const* const&) const Line | Count | Source | 215 | 1.78M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 1.78M | return std::equal_to<T>()(lhs, rhs); | 217 | 1.78M | } |
tint::EqualTo<tint::Symbol>::operator()(tint::Symbol const&, tint::Symbol const&) const Line | Count | Source | 215 | 559M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 559M | return std::equal_to<T>()(lhs, rhs); | 217 | 559M | } |
Unexecuted instantiation: tint::EqualTo<tint::CastableBase*>::operator()(tint::CastableBase* const&, tint::CastableBase* const&) const tint::EqualTo<tint::core::ir::Block*>::operator()(tint::core::ir::Block* const&, tint::core::ir::Block* const&) const Line | Count | Source | 215 | 10.5k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 10.5k | return std::equal_to<T>()(lhs, rhs); | 217 | 10.5k | } |
tint::EqualTo<tint::spirv::writer::Printer::FunctionType>::operator()(tint::spirv::writer::Printer::FunctionType const&, tint::spirv::writer::Printer::FunctionType const&) const Line | Count | Source | 215 | 3.84k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 3.84k | return std::equal_to<T>()(lhs, rhs); | 217 | 3.84k | } |
Unexecuted instantiation: tint::EqualTo<tint::core::ir::ControlInstruction*>::operator()(tint::core::ir::ControlInstruction* const&, tint::core::ir::ControlInstruction* const&) const Unexecuted instantiation: tint::EqualTo<tint::ast::Struct const*>::operator()(tint::ast::Struct const* const&, tint::ast::Struct const* const&) const tint::EqualTo<tint::sem::BuiltinFn const*>::operator()(tint::sem::BuiltinFn const* const&, tint::sem::BuiltinFn const* const&) const Line | Count | Source | 215 | 624 | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 624 | return std::equal_to<T>()(lhs, rhs); | 217 | 624 | } |
tint::EqualTo<std::__1::tuple<tint::core::BinaryOp, tint::core::type::Type const*, tint::core::type::Type const*> >::operator()(std::__1::tuple<tint::core::BinaryOp, tint::core::type::Type const*, tint::core::type::Type const*> const&, std::__1::tuple<tint::core::BinaryOp, tint::core::type::Type const*, tint::core::type::Type const*> const&) const Line | Count | Source | 215 | 115 | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 115 | return std::equal_to<T>()(lhs, rhs); | 217 | 115 | } |
tint::EqualTo<tint::ast::BuiltinAttribute const*>::operator()(tint::ast::BuiltinAttribute const* const&, tint::ast::BuiltinAttribute const* const&) const Line | Count | Source | 215 | 13.4k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 13.4k | return std::equal_to<T>()(lhs, rhs); | 217 | 13.4k | } |
tint::EqualTo<tint::core::BuiltinValue>::operator()(tint::core::BuiltinValue const&, tint::core::BuiltinValue const&) const Line | Count | Source | 215 | 57.7k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 57.7k | return std::equal_to<T>()(lhs, rhs); | 217 | 57.7k | } |
tint::EqualTo<tint::sem::ValueExpression const*>::operator()(tint::sem::ValueExpression const* const&, tint::sem::ValueExpression const* const&) const Line | Count | Source | 215 | 13.2k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 13.2k | return std::equal_to<T>()(lhs, rhs); | 217 | 13.2k | } |
direct_variable_access.cc:tint::EqualTo<tint::Hashmap<tint::sem::Parameter const*, tint::ast::transform::(anonymous namespace)::AccessShape, 4ul, tint::Hasher<tint::sem::Parameter const*>, tint::EqualTo<tint::sem::Parameter const*> > >::operator()(tint::Hashmap<tint::sem::Parameter const*, tint::ast::transform::(anonymous namespace)::AccessShape, 4ul, tint::Hasher<tint::sem::Parameter const*>, tint::EqualTo<tint::sem::Parameter const*> > const&, tint::Hashmap<tint::sem::Parameter const*, tint::ast::transform::(anonymous namespace)::AccessShape, 4ul, tint::Hasher<tint::sem::Parameter const*>, tint::EqualTo<tint::sem::Parameter const*> > const&) const Line | Count | Source | 215 | 21 | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 21 | return std::equal_to<T>()(lhs, rhs); | 217 | 21 | } |
tint::EqualTo<tint::sem::Parameter const*>::operator()(tint::sem::Parameter const* const&, tint::sem::Parameter const* const&) const Line | Count | Source | 215 | 6.37k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 6.37k | return std::equal_to<T>()(lhs, rhs); | 217 | 6.37k | } |
tint::EqualTo<tint::sem::Call const*>::operator()(tint::sem::Call const* const&, tint::sem::Call const* const&) const Line | Count | Source | 215 | 427 | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 427 | return std::equal_to<T>()(lhs, rhs); | 217 | 427 | } |
direct_variable_access.cc:tint::EqualTo<tint::ast::transform::(anonymous namespace)::AccessShape>::operator()(tint::ast::transform::(anonymous namespace)::AccessShape const&, tint::ast::transform::(anonymous namespace)::AccessShape const&) const Line | Count | Source | 215 | 296 | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 296 | return std::equal_to<T>()(lhs, rhs); | 217 | 296 | } |
Unexecuted instantiation: tint::EqualTo<tint::ast::IfStatement const*>::operator()(tint::ast::IfStatement const* const&, tint::ast::IfStatement const* const&) const Unexecuted instantiation: tint::EqualTo<tint::sem::ForLoopStatement const*>::operator()(tint::sem::ForLoopStatement const* const&, tint::sem::ForLoopStatement const* const&) const Unexecuted instantiation: tint::EqualTo<tint::sem::WhileStatement const*>::operator()(tint::sem::WhileStatement const* const&, tint::sem::WhileStatement const* const&) const Unexecuted instantiation: tint::EqualTo<tint::sem::CallTarget const*>::operator()(tint::sem::CallTarget const* const&, tint::sem::CallTarget const* const&) const Unexecuted instantiation: tint::EqualTo<std::__1::vector<tint::core::type::Type const*, std::__1::allocator<tint::core::type::Type const*> > >::operator()(std::__1::vector<tint::core::type::Type const*, std::__1::allocator<tint::core::type::Type const*> > const&, std::__1::vector<tint::core::type::Type const*, std::__1::allocator<tint::core::type::Type const*> > const&) const Unexecuted instantiation: tint::EqualTo<tint::core::type::Matrix const*>::operator()(tint::core::type::Matrix const* const&, tint::core::type::Matrix const* const&) const Unexecuted instantiation: tint::EqualTo<tint::ast::transform::Std140::State::LoadFnKey>::operator()(tint::ast::transform::Std140::State::LoadFnKey const&, tint::ast::transform::Std140::State::LoadFnKey const&) const tint::EqualTo<tint::OverrideId>::operator()(tint::OverrideId const&, tint::OverrideId const&) const Line | Count | Source | 215 | 1.74k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 1.74k | return std::equal_to<T>()(lhs, rhs); | 217 | 1.74k | } |
tint::EqualTo<std::__1::pair<tint::core::intrinsic::Overload, tint::wgsl::BuiltinFn> >::operator()(std::__1::pair<tint::core::intrinsic::Overload, tint::wgsl::BuiltinFn> const&, std::__1::pair<tint::core::intrinsic::Overload, tint::wgsl::BuiltinFn> const&) const Line | Count | Source | 215 | 1.28M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 1.28M | return std::equal_to<T>()(lhs, rhs); | 217 | 1.28M | } |
tint::EqualTo<tint::core::intrinsic::Overload>::operator()(tint::core::intrinsic::Overload const&, tint::core::intrinsic::Overload const&) const Line | Count | Source | 215 | 4.32M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 4.32M | return std::equal_to<T>()(lhs, rhs); | 217 | 4.32M | } |
tint::EqualTo<tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> > >::operator()(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> > const&, tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> > const&) const Line | Count | Source | 215 | 1.24M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 1.24M | return std::equal_to<T>()(lhs, rhs); | 217 | 1.24M | } |
tint::EqualTo<tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> > >::operator()(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> > const&, tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> > const&) const Line | Count | Source | 215 | 2.76M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 2.76M | return std::equal_to<T>()(lhs, rhs); | 217 | 2.76M | } |
tint::EqualTo<tint::ast::Identifier const*>::operator()(tint::ast::Identifier const* const&, tint::ast::Identifier const* const&) const Line | Count | Source | 215 | 128M | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 128M | return std::equal_to<T>()(lhs, rhs); | 217 | 128M | } |
tint::EqualTo<std::__1::variant<tint::wgsl::CoreDiagnosticRule, tint::wgsl::ChromiumDiagnosticRule> >::operator()(std::__1::variant<tint::wgsl::CoreDiagnosticRule, tint::wgsl::ChromiumDiagnosticRule> const&, std::__1::variant<tint::wgsl::CoreDiagnosticRule, tint::wgsl::ChromiumDiagnosticRule> const&) const Line | Count | Source | 215 | 987k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 987k | return std::equal_to<T>()(lhs, rhs); | 217 | 987k | } |
tint::EqualTo<tint::ast::Function const*>::operator()(tint::ast::Function const* const&, tint::ast::Function const* const&) const Line | Count | Source | 215 | 750k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 750k | return std::equal_to<T>()(lhs, rhs); | 217 | 750k | } |
tint::EqualTo<tint::sem::Statement const*>::operator()(tint::sem::Statement const* const&, tint::sem::Statement const* const&) const Line | Count | Source | 215 | 374k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 374k | return std::equal_to<T>()(lhs, rhs); | 217 | 374k | } |
tint::EqualTo<tint::BindingPoint>::operator()(tint::BindingPoint const&, tint::BindingPoint const&) const Line | Count | Source | 215 | 395 | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 395 | return std::equal_to<T>()(lhs, rhs); | 217 | 395 | } |
Unexecuted instantiation: tint::EqualTo<long>::operator()(long const&, long const&) const tint::EqualTo<tint::TypeInfo const*>::operator()(tint::TypeInfo const* const&, tint::TypeInfo const* const&) const Line | Count | Source | 215 | 5.81k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 5.81k | return std::equal_to<T>()(lhs, rhs); | 217 | 5.81k | } |
Unexecuted instantiation: tint::EqualTo<std::__1::pair<tint::Symbol, tint::Symbol> >::operator()(std::__1::pair<tint::Symbol, tint::Symbol> const&, std::__1::pair<tint::Symbol, tint::Symbol> const&) const Unexecuted instantiation: tint::EqualTo<tint::ast::Variable const*>::operator()(tint::ast::Variable const* const&, tint::ast::Variable const* const&) const Unexecuted instantiation: var_for_dynamic_index.cc:tint::EqualTo<tint::spirv::writer::raise::(anonymous namespace)::PartialAccess>::operator()(tint::spirv::writer::raise::(anonymous namespace)::PartialAccess const&, tint::spirv::writer::raise::(anonymous namespace)::PartialAccess const&) const tint::EqualTo<tint::core::ir::Function*>::operator()(tint::core::ir::Function* const&, tint::core::ir::Function* const&) const Line | Count | Source | 215 | 2.62k | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 2.62k | return std::equal_to<T>()(lhs, rhs); | 217 | 2.62k | } |
tint::EqualTo<tint::core::ir::Var*>::operator()(tint::core::ir::Var* const&, tint::core::ir::Var* const&) const Line | Count | Source | 215 | 306 | constexpr bool operator()(const T& lhs, const T& rhs) const { | 216 | 306 | return std::equal_to<T>()(lhs, rhs); | 217 | 306 | } |
Unexecuted instantiation: tint::EqualTo<tint::core::ir::Instruction*>::operator()(tint::core::ir::Instruction* const&, tint::core::ir::Instruction* const&) const Unexecuted instantiation: tint::EqualTo<tint::core::ir::Usage>::operator()(tint::core::ir::Usage const&, tint::core::ir::Usage const&) const Unexecuted instantiation: tint::EqualTo<tint::core::ir::If*>::operator()(tint::core::ir::If* const&, tint::core::ir::If* const&) const Unexecuted instantiation: tint::EqualTo<tint::core::ir::Loop*>::operator()(tint::core::ir::Loop* const&, tint::core::ir::Loop* const&) const Unexecuted instantiation: tint::EqualTo<tint::core::ir::Switch*>::operator()(tint::core::ir::Switch* const&, tint::core::ir::Switch* const&) const |
218 | | }; |
219 | | |
220 | | /// A specialization for EqualTo for std::string, which supports additional comparision with |
221 | | /// std::string_view and const char*. |
222 | | template <> |
223 | | struct EqualTo<std::string> { |
224 | | /// @param lhs the left hand side value |
225 | | /// @param rhs the right hand side value |
226 | | /// @returns true if the two values are equal |
227 | 313k | bool operator()(const std::string& lhs, const std::string& rhs) const { return lhs == rhs; } |
228 | | |
229 | | /// @param lhs the left hand side value |
230 | | /// @param rhs the right hand side value |
231 | | /// @returns true if the two values are equal |
232 | 0 | bool operator()(const std::string& lhs, const char* rhs) const { return lhs == rhs; } |
233 | | |
234 | | /// @param lhs the left hand side value |
235 | | /// @param rhs the right hand side value |
236 | | /// @returns true if the two values are equal |
237 | 0 | bool operator()(const std::string& lhs, std::string_view rhs) const { return lhs == rhs; } |
238 | | |
239 | | /// @param lhs the left hand side value |
240 | | /// @param rhs the right hand side value |
241 | | /// @returns true if the two values are equal |
242 | 0 | bool operator()(const char* lhs, const std::string& rhs) const { return lhs == rhs; } |
243 | | |
244 | | /// @param lhs the left hand side value |
245 | | /// @param rhs the right hand side value |
246 | | /// @returns true if the two values are equal |
247 | 0 | bool operator()(std::string_view lhs, const std::string& rhs) const { return lhs == rhs; } |
248 | | }; |
249 | | |
250 | | /// Wrapper for a hashable type enabling the wrapped value to be used as a key |
251 | | /// for an unordered_map or unordered_set. |
252 | | template <typename T> |
253 | | struct UnorderedKeyWrapper { |
254 | | /// The wrapped value |
255 | | T value; |
256 | | /// The hash of value |
257 | | size_t hash; |
258 | | |
259 | | /// Constructor |
260 | | /// @param v the value to wrap |
261 | 58.6k | explicit UnorderedKeyWrapper(const T& v) : value(v), hash(Hash(v)) {} |
262 | | |
263 | | /// Move constructor |
264 | | /// @param v the value to wrap |
265 | 4.27M | explicit UnorderedKeyWrapper(T&& v) : value(std::move(v)), hash(Hash(value)) {} Unexecuted instantiation: tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Type const*, tint::core::type::Type const*> >::UnorderedKeyWrapper(std::__1::tuple<tint::core::type::Type const*, tint::core::type::Type const*>&&) tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::AddressSpace, tint::core::type::Struct const*> >::UnorderedKeyWrapper(std::__1::tuple<tint::core::AddressSpace, tint::core::type::Struct const*>&&) Line | Count | Source | 265 | 96 | explicit UnorderedKeyWrapper(T&& v) : value(std::move(v)), hash(Hash(value)) {} |
Unexecuted instantiation: tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Matrix const*, tint::core::type::Matrix const*> >::UnorderedKeyWrapper(std::__1::tuple<tint::core::type::Matrix const*, tint::core::type::Matrix const*>&&) tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> >::UnorderedKeyWrapper(std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage>&&) Line | Count | Source | 265 | 1.33M | explicit UnorderedKeyWrapper(T&& v) : value(std::move(v)), hash(Hash(value)) {} |
tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> >::UnorderedKeyWrapper(std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage>&&) Line | Count | Source | 265 | 2.94M | explicit UnorderedKeyWrapper(T&& v) : value(std::move(v)), hash(Hash(value)) {} |
|
266 | | |
267 | | /// @returns true if this wrapper comes before other |
268 | | /// @param other the RHS of the operator |
269 | | bool operator<(const UnorderedKeyWrapper& other) const { return hash < other.hash; } |
270 | | |
271 | | /// @returns true if this wrapped value is equal to the other wrapped value |
272 | | /// @param other the RHS of the operator |
273 | 4.06M | bool operator==(const UnorderedKeyWrapper& other) const { return value == other.value; } Unexecuted instantiation: tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Type const*, tint::core::type::Type const*> >::operator==(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Type const*, tint::core::type::Type const*> > const&) const tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::AddressSpace, tint::core::type::Struct const*> >::operator==(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::AddressSpace, tint::core::type::Struct const*> > const&) const Line | Count | Source | 273 | 68 | bool operator==(const UnorderedKeyWrapper& other) const { return value == other.value; } |
tint::UnorderedKeyWrapper<std::__1::vector<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > >::operator==(tint::UnorderedKeyWrapper<std::__1::vector<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > > const&) const Line | Count | Source | 273 | 59.9k | bool operator==(const UnorderedKeyWrapper& other) const { return value == other.value; } |
Unexecuted instantiation: tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Matrix const*, tint::core::type::Matrix const*> >::operator==(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Matrix const*, tint::core::type::Matrix const*> > const&) const tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> >::operator==(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> > const&) const Line | Count | Source | 273 | 1.24M | bool operator==(const UnorderedKeyWrapper& other) const { return value == other.value; } |
tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> >::operator==(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> > const&) const Line | Count | Source | 273 | 2.76M | bool operator==(const UnorderedKeyWrapper& other) const { return value == other.value; } |
|
274 | | }; |
275 | | |
276 | | } // namespace tint |
277 | | |
278 | | namespace std { |
279 | | |
280 | | /// Custom std::hash specialization for tint::UnorderedKeyWrapper |
281 | | template <typename T> |
282 | | class hash<tint::UnorderedKeyWrapper<T>> { |
283 | | public: |
284 | | /// @param w the UnorderedKeyWrapper |
285 | | /// @return the hash value |
286 | 4.41M | inline std::size_t operator()(const tint::UnorderedKeyWrapper<T>& w) const { return w.hash; } Unexecuted instantiation: std::__1::hash<tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Type const*, tint::core::type::Type const*> > >::operator()(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Type const*, tint::core::type::Type const*> > const&) const std::__1::hash<tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::AddressSpace, tint::core::type::Struct const*> > >::operator()(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::AddressSpace, tint::core::type::Struct const*> > const&) const Line | Count | Source | 286 | 124 | inline std::size_t operator()(const tint::UnorderedKeyWrapper<T>& w) const { return w.hash; } |
std::__1::hash<tint::UnorderedKeyWrapper<std::__1::vector<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > > >::operator()(tint::UnorderedKeyWrapper<std::__1::vector<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::variant<unsigned int, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > > const&) const Line | Count | Source | 286 | 72.3k | inline std::size_t operator()(const tint::UnorderedKeyWrapper<T>& w) const { return w.hash; } |
Unexecuted instantiation: std::__1::hash<tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Matrix const*, tint::core::type::Matrix const*> > >::operator()(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Matrix const*, tint::core::type::Matrix const*> > const&) const std::__1::hash<tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> > >::operator()(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Array const*, unsigned long, tint::core::EvaluationStage> > const&) const Line | Count | Source | 286 | 1.35M | inline std::size_t operator()(const tint::UnorderedKeyWrapper<T>& w) const { return w.hash; } |
std::__1::hash<tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> > >::operator()(tint::UnorderedKeyWrapper<std::__1::tuple<tint::core::type::Struct const*, unsigned long, tint::core::EvaluationStage> > const&) const Line | Count | Source | 286 | 2.98M | inline std::size_t operator()(const tint::UnorderedKeyWrapper<T>& w) const { return w.hash; } |
|
287 | | }; |
288 | | |
289 | | } // namespace std |
290 | | |
291 | | #endif // SRC_TINT_UTILS_MATH_HASH_H_ |