Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/opt/relax_float_ops_pass.h')
-rw-r--r--source/opt/relax_float_ops_pass.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/opt/relax_float_ops_pass.h b/source/opt/relax_float_ops_pass.h
index 5ee3d73c8..9e4606f8d 100644
--- a/source/opt/relax_float_ops_pass.h
+++ b/source/opt/relax_float_ops_pass.h
@@ -61,17 +61,23 @@ class RelaxFloatOpsPass : public Pass {
// Initialize state for converting to half
void Initialize();
+ struct hasher {
+ size_t operator()(const spv::Op& op) const noexcept {
+ return std::hash<uint32_t>()(uint32_t(op));
+ }
+ };
+
// Set of float result core operations to be processed
- std::unordered_set<uint32_t> target_ops_core_f_rslt_;
+ std::unordered_set<spv::Op, hasher> target_ops_core_f_rslt_;
// Set of float operand core operations to be processed
- std::unordered_set<uint32_t> target_ops_core_f_opnd_;
+ std::unordered_set<spv::Op, hasher> target_ops_core_f_opnd_;
// Set of 450 extension operations to be processed
std::unordered_set<uint32_t> target_ops_450_;
// Set of sample operations
- std::unordered_set<uint32_t> sample_ops_;
+ std::unordered_set<spv::Op, hasher> sample_ops_;
};
} // namespace opt