Skip to content

Commit 9a29895

Browse files
DianaChengfxbot
authored andcommitted
Internal feature
Change-Id: Ie6ea471527f0e404e0fd53ef9e275d8db19db9fb
1 parent 97a2fb1 commit 9a29895

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

visa/iga/IGALibrary/Frontend/Formatter.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,8 +1578,8 @@ void Formatter::EmitSendDescriptorInfoGED(
15781578
switch (getScratchSpaceGRFsSize(desc)) {
15791579
case 0: ss << "1grf"; break;
15801580
case 1: ss << "2grfs"; break;
1581-
case 2: ss << "4grfs"; break;
1582-
case 3: ss << "8grfs"; break;
1581+
case 2: ss << "?grfs"; break;
1582+
case 3: ss << "4grfs"; break;
15831583
}
15841584
uint32_t off = getScratchSpaceAddressOffset(desc);
15851585
ss << " from 0x" << std::hex << off << ")";
@@ -1728,8 +1728,8 @@ void Formatter::EmitSendDescriptorInfo(
17281728
switch (getBitField(desc, 12, 2)) {
17291729
case 0: ss << "1grf"; break;
17301730
case 1: ss << "2grfs"; break;
1731-
case 2: ss << "4grfs"; break;
1732-
case 3: ss << "8grfs"; break;
1731+
case 2: ss << "?grfs"; break;
1732+
case 3: ss << "4grfs"; break;
17331733
}
17341734
uint32_t off = getBitField(desc, 0, 12);
17351735
ss << " from 0x" << std::hex << off << ")";

visa/iga/IGALibrary/IR/BitSet.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ class BitSet {
6666
// len: range length in bits
6767
inline bool intersects(const BitSet<N,I> &rhs, size_t off, size_t len) const;
6868

69+
// if the given rhs is completely the same as itself
70+
bool equal(const BitSet<N, I> &rhs) const;
71+
6972
// THERE EXISTS WORD w such that ((w & mask) == eq)
7073
// bool testAnyEq(size_t off, size_t len, const I &mask, const I &eq) const;
7174
// FOR ALL ...
@@ -181,6 +184,19 @@ inline bool BitSet<N, I>::intersects(
181184
return false;
182185
}
183186

187+
template <size_t N, typename I>
188+
inline bool BitSet<N, I>::equal(const BitSet<N, I> &rhs) const {
189+
bool result = true;
190+
for (size_t i = 0; i < N / BITS_PER_WORD; i++) {
191+
result = (words[i] == rhs.words[i]) ? true : false;
192+
if (!result)
193+
break;
194+
}
195+
// padding will remain 0 since both padding are 0's
196+
// 0 & 0 is 0 so no need special handling on padding
197+
return result;
198+
}
199+
184200
template <size_t N, typename I>
185201
inline bool BitSet<N,I>::andNot(const BitSet<N,I> &rhs)
186202
{

0 commit comments

Comments
 (0)