| #include <metal_stdlib> | |
| using namespace metal; | |
| struct tint_private_vars_struct { | |
| float p; | |
| }; | |
| void tint_zero_workgroup_memory(uint local_idx, threadgroup float* const tint_symbol_1) { | |
| if ((local_idx < 1u)) { | |
| *(tint_symbol_1) = 0.0f; | |
| } | |
| threadgroup_barrier(mem_flags::mem_threadgroup); | |
| } | |
| void tint_symbol_inner(uint local_invocation_index, thread tint_private_vars_struct* const tint_private_vars, threadgroup float* const tint_symbol_2) { | |
| tint_zero_workgroup_memory(local_invocation_index, tint_symbol_2); | |
| float const x = ((*(tint_private_vars)).p + *(tint_symbol_2)); | |
| (*(tint_private_vars)).p = x; | |
| } | |
| kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) { | |
| thread tint_private_vars_struct tint_private_vars = {}; | |
| threadgroup float tint_symbol_3; | |
| tint_symbol_inner(local_invocation_index, &(tint_private_vars), &(tint_symbol_3)); | |
| return; | |
| } | |