From 93a5919cee90fabbd1be29b2cd43bcfdaf4d120c Mon Sep 17 00:00:00 2001 From: Natalie Vock Date: Mon, 17 Feb 2025 18:42:47 +0100 Subject: [PATCH] aco/util: Add aco::unordered_set Part-of: --- src/amd/compiler/aco_util.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/amd/compiler/aco_util.h b/src/amd/compiler/aco_util.h index 910feb0ca9c..2cceeb3c314 100644 --- a/src/amd/compiler/aco_util.h +++ b/src/amd/compiler/aco_util.h @@ -21,6 +21,7 @@ #include #include #include +#include #include namespace aco { @@ -391,6 +392,14 @@ template , class Pred = std::equ using unordered_map = std::unordered_map>>; +/* + * aco::unordered_set - alias for std::unordered_set with monotonic_allocator + * + * This template specialization mimics std::pmr::unordered_set. + */ +template , class Pred = std::equal_to> +using unordered_set = std::unordered_set>; + /* * Cache-friendly set of 32-bit IDs with fast insert/erase/lookup and * the ability to efficiently iterate over contained elements.