Contents

copy(with:device:)

Declaration

func copy(with zone: NSZone? = nil, device: (any MTLDevice)?) -> Self

Parameters

  • zone:

    The NSZone in which to allocate the object

  • device:

    The device for the new MPSKernel. If nil, then use self.device.

Return Value

A pointer to a copy of this MPSKernel. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later.

Discussion

Make a copy of this MPSFunction for a new device

-copyWithZone: will call this API to make a copy of the MPSKernel on the same device. This interface may also be called directly to make a copy of the MPSFunction on a new device.