1#include <metal_stdlib> 2#include <simd/simd.h> 3#ifdef __clang__ 4#pragma clang diagnostic ignored "-Wall" 5#endif 6using namespace metal; 7struct IndirectDispatchArgs { 8 int x; 9 int y; 10 int z; 11}; 12struct Inputs { 13}; 14struct Threadgroups { 15 int outX; 16 int outY; 17 int outZ; 18}; 19kernel void computeMain() { 20 threadgroup Threadgroups _threadgroups{{}, {}, {}}; 21 (void)_threadgroups; 22 Inputs _in = { }; 23 IndirectDispatchArgs args = IndirectDispatchArgs{1, 2, 3}; 24 _threadgroups.outX = args.x; 25 _threadgroups.outY = args.y; 26 _threadgroups.outZ = args.z; 27 return; 28} 29