| #include <metal_stdlib> |
| using namespace metal; |
| |
| template<typename T, size_t N> |
| struct tint_array { |
| const constant T& operator[](size_t i) const constant { return elements[i]; } |
| device T& operator[](size_t i) device { return elements[i]; } |
| const device T& operator[](size_t i) const device { return elements[i]; } |
| thread T& operator[](size_t i) thread { return elements[i]; } |
| const thread T& operator[](size_t i) const thread { return elements[i]; } |
| threadgroup T& operator[](size_t i) threadgroup { return elements[i]; } |
| const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; } |
| T elements[N]; |
| }; |
| |
| struct SB_RO { |
| /* 0x0000 */ tint_array<half, 1> arg_0; |
| }; |
| |
| struct tint_module_vars_struct { |
| device tint_array<half, 1024>* prevent_dce; |
| const device SB_RO* sb_ro; |
| const constant tint_array<uint4, 1>* tint_storage_buffer_sizes; |
| }; |
| |
| simdgroup_half8x8 subgroupMatrixLoad_5de410(tint_module_vars_struct tint_module_vars) { |
| simdgroup_half8x8 v = make_filled_simdgroup_matrix<half, 8, 8>(0.0h); |
| if ((((1u + (8u * 7u)) + 8u) <= (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 2u))) { |
| simdgroup_half8x8 v_1 = make_filled_simdgroup_matrix<half, 8, 8>(0.0h); |
| simdgroup_load(v_1, (&(*tint_module_vars.sb_ro).arg_0[1u]), ulong(8u), ulong2(0ul), true); |
| v = v_1; |
| } |
| simdgroup_half8x8 res = v; |
| return res; |
| } |
| |
| kernel void compute_main(device tint_array<half, 1024>* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) { |
| tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; |
| simdgroup_store(subgroupMatrixLoad_5de410(tint_module_vars), (&(*tint_module_vars.prevent_dce)[0u]), ulong(64u), ulong2(0ul), false); |
| } |