init(device:kernelWidth:kernelHeight:weights:)
Initialize a downwards n-tap image pyramid with a custom filter kernel and device.
Declaration
init(device: any MTLDevice, kernelWidth: Int, kernelHeight: Int, weights kernelWeights: UnsafePointer<Float>)Parameters
- device:
The device the filter will run on.
- kernelWidth:
The width of the filter kernel.
- kernelHeight:
The height of the filter kernel.
- kernelWeights:
A pointer to an array of
kernelWidth*kernelHeightvalues to be used as the kernel. These values are in row-major order.
Return Value
A valid MPSImagePyramid object or nil, if failure.