blob: 9b0ebcbeca07cd3a71eedfc2febed48d27fb74b8 [file]
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
threadgroup array<uchar, 1024>* v;
};
typedef array<float, 1> __attribute__((__may_alias__)) tint_aliased_array_f32;
struct tint_symbol_1 {
array<uchar, 1024> tint_symbol;
};
void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
{
uint v_1 = 0u;
v_1 = tint_local_index;
while(true) {
uint const v_2 = v_1;
if ((v_2 >= 1024u)) {
break;
}
(*tint_module_vars.v)[v_2] = 0u;
{
v_1 = (v_2 + 32u);
}
}
}
(threadgroup_barrier(mem_flags::mem_threadgroup));
threadgroup tint_aliased_array_f32* const v_3 = reinterpret_cast<threadgroup array<float, 1>*>(reinterpret_cast<threadgroup char*>(tint_module_vars.v) + 0u);
threadgroup tint_aliased_array_f32* const view = v_3;
bool const v_4 = (64u <= 256u);
simdgroup_float8x8 v_5 = make_filled_simdgroup_matrix<float, 8, 8>(0.0f);
(simdgroup_load(v_5, (&(*view)[select(0u, 0u, v_4)]), ulong(select(8u, 8u, v_4)), ulong2(0ul), true));
simdgroup_float8x8 const m = v_5;
bool const v_6 = (64u <= 256u);
(simdgroup_store(m, (&(*view)[select(0u, 0u, v_6)]), ulong(select(8u, 8u, v_6)), ulong2(0ul), false));
}
[[max_total_threads_per_threadgroup(32)]]
kernel void v_7(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_8 [[threadgroup(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&(*v_8).tint_symbol)};
(main_inner(tint_local_index, tint_module_vars));
}