2023-01-24 14:55:17 +00:00
|
|
|
alias Arr = array<u32, 1u>;
|
2022-06-24 22:28:23 +00:00
|
|
|
|
2023-01-24 14:55:17 +00:00
|
|
|
alias Arr_1 = array<Arr, 2u>;
|
2022-06-24 22:28:23 +00:00
|
|
|
|
2023-01-24 14:55:17 +00:00
|
|
|
alias Arr_2 = array<Arr_1, 3u>;
|
2022-06-24 22:28:23 +00:00
|
|
|
|
|
|
|
var<private> local_invocation_index_1 : u32;
|
|
|
|
|
|
|
|
var<workgroup> wg : array<array<array<atomic<u32>, 1u>, 2u>, 3u>;
|
|
|
|
|
2023-02-21 17:33:54 +00:00
|
|
|
fn compute_main_inner(local_invocation_index_2 : u32) {
|
2023-05-23 18:28:44 +00:00
|
|
|
var idx = 0u;
|
2023-02-21 17:33:54 +00:00
|
|
|
idx = local_invocation_index_2;
|
2022-06-24 22:28:23 +00:00
|
|
|
loop {
|
2023-05-23 18:28:44 +00:00
|
|
|
let x_25 = idx;
|
2022-06-24 22:28:23 +00:00
|
|
|
if (!((x_25 < 6u))) {
|
|
|
|
break;
|
|
|
|
}
|
2023-05-23 18:28:44 +00:00
|
|
|
let x_31 = idx;
|
|
|
|
let x_33 = idx;
|
|
|
|
let x_35 = idx;
|
2022-06-24 22:28:23 +00:00
|
|
|
atomicStore(&(wg[(x_31 / 2u)][(x_33 % 2u)][(x_35 % 1u)]), 0u);
|
|
|
|
|
|
|
|
continuing {
|
2023-05-23 18:28:44 +00:00
|
|
|
let x_42 = idx;
|
2022-06-24 22:28:23 +00:00
|
|
|
idx = (x_42 + 1u);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
workgroupBarrier();
|
|
|
|
atomicStore(&(wg[2i][1i][0i]), 1u);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn compute_main_1() {
|
2023-05-23 18:28:44 +00:00
|
|
|
let x_57 = local_invocation_index_1;
|
2022-06-24 22:28:23 +00:00
|
|
|
compute_main_inner(x_57);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
@compute @workgroup_size(1i, 1i, 1i)
|
|
|
|
fn compute_main(@builtin(local_invocation_index) local_invocation_index_1_param : u32) {
|
|
|
|
local_invocation_index_1 = local_invocation_index_1_param;
|
|
|
|
compute_main_1();
|
|
|
|
}
|