Instance Property

threadExecutionWidth

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

Required.

Declaration

var threadExecutionWidth: Int { get }

Discussion

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.

Required.

var staticThreadgroupMemoryLength: Int

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

Required.