mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
Add hashlib support for hashing of pools
This commit is contained in:
parent
bce0bb6e43
commit
d3b3dd8e88
1 changed files with 7 additions and 0 deletions
|
@ -868,6 +868,13 @@ public:
|
|||
return !operator==(other);
|
||||
}
|
||||
|
||||
bool hash() const {
|
||||
unsigned int hashval = mkhash_init;
|
||||
for (auto &it : entries)
|
||||
hashval ^= ops.hash(it.udata);
|
||||
return hashval;
|
||||
}
|
||||
|
||||
void reserve(size_t n) { entries.reserve(n); }
|
||||
size_t size() const { return entries.size(); }
|
||||
bool empty() const { return entries.empty(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue