mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-29 15:37:59 +00:00
hashlib: redo interface for flexibility
This commit is contained in:
parent
7a362f1f74
commit
d071489ab1
35 changed files with 542 additions and 386 deletions
|
@ -46,11 +46,11 @@ struct EquivStructWorker
|
|||
parameters == other.parameters && port_sizes == other.port_sizes;
|
||||
}
|
||||
|
||||
unsigned int hash() const {
|
||||
unsigned int h = mkhash_init;
|
||||
h = mkhash(h, mkhash(type));
|
||||
h = mkhash(h, mkhash(parameters));
|
||||
h = mkhash(h, mkhash(connections));
|
||||
Hasher hash_acc(Hasher h) const {
|
||||
h.acc(type);
|
||||
h.acc(parameters);
|
||||
h.acc(port_sizes);
|
||||
h.acc(connections);
|
||||
return h;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue