|
20 | 20 | #include <map> |
21 | 21 | #include <memory> |
22 | 22 | #include <optional> |
| 23 | +#include <unordered_map> |
23 | 24 | #include <vector> |
24 | 25 |
|
25 | 26 | namespace legate::detail { |
@@ -68,11 +69,11 @@ struct LogicalArray { |
68 | 69 |
|
69 | 70 | virtual void generate_constraints( |
70 | 71 | AutoTask* task, |
71 | | - std::map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
| 72 | + std::unordered_map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
72 | 73 | const Variable* partition_symbol) const = 0; |
73 | 74 |
|
74 | 75 | [[nodiscard]] virtual std::unique_ptr<Analyzable> to_launcher_arg( |
75 | | - const std::map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
| 76 | + const std::unordered_map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
76 | 77 | const Strategy& strategy, |
77 | 78 | const Domain& launch_domain, |
78 | 79 | const std::optional<SymbolicPoint>& projection, |
@@ -119,12 +120,13 @@ class BaseLogicalArray final : public LogicalArray { |
119 | 120 | void record_scalar_or_unbound_outputs(AutoTask* task) const override; |
120 | 121 | void record_scalar_reductions(AutoTask* task, Legion::ReductionOpID redop) const override; |
121 | 122 |
|
122 | | - void generate_constraints(AutoTask* task, |
123 | | - std::map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
124 | | - const Variable* partition_symbol) const override; |
| 123 | + void generate_constraints( |
| 124 | + AutoTask* task, |
| 125 | + std::unordered_map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
| 126 | + const Variable* partition_symbol) const override; |
125 | 127 |
|
126 | 128 | [[nodiscard]] std::unique_ptr<Analyzable> to_launcher_arg( |
127 | | - const std::map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
| 129 | + const std::unordered_map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
128 | 130 | const Strategy& strategy, |
129 | 131 | const Domain& launch_domain, |
130 | 132 | const std::optional<SymbolicPoint>& projection, |
@@ -173,12 +175,13 @@ class ListLogicalArray final : public LogicalArray { |
173 | 175 | void record_scalar_or_unbound_outputs(AutoTask* task) const override; |
174 | 176 | void record_scalar_reductions(AutoTask* task, Legion::ReductionOpID redop) const override; |
175 | 177 |
|
176 | | - void generate_constraints(AutoTask* task, |
177 | | - std::map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
178 | | - const Variable* partition_symbol) const override; |
| 178 | + void generate_constraints( |
| 179 | + AutoTask* task, |
| 180 | + std::unordered_map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
| 181 | + const Variable* partition_symbol) const override; |
179 | 182 |
|
180 | 183 | [[nodiscard]] std::unique_ptr<Analyzable> to_launcher_arg( |
181 | | - const std::map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
| 184 | + const std::unordered_map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
182 | 185 | const Strategy& strategy, |
183 | 186 | const Domain& launch_domain, |
184 | 187 | const std::optional<SymbolicPoint>& projection, |
@@ -226,12 +229,13 @@ class StructLogicalArray final : public LogicalArray { |
226 | 229 | void record_scalar_or_unbound_outputs(AutoTask* task) const override; |
227 | 230 | void record_scalar_reductions(AutoTask* task, Legion::ReductionOpID redop) const override; |
228 | 231 |
|
229 | | - void generate_constraints(AutoTask* task, |
230 | | - std::map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
231 | | - const Variable* partition_symbol) const override; |
| 232 | + void generate_constraints( |
| 233 | + AutoTask* task, |
| 234 | + std::unordered_map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
| 235 | + const Variable* partition_symbol) const override; |
232 | 236 |
|
233 | 237 | [[nodiscard]] std::unique_ptr<Analyzable> to_launcher_arg( |
234 | | - const std::map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
| 238 | + const std::unordered_map<std::shared_ptr<LogicalStore>, const Variable*>& mapping, |
235 | 239 | const Strategy& strategy, |
236 | 240 | const Domain& launch_domain, |
237 | 241 | const std::optional<SymbolicPoint>& projection, |
|
0 commit comments