diff options
author | gatecat <gatecat@ds0.me> | 2021-06-02 12:09:40 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-06-02 15:05:20 +0100 |
commit | dcbb322447a7fb59cabe197ec1dd2307acfa3681 (patch) | |
tree | ada2c6a5d48e766fa523e633aaa28179baea3273 /ecp5 | |
parent | 897e2c2fdc43bcf097aa8805c424c4443bcefad5 (diff) | |
download | nextpnr-dcbb322447a7fb59cabe197ec1dd2307acfa3681.tar.gz nextpnr-dcbb322447a7fb59cabe197ec1dd2307acfa3681.tar.bz2 nextpnr-dcbb322447a7fb59cabe197ec1dd2307acfa3681.zip |
Remove redundant code after hashlib move
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'ecp5')
-rw-r--r-- | ecp5/archdefs.h | 70 |
1 files changed, 0 insertions, 70 deletions
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 <boost/functional/hash.hpp> - #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<NEXTPNR_NAMESPACE_PREFIX Location> -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX Location &loc) const noexcept - { - std::size_t seed = std::hash<int>()(loc.x); - seed ^= std::hash<int>()(loc.y) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - return seed; - } -}; - -template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelId> -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const noexcept - { - std::size_t seed = std::hash<NEXTPNR_NAMESPACE_PREFIX Location>()(bel.location); - seed ^= std::hash<int>()(bel.index) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - return seed; - } -}; - -template <> struct hash<NEXTPNR_NAMESPACE_PREFIX WireId> -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX WireId &wire) const noexcept - { - std::size_t seed = std::hash<NEXTPNR_NAMESPACE_PREFIX Location>()(wire.location); - seed ^= std::hash<int>()(wire.index) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - return seed; - } -}; - -template <> struct hash<NEXTPNR_NAMESPACE_PREFIX PipId> -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PipId &pip) const noexcept - { - std::size_t seed = std::hash<NEXTPNR_NAMESPACE_PREFIX Location>()(pip.location); - seed ^= std::hash<int>()(pip.index) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - return seed; - } -}; - -template <> struct hash<NEXTPNR_NAMESPACE_PREFIX GroupId> -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX GroupId &group) const noexcept - { - std::size_t seed = 0; - boost::hash_combine(seed, hash<int>()(group.type)); - boost::hash_combine(seed, hash<NEXTPNR_NAMESPACE_PREFIX Location>()(group.location)); - return seed; - } -}; - -template <> struct hash<NEXTPNR_NAMESPACE_PREFIX DecalId> -{ - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX DecalId &decal) const noexcept - { - std::size_t seed = 0; - boost::hash_combine(seed, hash<int>()(decal.type)); - boost::hash_combine(seed, hash<NEXTPNR_NAMESPACE_PREFIX Location>()(decal.location)); - boost::hash_combine(seed, hash<int>()(decal.z)); - boost::hash_combine(seed, hash<bool>()(decal.active)); - return seed; - } -}; - -} // namespace std - #endif /* ECP5_ARCHDEFS_H */ |