One Logo Pool Ball
MetalPerformanceShaders · IOS API REFERENCE

MPSCNNKernel

class · iOS 10.0+ · SDK 27.1

class MPSCNNKernel

Members (43)

method · iOS 11.3+

appendBatchBarrier

TypeScript
appendBatchBarrier(): boolean
Swift declaration
func appendBatchBarrier() -> Bool
method · iOS 13.0+

batchEncodingStorageSize

TypeScript
batchEncodingStorageSize(sourceImage: Array<MPSImage>, sourceStates?: (Array<Array<MPSState>>) | null, destinationImage?: (Array<MPSImage>) | null): number
Swift declaration
func batchEncodingStorageSize(sourceImage: [MPSImage], sourceStates: [[MPSState]]?, destinationImage: [MPSImage]?) -> Int
method · iOS 11.0+

destinationImageDescriptor

TypeScript
destinationImageDescriptor(sourceImages: Array<MPSImage>, sourceStates?: (Array<MPSState>) | null): MPSImageDescriptor
Swift declaration
func destinationImageDescriptor(sourceImages: [MPSImage], sourceStates: [MPSState]?) -> MPSImageDescriptor
method · iOS 11.3+

encodeBatch

TypeScript
encodeBatchCommandBufferSourceImages(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>): Array<MPSImage>
Swift declaration
func encodeBatch(commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage]) -> [MPSImage]
method · iOS 11.3+

encodeBatch

TypeScript
encodeBatchCommandBufferSourceImagesDestinationImages(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>, destinationImages: Array<MPSImage>): void
Swift declaration
func encodeBatch(commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage], destinationImages: [MPSImage])
method · iOS 11.3+

encodeBatch

TypeScript
encodeBatchCommandBufferSourceImagesDestinationStatesDestinationImages(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>, destinationStates: (Array<MPSState>) | null, destinationImages: Array<MPSImage>): void
Swift declaration
func encodeBatch(commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage], destinationStates: [MPSState]?, destinationImages: [MPSImage])
method · iOS 11.3+

encodeBatch

TypeScript
encodeBatchCommandBufferSourceImagesDestinationStatesDestinationStateIsTemporary(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>, isTemporary: boolean): { $ret: Array<MPSImage>; $out: { "outStates": (_Foundation_NSArray) | null } }
Swift declaration
func encodeBatch(commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage], destinationStates outStates: AutoreleasingUnsafeMutablePointer<NSArray?>, destinationStateIsTemporary isTemporary: Bool) -> [MPSImage]

Omit the output parameters from the call. The result contains $ret and $out, with outStates inside $out.

method · iOS 11.0+

encode

TypeScript
encodeCommandBufferSourceImage(commandBuffer: SDKHandle, sourceImage: MPSImage): MPSImage
Swift declaration
func encode(commandBuffer: any MTLCommandBuffer, sourceImage: MPSImage) -> MPSImage
method · iOS 10.0+

encode

TypeScript
encodeCommandBufferSourceImageDestinationImage(commandBuffer: SDKHandle, sourceImage: MPSImage, destinationImage: MPSImage): void
Swift declaration
func encode(commandBuffer: any MTLCommandBuffer, sourceImage: MPSImage, destinationImage: MPSImage)
method · iOS 11.3+

encode

TypeScript
encodeCommandBufferSourceImageDestinationStateDestinationImage(commandBuffer: SDKHandle, sourceImage: MPSImage, destinationState: MPSState, destinationImage: MPSImage): void
Swift declaration
func encode(commandBuffer: any MTLCommandBuffer, sourceImage: MPSImage, destinationState: MPSState, destinationImage: MPSImage)
method · iOS 11.3+

encode

TypeScript
encodeCommandBufferSourceImageDestinationStateDestinationStateIsTemporary(commandBuffer: SDKHandle, sourceImage: MPSImage, isTemporary: boolean): { $ret: MPSImage; $out: { "outState": (MPSState) | null } }
Swift declaration
func encode(commandBuffer: any MTLCommandBuffer, sourceImage: MPSImage, destinationState outState: AutoreleasingUnsafeMutablePointer<MPSState?>, destinationStateIsTemporary isTemporary: Bool) -> MPSImage

Omit the output parameters from the call. The result contains $ret and $out, with outState inside $out.

method · iOS 13.0+

encodingStorageSize

TypeScript
encodingStorageSize(sourceImage: MPSImage, sourceStates?: (Array<MPSState>) | null, destinationImage?: (MPSImage) | null): number
Swift declaration
func encodingStorageSize(sourceImage: MPSImage, sourceStates: [MPSState]?, destinationImage: MPSImage?) -> Int
init · iOS 11.0+

init

TypeScript
static initCoderDevice(aDecoder: _Foundation_NSCoder, device: SDKHandle): (MPSCNNKernel) | null
Swift declaration
init?(coder aDecoder: NSCoder, device: any MTLDevice)
init · iOS 10.0+

init

TypeScript
static initDevice(device: SDKHandle): MPSCNNKernel
Swift declaration
init(device: any MTLDevice)
method · iOS 11.3+

isResultStateReusedAcrossBatch

TypeScript
isResultStateReusedAcrossBatch(): boolean
Swift declaration
func isResultStateReusedAcrossBatch() -> Bool
method · iOS 11.3+

resultStateBatch

TypeScript
resultStateBatch(sourceImage: Array<MPSImage>, sourceStates: (Array<Array<MPSState>>) | null, destinationImage: Array<MPSImage>): (Array<MPSState>) | null
Swift declaration
func resultStateBatch(sourceImage: [MPSImage], sourceStates: [[MPSState]]?, destinationImage: [MPSImage]) -> [MPSState]?
method · iOS 11.3+

resultState

TypeScript
resultState(sourceImage: MPSImage, sourceStates: (Array<MPSState>) | null, destinationImage: MPSImage): (MPSState) | null
Swift declaration
func resultState(sourceImage: MPSImage, sourceStates: [MPSState]?, destinationImage: MPSImage) -> MPSState?
method · iOS 11.3+

temporaryResultStateBatch

TypeScript
temporaryResultStateBatch(commandBuffer: SDKHandle, sourceImage: Array<MPSImage>, sourceStates: (Array<Array<MPSState>>) | null, destinationImage: Array<MPSImage>): (Array<MPSState>) | null
Swift declaration
func temporaryResultStateBatch(commandBuffer: any MTLCommandBuffer, sourceImage: [MPSImage], sourceStates: [[MPSState]]?, destinationImage: [MPSImage]) -> [MPSState]?
method · iOS 11.3+

temporaryResultState

TypeScript
temporaryResultState(commandBuffer: SDKHandle, sourceImage: MPSImage, sourceStates: (Array<MPSState>) | null, destinationImage: MPSImage): (MPSState) | null
Swift declaration
func temporaryResultState(commandBuffer: any MTLCommandBuffer, sourceImage: MPSImage, sourceStates: [MPSState]?, destinationImage: MPSImage) -> MPSState?
get · iOS 10.0+

clipRect

TypeScript
get clipRect(): _Metal_MTLRegion
Swift declaration
var clipRect: MTLRegion { get set }
set · iOS 10.0+

clipRect

TypeScript
set clipRect(value: _Metal_MTLRegion)
Swift declaration
var clipRect: MTLRegion { get set }
get · iOS 10.0+

destinationFeatureChannelOffset

TypeScript
get destinationFeatureChannelOffset(): number
Swift declaration
var destinationFeatureChannelOffset: Int { get set }
set · iOS 10.0+

destinationFeatureChannelOffset

TypeScript
set destinationFeatureChannelOffset(value: number)
Swift declaration
var destinationFeatureChannelOffset: Int { get set }
get · iOS 11.0+

destinationImageAllocator

TypeScript
get destinationImageAllocator(): SDKHandle
Swift declaration
var destinationImageAllocator: any MPSImageAllocator { get set }
set · iOS 11.0+

destinationImageAllocator

TypeScript
set destinationImageAllocator(value: SDKHandle)
Swift declaration
var destinationImageAllocator: any MPSImageAllocator { get set }
get · iOS 10.0+

dilationRateX

TypeScript
get dilationRateX(): number
Swift declaration
var dilationRateX: Int { get }
get · iOS 10.0+

dilationRateY

TypeScript
get dilationRateY(): number
Swift declaration
var dilationRateY: Int { get }
get · iOS 10.0+

edgeMode

TypeScript
get edgeMode(): MPSImageEdgeMode
Swift declaration
var edgeMode: MPSImageEdgeMode { get set }
set · iOS 10.0+

edgeMode

TypeScript
set edgeMode(value: MPSImageEdgeMode)
Swift declaration
var edgeMode: MPSImageEdgeMode { get set }
get · iOS 11.0+

isBackwards

TypeScript
get isBackwards(): boolean
Swift declaration
var isBackwards: Bool { get }
get · iOS 11.3+

isStateModified

TypeScript
get isStateModified(): boolean
Swift declaration
var isStateModified: Bool { get }
get · iOS 10.0+

kernelHeight

TypeScript
get kernelHeight(): number
Swift declaration
var kernelHeight: Int { get }
get · iOS 10.0+

kernelWidth

TypeScript
get kernelWidth(): number
Swift declaration
var kernelWidth: Int { get }
get · iOS 10.0+

offset

TypeScript
get offset(): MPSOffset
Swift declaration
var offset: MPSOffset { get set }
set · iOS 10.0+

offset

TypeScript
set offset(value: MPSOffset)
Swift declaration
var offset: MPSOffset { get set }
get · iOS 11.0+

padding

TypeScript
get padding(): SDKHandle
Swift declaration
var padding: any MPSNNPadding { get set }
set · iOS 11.0+

padding

TypeScript
set padding(value: SDKHandle)
Swift declaration
var padding: any MPSNNPadding { get set }
get · iOS 10.0+

sourceFeatureChannelMaxCount

TypeScript
get sourceFeatureChannelMaxCount(): number
Swift declaration
var sourceFeatureChannelMaxCount: Int { get set }
set · iOS 10.0+

sourceFeatureChannelMaxCount

TypeScript
set sourceFeatureChannelMaxCount(value: number)
Swift declaration
var sourceFeatureChannelMaxCount: Int { get set }
get · iOS 10.0+

sourceFeatureChannelOffset

TypeScript
get sourceFeatureChannelOffset(): number
Swift declaration
var sourceFeatureChannelOffset: Int { get set }
set · iOS 10.0+

sourceFeatureChannelOffset

TypeScript
set sourceFeatureChannelOffset(value: number)
Swift declaration
var sourceFeatureChannelOffset: Int { get set }
get · iOS 10.0+

strideInPixelsX

TypeScript
get strideInPixelsX(): number
Swift declaration
var strideInPixelsX: Int { get }
get · iOS 10.0+

strideInPixelsY

TypeScript
get strideInPixelsY(): number
Swift declaration
var strideInPixelsY: Int { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

MPSCNNKernel.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

All MetalPerformanceShaders types →