module

GS::Metal::Dispatch

High-level dispatch helper

Instance methods

execute(pipeline : ComputePipeline, &block : ComputeEncoder -> Nil) : Nil

Execute a kernel synchronously

Source
execute_async(pipeline : ComputePipeline, &block : ComputeEncoder -> Nil) : CommandBuffer

Execute kernel asynchronously

Source
execute_sequence

Execute multiple kernels in sequence (single command buffer)

Source
optimal_threadgroup_1d(count : Int32, pipeline : ComputePipeline | Nil = nil) : Int32

Optimal threadgroup size for 1D workloads

Source
optimal_threadgroup_2d(width : Int32, height : Int32, pipeline : ComputePipeline | Nil = nil) : Tuple(Int32, Int32)

Optimal threadgroup size for 2D workloads (images, tiles)

Source