From dcbb322447a7fb59cabe197ec1dd2307acfa3681 Mon Sep 17 00:00:00 2001 From: gatecat Date: Wed, 2 Jun 2021 12:09:40 +0100 Subject: Remove redundant code after hashlib move Signed-off-by: gatecat --- ecp5/archdefs.h | 70 --------------------------------------------------------- 1 file changed, 70 deletions(-) (limited to 'ecp5/archdefs.h') diff --git a/ecp5/archdefs.h b/ecp5/archdefs.h index 57168af3..6243a9df 100644 --- a/ecp5/archdefs.h +++ b/ecp5/archdefs.h @@ -21,8 +21,6 @@ #ifndef ECP5_ARCHDEFS_H #define ECP5_ARCHDEFS_H -#include - #include "base_clusterinfo.h" #include "hashlib.h" #include "idstring.h" @@ -187,72 +185,4 @@ struct ArchCellInfo : BaseClusterInfo }; NEXTPNR_NAMESPACE_END - -namespace std { -template <> struct hash -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX Location &loc) const noexcept - { - std::size_t seed = std::hash()(loc.x); - seed ^= std::hash()(loc.y) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - return seed; - } -}; - -template <> struct hash -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const noexcept - { - std::size_t seed = std::hash()(bel.location); - seed ^= std::hash()(bel.index) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - return seed; - } -}; - -template <> struct hash -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX WireId &wire) const noexcept - { - std::size_t seed = std::hash()(wire.location); - seed ^= std::hash()(wire.index) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - return seed; - } -}; - -template <> struct hash -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PipId &pip) const noexcept - { - std::size_t seed = std::hash()(pip.location); - seed ^= std::hash()(pip.index) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - return seed; - } -}; - -template <> struct hash -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX GroupId &group) const noexcept - { - std::size_t seed = 0; - boost::hash_combine(seed, hash()(group.type)); - boost::hash_combine(seed, hash()(group.location)); - return seed; - } -}; - -template <> struct hash -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX DecalId &decal) const noexcept - { - std::size_t seed = 0; - boost::hash_combine(seed, hash()(decal.type)); - boost::hash_combine(seed, hash()(decal.location)); - boost::hash_combine(seed, hash()(decal.z)); - boost::hash_combine(seed, hash()(decal.active)); - return seed; - } -}; - -} // namespace std - #endif /* ECP5_ARCHDEFS_H */ -- cgit v1.2.3