#include <metal_stdlib>
#include <simd/simd.h>

using namespace metal;

struct cb1_struct
{
    float4 _m0[1];
};

constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(16u, 16u, 1u);

kernel void main0(constant cb1_struct& cb0_1 [[buffer(0)]], texture2d<float, access::write> u0 [[texture(0)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]])
{
    int2 r0 = int2(int2(u0.get_width(), u0.get_height()) >> int2(uint2(4u)));
    for (int i = 0; i < r0.y; i++)
    {
        for (int j = 0; j < r0.x; j++)
        {
            u0.write(cb0_1._m0[0].xxxx, uint2(((r0 * int3(gl_LocalInvocationID).xy) + int2(i, j))));
        }
    }
}

