From 965ba00e0fdc09727f241c361bc5b202d925c8e4 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Wed, 17 Mar 2021 16:53:05 -0700 Subject: Moving hash map/set type selection to header. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- common/router2.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'common/router2.cc') diff --git a/common/router2.cc b/common/router2.cc index 27f8ec0d..002a05a3 100644 --- a/common/router2.cc +++ b/common/router2.cc @@ -27,15 +27,15 @@ */ #include "router2.h" -#if !defined(NPNR_DISABLE_THREADS) -#include -#endif + #include #include #include #include #include #include + +#include "hash_table.h" #include "log.h" #include "nextpnr.h" #include "router1.h" @@ -193,11 +193,7 @@ struct Router2 } } -#if defined(NPNR_DISABLE_THREADS) - std::unordered_map wire_to_idx; -#else - absl::flat_hash_map wire_to_idx; -#endif + HashTables::HashMap wire_to_idx; std::vector flat_wires; PerWireData &wire_data(WireId w) { return flat_wires[wire_to_idx.at(w)]; } -- cgit v1.2.3