Interface MPSNDArrayAllocator

    • Method Detail

      • arrayForCommandBufferArrayDescriptorKernel

        @NotNull
        @NotNull MPSNDArray arrayForCommandBufferArrayDescriptorKernel​(@NotNull
                                                                       @NotNull MTLCommandBuffer cmdBuf,
                                                                       @NotNull
                                                                       @NotNull MPSNDArrayDescriptor descriptor,
                                                                       @NotNull
                                                                       @NotNull 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.