Instance Method

initWithDevice:

Initializes a new kernel object.

Declaration

- (instancetype)initWithDevice:(id<MTLDevice>)device;

Parameters

device

The Metal device on which the kernel will be used.

Return Value

An initialized kernel object.

Discussion

This method fails if the device is not supported. Query the MPSSupportsMTLDevice function to determine whether the device is supported.

See Also

Methods

- copyWithZone:device:

Makes a copy of this kernel object for a new device.

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