Go to the documentation of this file.
32 #ifndef __MEM_RUBY_COMMON_SET_HH__
33 #define __MEM_RUBY_COMMON_SET_HH__
48 std::bitset<NUMBER_BITS_PER_SET>
bits;
55 if (size > NUMBER_BITS_PER_SET)
56 fatal(
"Number of bits(%d) < size specified(%d). "
57 "Increase the number of bits and recompile.\n",
58 NUMBER_BITS_PER_SET, size);
115 for (
int j =
m_nSize;
j < NUMBER_BITS_PER_SET; ++
j) {
159 std::bitset<NUMBER_BITS_PER_SET>
r =
bits & obj.
bits;
171 std::bitset<NUMBER_BITS_PER_SET>
r =
bits |
test.bits;
197 panic(
"No smallest element of an empty set.");
207 if (size > NUMBER_BITS_PER_SET)
208 fatal(
"Number of bits(%d) < size specified(%d). "
209 "Increase the number of bits and recompile.\n",
210 NUMBER_BITS_PER_SET, size);
217 out <<
"[Set (" <<
m_nSize <<
"): " <<
bits <<
"]";
229 #endif // __MEM_RUBY_COMMON_SET_HH__
#define fatal(...)
This implements a cprintf based fatal() function.
void print(std::ostream &out) const
Set AND(const Set &obj) const
bool intersectionIsEmpty(const Set &obj) const
Set OR(const Set &obj) const
Set & operator=(const Set &obj)
bool isSuperset(const Set &test) const
void addSet(const Set &obj)
bool isElement(NodeID element) const
std::ostream & operator<<(std::ostream &out, const Set &obj)
bool isSubset(const Set &test) const
std::bitset< NUMBER_BITS_PER_SET > bits
bool elementAt(int index) const
void removeSet(const Set &obj)
bool isEqual(const Set &obj) const
NodeID smallestElement() const
void remove(NodeID index)
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17