Skip to content

Commit b7bf815

Browse files
waveSize 16 tests
1 parent 66bf7d6 commit b7bf815

File tree

746 files changed

+67450
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

746 files changed

+67450
-0
lines changed
Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
RWStructuredBuffer<uint> _participant_check_sum : register(u1);
2+
3+
[numthreads(32, 1, 1)]
4+
void main(uint3 tid : SV_DispatchThreadID) {
5+
_participant_check_sum[tid.x] = 0;
6+
uint result = 0;
7+
switch ((WaveGetLaneIndex() % 2)) {
8+
case 0: {
9+
if ((WaveGetLaneIndex() < 8)) {
10+
result = (result + WaveActiveSum(1));
11+
uint _participantCount = WaveActiveSum(1);
12+
bool _isCorrect = (_participantCount == 4);
13+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
14+
}
15+
break;
16+
}
17+
case 1: {
18+
if (((WaveGetLaneIndex() % 2) == 0)) {
19+
result = (result + WaveActiveSum(2));
20+
uint _participantCount = WaveActiveSum(1);
21+
bool _isCorrect = (_participantCount == 0);
22+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
23+
}
24+
break;
25+
}
26+
default: {
27+
result = (result + WaveActiveSum(99));
28+
uint _participantCount = WaveActiveSum(1);
29+
bool _isCorrect = (_participantCount == 0);
30+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
31+
break;
32+
}
33+
}
34+
switch ((WaveGetLaneIndex() % 2)) {
35+
case 0: {
36+
if ((WaveGetLaneIndex() < 8)) {
37+
result = (result + WaveActiveSum(1));
38+
uint _participantCount = WaveActiveSum(1);
39+
bool _isCorrect = (_participantCount == 4);
40+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
41+
}
42+
}
43+
case 1: {
44+
if ((WaveGetLaneIndex() == 0)) {
45+
switch ((WaveGetLaneIndex() % 4)) {
46+
case 0: {
47+
if ((WaveGetLaneIndex() < 8)) {
48+
result = (result + WaveActiveSum(1));
49+
uint _participantCount = WaveActiveSum(1);
50+
bool _isCorrect = (_participantCount == 1);
51+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
52+
}
53+
break;
54+
}
55+
case 1: {
56+
if (((WaveGetLaneIndex() % 2) == 0)) {
57+
result = (result + WaveActiveSum(2));
58+
uint _participantCount = WaveActiveSum(1);
59+
bool _isCorrect = (_participantCount == 0);
60+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
61+
}
62+
break;
63+
}
64+
case 2: {
65+
if (true) {
66+
result = (result + WaveActiveSum(3));
67+
uint _participantCount = WaveActiveSum(1);
68+
bool _isCorrect = (_participantCount == 0);
69+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
70+
}
71+
break;
72+
}
73+
case 3: {
74+
if ((WaveGetLaneIndex() < 20)) {
75+
result = (result + WaveActiveSum(4));
76+
uint _participantCount = WaveActiveSum(1);
77+
bool _isCorrect = (_participantCount == 0);
78+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
79+
}
80+
break;
81+
}
82+
}
83+
if ((WaveGetLaneIndex() == 6)) {
84+
result = (result + WaveActiveMax(result));
85+
uint _participantCount = WaveActiveSum(1);
86+
bool _isCorrect = (_participantCount == 0);
87+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
88+
}
89+
} else {
90+
if ((((WaveGetLaneIndex() == 7) || (WaveGetLaneIndex() == 11)) || (WaveGetLaneIndex() == 4))) {
91+
result = (result + WaveActiveMax(result));
92+
uint _participantCount = WaveActiveSum(1);
93+
bool _isCorrect = (_participantCount == 3);
94+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
95+
}
96+
for (uint i0 = 0; (i0 < 3); i0 = (i0 + 1)) {
97+
if (((((WaveGetLaneIndex() == 2) || (WaveGetLaneIndex() == 7)) || (WaveGetLaneIndex() == 9)) || (WaveGetLaneIndex() == 14))) {
98+
result = (result + WaveActiveSum(result));
99+
uint _participantCount = WaveActiveSum(1);
100+
bool _isCorrect = (_participantCount == 4);
101+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
102+
}
103+
if ((i0 == 2)) {
104+
break;
105+
}
106+
}
107+
if ((((WaveGetLaneIndex() == 4) || (WaveGetLaneIndex() == 13)) || (WaveGetLaneIndex() == 12))) {
108+
result = (result + WaveActiveSum(7));
109+
uint _participantCount = WaveActiveSum(1);
110+
bool _isCorrect = (_participantCount == 3);
111+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
112+
}
113+
}
114+
break;
115+
}
116+
}
117+
switch ((WaveGetLaneIndex() % 4)) {
118+
case 0: {
119+
uint counter1 = 0;
120+
while ((counter1 < 2)) {
121+
counter1 = (counter1 + 1);
122+
if (((WaveGetLaneIndex() & 1) == 0)) {
123+
result = (result + WaveActiveSum(5));
124+
uint _participantCount = WaveActiveSum(1);
125+
bool _isCorrect = (_participantCount == 4);
126+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
127+
}
128+
}
129+
break;
130+
}
131+
case 1: {
132+
if (((WaveGetLaneIndex() % 2) == 0)) {
133+
result = (result + WaveActiveSum(2));
134+
uint _participantCount = WaveActiveSum(1);
135+
bool _isCorrect = (_participantCount == 0);
136+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
137+
}
138+
break;
139+
}
140+
case 2: {
141+
if (true) {
142+
result = (result + WaveActiveSum(3));
143+
uint _participantCount = WaveActiveSum(1);
144+
bool _isCorrect = (_participantCount == 4);
145+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
146+
}
147+
break;
148+
}
149+
case 3: {
150+
uint counter2 = 0;
151+
while ((counter2 < 2)) {
152+
counter2 = (counter2 + 1);
153+
uint counter3 = 0;
154+
while ((counter3 < 3)) {
155+
counter3 = (counter3 + 1);
156+
if ((((WaveGetLaneIndex() == 1) || (WaveGetLaneIndex() == 9)) || (WaveGetLaneIndex() == 11))) {
157+
if (((((WaveGetLaneIndex() == 2) || (WaveGetLaneIndex() == 4)) || (WaveGetLaneIndex() == 9)) || (WaveGetLaneIndex() == 12))) {
158+
result = (result + WaveActiveMin((WaveGetLaneIndex() + 4)));
159+
uint _participantCount = WaveActiveSum(1);
160+
bool _isCorrect = (_participantCount == 0);
161+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
162+
}
163+
if (((((WaveGetLaneIndex() == 0) || (WaveGetLaneIndex() == 4)) || (WaveGetLaneIndex() == 11)) || (WaveGetLaneIndex() == 15))) {
164+
result = (result + WaveActiveMin(result));
165+
uint _participantCount = WaveActiveSum(1);
166+
bool _isCorrect = (_participantCount == 1);
167+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
168+
}
169+
} else {
170+
if (((((WaveGetLaneIndex() == 2) || (WaveGetLaneIndex() == 5)) || (WaveGetLaneIndex() == 14)) || (WaveGetLaneIndex() == 2))) {
171+
result = (result + WaveActiveSum(result));
172+
uint _participantCount = WaveActiveSum(1);
173+
bool _isCorrect = (_participantCount == 0);
174+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
175+
}
176+
if ((((WaveGetLaneIndex() == 0) || (WaveGetLaneIndex() == 11)) || (WaveGetLaneIndex() == 15))) {
177+
result = (result + WaveActiveMin(result));
178+
uint _participantCount = WaveActiveSum(1);
179+
bool _isCorrect = (_participantCount == 1);
180+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
181+
}
182+
}
183+
if (((WaveGetLaneIndex() < 3) || (WaveGetLaneIndex() >= 14))) {
184+
result = (result + WaveActiveMax(result));
185+
uint _participantCount = WaveActiveSum(1);
186+
bool _isCorrect = (_participantCount == 1);
187+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
188+
}
189+
}
190+
if ((WaveGetLaneIndex() == 8)) {
191+
result = (result + WaveActiveMax(8));
192+
uint _participantCount = WaveActiveSum(1);
193+
bool _isCorrect = (_participantCount == 0);
194+
_participant_check_sum[tid.x] = (_participant_check_sum[tid.x] + (_isCorrect ? 1 : 0));
195+
}
196+
}
197+
break;
198+
}
199+
}
200+
}
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
[numthreads(32, 1, 1)]
2+
void main(uint3 tid : SV_DispatchThreadID) {
3+
uint result = 0;
4+
switch ((WaveGetLaneIndex() % 2)) {
5+
case 0: {
6+
if ((WaveGetLaneIndex() < 8)) {
7+
result = (result + WaveActiveSum(1));
8+
}
9+
break;
10+
}
11+
case 1: {
12+
if (((WaveGetLaneIndex() % 2) == 0)) {
13+
result = (result + WaveActiveSum(2));
14+
}
15+
break;
16+
}
17+
default: {
18+
result = (result + WaveActiveSum(99));
19+
break;
20+
}
21+
}
22+
switch ((WaveGetLaneIndex() % 2)) {
23+
case 0: {
24+
if ((WaveGetLaneIndex() < 8)) {
25+
result = (result + WaveActiveSum(1));
26+
}
27+
}
28+
case 1: {
29+
if ((WaveGetLaneIndex() == 0)) {
30+
switch ((WaveGetLaneIndex() % 4)) {
31+
case 0: {
32+
if ((WaveGetLaneIndex() < 8)) {
33+
result = (result + WaveActiveSum(1));
34+
}
35+
break;
36+
}
37+
case 1: {
38+
if (((WaveGetLaneIndex() % 2) == 0)) {
39+
result = (result + WaveActiveSum(2));
40+
}
41+
break;
42+
}
43+
case 2: {
44+
if (true) {
45+
result = (result + WaveActiveSum(3));
46+
}
47+
break;
48+
}
49+
case 3: {
50+
if ((WaveGetLaneIndex() < 20)) {
51+
result = (result + WaveActiveSum(4));
52+
}
53+
break;
54+
}
55+
}
56+
if ((WaveGetLaneIndex() == 6)) {
57+
result = (result + WaveActiveMax(result));
58+
}
59+
} else {
60+
if ((((WaveGetLaneIndex() == 7) || (WaveGetLaneIndex() == 11)) || (WaveGetLaneIndex() == 4))) {
61+
result = (result + WaveActiveMax(result));
62+
}
63+
for (uint i0 = 0; (i0 < 3); i0 = (i0 + 1)) {
64+
if (((((WaveGetLaneIndex() == 2) || (WaveGetLaneIndex() == 7)) || (WaveGetLaneIndex() == 9)) || (WaveGetLaneIndex() == 14))) {
65+
result = (result + WaveActiveSum(result));
66+
}
67+
if ((i0 == 2)) {
68+
break;
69+
}
70+
}
71+
if ((((WaveGetLaneIndex() == 4) || (WaveGetLaneIndex() == 13)) || (WaveGetLaneIndex() == 12))) {
72+
result = (result + WaveActiveSum(7));
73+
}
74+
}
75+
break;
76+
}
77+
}
78+
switch ((WaveGetLaneIndex() % 4)) {
79+
case 0: {
80+
uint counter1 = 0;
81+
while ((counter1 < 2)) {
82+
counter1 = (counter1 + 1);
83+
if (((WaveGetLaneIndex() & 1) == 0)) {
84+
result = (result + WaveActiveSum(5));
85+
}
86+
}
87+
break;
88+
}
89+
case 1: {
90+
if (((WaveGetLaneIndex() % 2) == 0)) {
91+
result = (result + WaveActiveSum(2));
92+
}
93+
break;
94+
}
95+
case 2: {
96+
if (true) {
97+
result = (result + WaveActiveSum(3));
98+
}
99+
break;
100+
}
101+
case 3: {
102+
uint counter2 = 0;
103+
while ((counter2 < 2)) {
104+
counter2 = (counter2 + 1);
105+
uint counter3 = 0;
106+
while ((counter3 < 3)) {
107+
counter3 = (counter3 + 1);
108+
if ((((WaveGetLaneIndex() == 1) || (WaveGetLaneIndex() == 9)) || (WaveGetLaneIndex() == 11))) {
109+
if (((((WaveGetLaneIndex() == 2) || (WaveGetLaneIndex() == 4)) || (WaveGetLaneIndex() == 9)) || (WaveGetLaneIndex() == 12))) {
110+
result = (result + WaveActiveMin((WaveGetLaneIndex() + 4)));
111+
}
112+
if (((((WaveGetLaneIndex() == 0) || (WaveGetLaneIndex() == 4)) || (WaveGetLaneIndex() == 11)) || (WaveGetLaneIndex() == 15))) {
113+
result = (result + WaveActiveMin(result));
114+
}
115+
} else {
116+
if (((((WaveGetLaneIndex() == 2) || (WaveGetLaneIndex() == 5)) || (WaveGetLaneIndex() == 14)) || (WaveGetLaneIndex() == 2))) {
117+
result = (result + WaveActiveSum(result));
118+
}
119+
if ((((WaveGetLaneIndex() == 0) || (WaveGetLaneIndex() == 11)) || (WaveGetLaneIndex() == 15))) {
120+
result = (result + WaveActiveMin(result));
121+
}
122+
}
123+
if (((WaveGetLaneIndex() < 3) || (WaveGetLaneIndex() >= 14))) {
124+
result = (result + WaveActiveMax(result));
125+
}
126+
}
127+
if ((WaveGetLaneIndex() == 8)) {
128+
result = (result + WaveActiveMax(8));
129+
}
130+
}
131+
break;
132+
}
133+
}
134+
}

0 commit comments

Comments
 (0)