Interface MPSNDArrayAllocator

    • Method Detail

      • arrayForCommandBufferArrayDescriptorKernel

        MPSNDArray arrayForCommandBufferArrayDescriptorKernel​(MTLCommandBuffer cmdBuf,
                                                              MPSNDArrayDescriptor descriptor,
                                                              MPSKernel kernel)
        Create a new MPSNDArray See class description for sample implementation
        Parameters:
        cmdBuf - The MTLCommandBuffer on which the array will be initialized. cmdBuf.device encodes the MTLDevice.
        descriptor - A MPSNDArrayDescriptor containing the array parameters to use. This format is the result of your MPSPadding policy.
        kernel - The kernel that will overwrite the array returned by the filter. Note that the MPS implementations of this protocol don't need this field. It is provided for your convenience.
        Returns:
        A valid MPSNDArray or MPSTemporaryNDArray. It will be automatically released when the command buffer completes.