Instance Property


The number of threads that are executed simultaneously by the GPU.



var threadExecutionWidth: Int { get }


For better performance, when dispatching a compute command using the MTLComputePipelineState, make the number of threads in the threadgroup a multiple of threadExecutionWidth. If you can guarantee that you will always dispatch compute commands in this way, use a MTLComputePipelineDescriptor object to create the pipeline state object, and set the descriptor's threadGroupSizeIsMultipleOfThreadExecutionWidth property to true.

See Also

Querying Threadgroup Attributes

var maxTotalThreadsPerThreadgroup: Int

The maximum number of threads in a threadgroup that can be dispatched using the pipeline.


var staticThreadgroupMemoryLength: Int

The length, in bytes, of threadgroup memory that is statically allocated.


Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software