Instance Property


A Boolean that indicates whether the threadgroup size must always be a multiple of the thread execution width.


var threadGroupSizeIsMultipleOfThreadExecutionWidth: Bool { get set }


The default value is false. Set this to true if you can guarantee that the compute function will always be dispatched with a threadgroup size that is a multiple of the thread execution width. Setting this flag to true may improve performance.

When you use the resulting pipeline state object to encode commands, you get the thread execution width from its threadExecutionWidth property. The results are undefined if this value is set to true and a dispatch call is made where the threadgroup size is not a multiple of the thread execution width.

See Also

Specifying the Compute Function and Associated Data

var computeFunction: MTLFunction?

The compute function to be compiled into the pipeline state object.

var maxTotalThreadsPerThreadgroup: Int

The maximum number of threads allowed for a threadgroup dispatched to the compute function.

var stageInputDescriptor: MTLStageInputOutputDescriptor?

The organization of input and output data for the compute function.

var buffers: MTLPipelineBufferDescriptorArray

The buffer mutability options for a compute pipeline's kernel function.

class MTLPipelineBufferDescriptor

An object that contains the mutability options for buffers used in a render or compute pass.

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