mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-01 13:39:30 +00:00
Merge pull request #5349 from rocallahan/cleanup-hashops
Reduce hashops verbiage in `OptMergePass`
This commit is contained in:
commit
7719beb4ae
2 changed files with 14 additions and 7 deletions
|
@ -114,7 +114,7 @@ public:
|
|||
return;
|
||||
}
|
||||
[[nodiscard]]
|
||||
hash_t yield() {
|
||||
hash_t yield() const {
|
||||
return (hash_t)state;
|
||||
}
|
||||
|
||||
|
@ -382,7 +382,11 @@ public:
|
|||
commutative_hash() {
|
||||
buckets.fill(0);
|
||||
}
|
||||
void eat(Hasher h) {
|
||||
template <typename T>
|
||||
void eat(const T &obj) {
|
||||
eat(hash_ops<T>::hash(obj));
|
||||
}
|
||||
void eat(const Hasher &h) {
|
||||
Hasher::hash_t v = h.yield();
|
||||
size_t index = v & (buckets.size() - 1);
|
||||
buckets[index] += v;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue