Ray Tracing, Apple Metal, Swift Programming, Gpu Rendering, Wwdc 2020.
//5 creating the Threads in a 2 dimension var width = computePipelineState.threadExecutionWidth var height = computePipelineState.maxTotalThreadsPerThreadgroup / width let threadPerThreadgroup = MTLSizeMake(width, height, 1) let threadsPerGrid = MTLSizeMake(row, column, 1)