Commit 9a298959 authored by Diana Chen's avatar Diana Chen Committed by gbsbuild

Internal feature

Change-Id: Ie6ea471527f0e404e0fd53ef9e275d8db19db9fb
parent 97a2fb1c
......@@ -1578,8 +1578,8 @@ void Formatter::EmitSendDescriptorInfoGED(
switch (getScratchSpaceGRFsSize(desc)) {
case 0: ss << "1grf"; break;
case 1: ss << "2grfs"; break;
case 2: ss << "4grfs"; break;
case 3: ss << "8grfs"; break;
case 2: ss << "?grfs"; break;
case 3: ss << "4grfs"; break;
}
uint32_t off = getScratchSpaceAddressOffset(desc);
ss << " from 0x" << std::hex << off << ")";
......@@ -1728,8 +1728,8 @@ void Formatter::EmitSendDescriptorInfo(
switch (getBitField(desc, 12, 2)) {
case 0: ss << "1grf"; break;
case 1: ss << "2grfs"; break;
case 2: ss << "4grfs"; break;
case 3: ss << "8grfs"; break;
case 2: ss << "?grfs"; break;
case 3: ss << "4grfs"; break;
}
uint32_t off = getBitField(desc, 0, 12);
ss << " from 0x" << std::hex << off << ")";
......
......@@ -66,6 +66,9 @@ public:
// len: range length in bits
inline bool intersects(const BitSet<N,I> &rhs, size_t off, size_t len) const;
// if the given rhs is completely the same as itself
bool equal(const BitSet<N, I> &rhs) const;
// THERE EXISTS WORD w such that ((w & mask) == eq)
// bool testAnyEq(size_t off, size_t len, const I &mask, const I &eq) const;
// FOR ALL ...
......@@ -181,6 +184,19 @@ inline bool BitSet<N, I>::intersects(
return false;
}
template <size_t N, typename I>
inline bool BitSet<N, I>::equal(const BitSet<N, I> &rhs) const {
bool result = true;
for (size_t i = 0; i < N / BITS_PER_WORD; i++) {
result = (words[i] == rhs.words[i]) ? true : false;
if (!result)
break;
}
// padding will remain 0 since both padding are 0's
// 0 & 0 is 0 so no need special handling on padding
return result;
}
template <size_t N, typename I>
inline bool BitSet<N,I>::andNot(const BitSet<N,I> &rhs)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment