aboutsummaryrefslogtreecommitdiffstats
path: root/common/router2.cc
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-17 16:53:05 -0700
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-17 16:54:29 -0700
commit965ba00e0fdc09727f241c361bc5b202d925c8e4 (patch)
tree4e951395447d8a45b61cd27cb1052de7585f479b /common/router2.cc
parent5feea4497f416eafdf54f34c2b9c67ddcef3f26f (diff)
downloadnextpnr-965ba00e0fdc09727f241c361bc5b202d925c8e4.tar.gz
nextpnr-965ba00e0fdc09727f241c361bc5b202d925c8e4.tar.bz2
nextpnr-965ba00e0fdc09727f241c361bc5b202d925c8e4.zip
Moving hash map/set type selection to header.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'common/router2.cc')
-rw-r--r--common/router2.cc12
1 files changed, 4 insertions, 8 deletions
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 <absl/container/flat_hash_map.h>
-#endif
+
#include <algorithm>
#include <boost/container/flat_map.hpp>
#include <chrono>
#include <deque>
#include <fstream>
#include <queue>
+
+#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<WireId, int> wire_to_idx;
-#else
- absl::flat_hash_map<WireId, int> wire_to_idx;
-#endif
+ HashTables::HashMap<WireId, int> wire_to_idx;
std::vector<PerWireData> flat_wires;
PerWireData &wire_data(WireId w) { return flat_wires[wire_to_idx.at(w)]; }