Class

MTLComputePipelineDescriptor

An object used to customize how a new compute pipeline state object is compiled.

Declaration

@interface MTLComputePipelineDescriptor : NSObject

Overview

To create a MTLComputePipelineState object, you create a pipeline descriptor, configure its properties, and pass it to one of the creation methods on a MTLDevice object. See Creating a Compute Pipeline.

Use standard allocation and initialization techniques to create a MTLComputePipelineDescriptor object and configure its properties. The most important property to set is the computeFunction property, which specifies which Metal function to call.

Topics

Specifying the Compute Function and Associated Data

computeFunction

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

threadGroupSizeIsMultipleOfThreadExecutionWidth

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

maxTotalThreadsPerThreadgroup

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

stageInputDescriptor

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

buffers

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

MTLPipelineBufferDescriptor

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

Identifying Properties

label

A string that identifies this object.

Resetting the Compute Pipeline State

- reset

Resets all compute pipeline descriptor properties to their default values.

Instance Properties

Relationships

Inherits From

Conforms To

See Also

Parallel Computation

Hello Compute

Demonstrates how to perform data-parallel computations using the GPU.

About Threads and Threadgroups

Learn how Metal organizes compute-processing workloads.

Calculating Threadgroup and Grid Sizes

Calculate the optimum sizes for threadgroups and grids when dispatching compute-processing workloads.

MTLComputePipelineState

An object that contains a compiled compute pipeline.

MTLComputeCommandEncoder

An object used to encode commands in a 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