From ff72454f8391ab4785fa8314f3efbbea96c30422 Mon Sep 17 00:00:00 2001 From: gatecat Date: Tue, 1 Jun 2021 16:12:57 +0100 Subject: Add hash() member functions Signed-off-by: gatecat --- docs/archapi.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/archapi.md') diff --git a/docs/archapi.md b/docs/archapi.md index 6d17f01a..80aa1d96 100644 --- a/docs/archapi.md +++ b/docs/archapi.md @@ -45,31 +45,31 @@ A scalar type that is used to represent delays. May be an integer or float type ### BelId -A type representing a bel name. `BelId()` must construct a unique null-value. Must provide `==`, `!=`, and `<` operators and a specialization for `std::hash`. +A type representing a bel name. `BelId()` must construct a unique null-value. Must provide `==`, `!=`, and `<` operators and a `unsigned int hash() const` member function. ### WireId -A type representing a wire name. `WireId()` must construct a unique null-value. Must provide `==`, `!=`, and `<` operators and a specialization for `std::hash`. +A type representing a wire name. `WireId()` must construct a unique null-value. Must provide `==`, `!=`, and `<` operators and a `unsigned int hash() const` member function. ### PipId -A type representing a pip name. `PipId()` must construct a unique null-value. Must provide `==`, `!=`, and `<` operators and a specialization for `std::hash`. +A type representing a pip name. `PipId()` must construct a unique null-value. Must provide `==`, `!=`, and `<` operators and a `unsigned int hash() const` member function. ### BelBucketId -A type representing a bel bucket. `BelBucketId()` must construct a unique null-value. Must provide `==`, `!=`, and `<` operators and a specialization for `std::hash`. +A type representing a bel bucket. `BelBucketId()` must construct a unique null-value. Must provide `==`, `!=`, and `<` operators and a `unsigned int hash() const` member function. ### GroupId -A type representing a group name. `GroupId()` must construct a unique null-value. Must provide `==` and `!=` operators and a specialization for `std::hash`. +A type representing a group name. `GroupId()` must construct a unique null-value. Must provide `==` and `!=` operators and a `unsigned int hash() const` member function. ### DecalId -A type representing a reference to a graphical decal. `DecalId()` must construct a unique null-value. Must provide `==` and `!=` operators and a specialization for `std::hash`. +A type representing a reference to a graphical decal. `DecalId()` must construct a unique null-value. Must provide `==` and `!=` operators and a `unsigned int hash() const` member function. ### ClusterId -A type representing a reference to a constrained cluster of cells. `ClusterId()` must construct a unique null-value. Must provide `==` and `!=` operators and a specialization for `std::hash`. +A type representing a reference to a constrained cluster of cells. `ClusterId()` must construct a unique null-value. Must provide `==` and `!=` operators and `unsigned int hash() const` member function. ### ArchNetInfo -- cgit v1.2.3 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 --- docs/archapi.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/archapi.md') diff --git a/docs/archapi.md b/docs/archapi.md index 80aa1d96..f2571f08 100644 --- a/docs/archapi.md +++ b/docs/archapi.md @@ -171,7 +171,7 @@ Returns true if the given bel is a global buffer. A global buffer does not "pull Return a (preferably unique) number that represents this bel. This is used in design state checksum calculations. -*BaseArch default: returns `std::hash` of `BelId` cast to `uint32_t`* +*BaseArch default: returns `bel.hash()`* ### void bindBel(BelId bel, CellInfo \*cell, PlaceStrength strength) @@ -276,7 +276,7 @@ unused. An implementation may simply return an empty range. Return a (preferably unique) number that represents this wire. This is used in design state checksum calculations. -*BaseArch default: returns `std::hash` of `WireId` cast to `uint32_t`* +*BaseArch default: returns `wire.hash()`* ### void bindWire(WireId wire, NetInfo \*net, PlaceStrength strength) @@ -374,7 +374,7 @@ for pips a X/Y/Z location refers to a group of pips, not an individual pip. Return a (preferably unique) number that represents this pip. This is used in design state checksum calculations. -*BaseArch default: returns `std::hash` of `WireId` cast to `uint32_t`* +*BaseArch default: returns `pip.hash()`* ### void bindPip(PipId pip, NetInfo \*net, PlaceStrength strength) -- cgit v1.2.3