MetalPerformanceShaders · IOS API REFERENCE
MPSNNGraph
class · iOS 11.0+ · SDK 27.1
class MPSNNGraph
Members (24)
method · iOS 11.0+encodeBatch
TypeScriptencodeBatchToSourceImagesSourceStates(commandBuffer: SDKHandle, sourceImages: Array<Array<MPSImage>>, sourceStates?: (Array<Array<MPSState>>) | null): (Array<MPSImage>) | null
Swift declarationfunc encodeBatch(to commandBuffer: any MTLCommandBuffer, sourceImages: [[MPSImage]], sourceStates: [[MPSState]]?) -> [MPSImage]?
method · iOS 11.3+encodeBatch
TypeScriptencodeBatchToSourceImagesSourceStatesIntermediateImagesDestinationStates(commandBuffer: SDKHandle, sourceImages: Array<Array<MPSImage>>, sourceStates?: (Array<Array<MPSState>>) | null, intermediateImages?: (_Foundation_NSMutableArray) | null, destinationStates?: (_Foundation_NSMutableArray) | null): (Array<MPSImage>) | null
Swift declarationfunc encodeBatch(to commandBuffer: any MTLCommandBuffer, sourceImages: [[MPSImage]], sourceStates: [[MPSState]]?, intermediateImages: NSMutableArray?, destinationStates: NSMutableArray?) -> [MPSImage]?
method · iOS 11.0+encode
TypeScriptencodeToSourceImages(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>): (MPSImage) | null
Swift declarationfunc encode(to commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage]) -> MPSImage?
method · iOS 11.0+encode
TypeScriptencodeToSourceImagesSourceStatesIntermediateImagesDestinationStates(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>, sourceStates?: (Array<MPSState>) | null, intermediateImages?: (_Foundation_NSMutableArray) | null, destinationStates?: (_Foundation_NSMutableArray) | null): (MPSImage) | null
Swift declarationfunc encode(to commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage], sourceStates: [MPSState]?, intermediateImages: NSMutableArray?, destinationStates: NSMutableArray?) -> MPSImage?
method · iOS 11.0+executeAsync
TypeScriptexecuteAsync(sourceImages: Array<MPSImage>, handler: ((arg0: (MPSImage) | null, arg1: (NativeError) | null) => void)): MPSImage
Swift declarationfunc executeAsync(withSourceImages sourceImages: [MPSImage], completionHandler handler: @escaping MPSNNGraphCompletionHandler) -> MPSImage
init · iOS 11.0+init
TypeScriptstatic initCoderDevice(aDecoder: _Foundation_NSCoder, device: SDKHandle): (MPSNNGraph) | null
Swift declarationinit?(coder aDecoder: NSCoder, device: any MTLDevice)
init · iOS 11.0+ · Deprecated in iOS 11.3init
TypeScriptstatic initDeviceResultImage(device: SDKHandle, resultImage: MPSNNImageNode): (MPSNNGraph) | null
Swift declarationconvenience init?(device: any MTLDevice, resultImage: MPSNNImageNode)
init · iOS 11.0+init
TypeScriptstatic initDeviceResultImageResultImageIsNeeded(device: SDKHandle, resultImage: MPSNNImageNode, resultIsNeeded: boolean): (MPSNNGraph) | null
Swift declarationinit?(device: any MTLDevice, resultImage: MPSNNImageNode, resultImageIsNeeded resultIsNeeded: Bool)
init · iOS 13.0+init
TypeScriptstatic initDeviceResultImagesResultsAreNeeded(device: SDKHandle, resultImages: Array<MPSNNImageNode>): { $ret: (MPSNNGraph) | null; $out: { "areResultsNeeded": boolean } }
Swift declarationinit?(device: any MTLDevice, resultImages: [MPSNNImageNode], resultsAreNeeded areResultsNeeded: UnsafeMutablePointer<ObjCBool>?)
Omit the output parameters from the call. The result contains $ret and $out, with areResultsNeeded inside $out.
method · iOS 12.1+readCountForSourceImage
TypeScriptreadCountForSourceImage(index: number): number
Swift declarationfunc readCountForSourceImage(at index: Int) -> Int
method · iOS 12.1+readCountForSourceState
TypeScriptreadCountForSourceState(index: number): number
Swift declarationfunc readCountForSourceState(at index: Int) -> Int
method · iOS 11.0+reloadFromDataSources
TypeScriptreloadFromDataSources(): void
Swift declarationfunc reloadFromDataSources()
get · iOS 11.0+destinationImageAllocator
TypeScriptget destinationImageAllocator(): SDKHandle
Swift declarationvar destinationImageAllocator: any MPSImageAllocator { get set }
set · iOS 11.0+destinationImageAllocator
TypeScriptset destinationImageAllocator(value: SDKHandle)
Swift declarationvar destinationImageAllocator: any MPSImageAllocator { get set }
get · iOS 11.0+format
TypeScriptget format(): MPSImageFeatureChannelFormat
Swift declarationvar format: MPSImageFeatureChannelFormat { get set }
set · iOS 11.0+format
TypeScriptset format(value: MPSImageFeatureChannelFormat)
Swift declarationvar format: MPSImageFeatureChannelFormat { get set }
get · iOS 11.0+intermediateImageHandles
TypeScriptget intermediateImageHandles(): (Array<SDKHandle>) | null
Swift declarationvar intermediateImageHandles: [any MPSHandle]? { get }
get · iOS 11.0+outputStateIsTemporary
TypeScriptget outputStateIsTemporary(): boolean
Swift declarationvar outputStateIsTemporary: Bool { get set }
set · iOS 11.0+outputStateIsTemporary
TypeScriptset outputStateIsTemporary(value: boolean)
Swift declarationvar outputStateIsTemporary: Bool { get set }
get · iOS 11.0+resultHandle
TypeScriptget resultHandle(): (SDKHandle) | null
Swift declarationvar resultHandle: (any MPSHandle)? { get }
get · iOS 11.0+resultImageIsNeeded
TypeScriptget resultImageIsNeeded(): boolean
Swift declarationvar resultImageIsNeeded: Bool { get }
get · iOS 11.0+resultStateHandles
TypeScriptget resultStateHandles(): (Array<SDKHandle>) | null
Swift declarationvar resultStateHandles: [any MPSHandle]? { get }
get · iOS 11.0+sourceImageHandles
TypeScriptget sourceImageHandles(): Array<SDKHandle>
Swift declarationvar sourceImageHandles: [any MPSHandle] { get }
get · iOS 11.0+sourceStateHandles
TypeScriptget sourceStateHandles(): (Array<SDKHandle>) | null
Swift declarationvar sourceStateHandles: [any MPSHandle]? { get }
Skipped declarations
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
MPSNNGraph.init()
inherited init: cannot prove legal (class declares 3 custom initializers)
All MetalPerformanceShaders types →