Initializer

init(device:kernelWidth:kernelHeight:)

Initializes a pooling filter.

Declaration

convenience init(device: MTLDevice, kernelWidth: Int, kernelHeight: Int)

Parameters

device

The device the kernel will run on.

kernelWidth

The width of the kernel.

This value can be odd or even.

kernelHeight

The height of the kernel.

This value can be odd or even.

Return Value

A valid MPSCNNPooling object or nil, if failure.