ruby: set: reimplement using std::bitset
Review Request #3014 - Created Aug. 9, 2015 and submitted
| Information | |
|---|---|
| Nilay Vaish | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 11077:0dfa7e7d62d0 --------------------------- ruby: set: reimplement using std::bitset The current Set data structure is slow and therefore is being reimplemented using std::bitset. A maximum limit of 64 is being set on the number of controllers of each type. This means that for simulating a system with more controllers of a given type, one would need to change the value of the variable NUMBER_BITS_PER_SET
I am glad to see this patch coming out because the current implementation is pretty confusing. However, would it be better if we keep the flexibility of dynamically adjusting the length of the bitset instead of hardcoding NUMBER_BITS_PER_SET? In some systems the number of computation units can go beyond 64, but with much fewer LLCs or dirs. That is my main concern.
Ship It!
-
src/mem/ruby/common/NetDest.cc (Diff revision 1) -
m_bits[i].getSize() returns NUMBER_BITS_PER_SET, which is 64 for all machine types. In case of broadcast, all bits are set in m_bits. Will it cause problem if the number of actual components is smaller than NUMBER_BITS_PER_SET? Perhapse in class Set, add a size parameter is a better idea to prevent such situation.
Ship It!
Description: |
|
|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+141 -422) |
Ship It!
