Contents

init(device:)

Initializes a new kernel object.

Declaration

init(device: any MTLDevice)

Parameters

  • device:

    The Metal device on which the kernel will be used.

Mentioned in

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