| #include <metal_stdlib> | |
| using namespace metal; | |
| struct tint_module_vars_struct { | |
| device uint* i; | |
| }; | |
| [[max_total_threads_per_threadgroup(1)]] | |
| kernel void v(device uint* i [[buffer(0)]]) { | |
| tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.i=i}; | |
| { | |
| uint2 tint_loop_idx = uint2(4294967295u); | |
| while(true) { | |
| if (all((tint_loop_idx == uint2(0u)))) { | |
| break; | |
| } | |
| if (((*tint_module_vars.i) < 10u)) { | |
| } else { | |
| break; | |
| } | |
| { | |
| uint const tint_low_inc = (tint_loop_idx.x - 1u); | |
| tint_loop_idx.x = tint_low_inc; | |
| uint const tint_carry = uint((tint_low_inc == 4294967295u)); | |
| tint_loop_idx.y = (tint_loop_idx.y - tint_carry); | |
| (*tint_module_vars.i) = ((*tint_module_vars.i) + 1u); | |
| } | |
| } | |
| } | |
| } |