mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-15 11:45:41 +00:00
Merge branch 'YosysHQ:main' into main
This commit is contained in:
commit
c26f38faeb
8 changed files with 31 additions and 19 deletions
|
|
@ -115,7 +115,7 @@ public:
|
|||
return;
|
||||
}
|
||||
[[nodiscard]]
|
||||
hash_t yield() {
|
||||
hash_t yield() const {
|
||||
return (hash_t)state;
|
||||
}
|
||||
|
||||
|
|
@ -383,7 +383,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