One Logo Pool Ball
MetalPerformanceShaders · IOS API REFERENCE

MPSNNGraph

class · iOS 11.0+ · SDK 27.1

class MPSNNGraph

Members (24)

method · iOS 11.0+

encodeBatch

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

encodeBatch

TypeScript
encodeBatchToSourceImagesSourceStatesIntermediateImagesDestinationStates(commandBuffer: SDKHandle, sourceImages: Array<Array<MPSImage>>, sourceStates?: (Array<Array<MPSState>>) | null, intermediateImages?: (_Foundation_NSMutableArray) | null, destinationStates?: (_Foundation_NSMutableArray) | null): (Array<MPSImage>) | null
Swift declaration
func encodeBatch(to commandBuffer: any MTLCommandBuffer, sourceImages: [[MPSImage]], sourceStates: [[MPSState]]?, intermediateImages: NSMutableArray?, destinationStates: NSMutableArray?) -> [MPSImage]?
method · iOS 11.0+

encode

TypeScript
encodeToSourceImages(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>): (MPSImage) | null
Swift declaration
func encode(to commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage]) -> MPSImage?
method · iOS 11.0+

encode

TypeScript
encodeToSourceImagesSourceStatesIntermediateImagesDestinationStates(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>, sourceStates?: (Array<MPSState>) | null, intermediateImages?: (_Foundation_NSMutableArray) | null, destinationStates?: (_Foundation_NSMutableArray) | null): (MPSImage) | null
Swift declaration
func encode(to commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage], sourceStates: [MPSState]?, intermediateImages: NSMutableArray?, destinationStates: NSMutableArray?) -> MPSImage?
method · iOS 11.0+

executeAsync

TypeScript
executeAsync(sourceImages: Array<MPSImage>, handler: ((arg0: (MPSImage) | null, arg1: (NativeError) | null) => void)): MPSImage
Swift declaration
func executeAsync(withSourceImages sourceImages: [MPSImage], completionHandler handler: @escaping MPSNNGraphCompletionHandler) -> MPSImage
init · iOS 11.0+

init

TypeScript
static initCoderDevice(aDecoder: _Foundation_NSCoder, device: SDKHandle): (MPSNNGraph) | null
Swift declaration
init?(coder aDecoder: NSCoder, device: any MTLDevice)
init · iOS 11.0+ · Deprecated in iOS 11.3

init

TypeScript
static initDeviceResultImage(device: SDKHandle, resultImage: MPSNNImageNode): (MPSNNGraph) | null
Swift declaration
convenience init?(device: any MTLDevice, resultImage: MPSNNImageNode)
init · iOS 11.0+

init

TypeScript
static initDeviceResultImageResultImageIsNeeded(device: SDKHandle, resultImage: MPSNNImageNode, resultIsNeeded: boolean): (MPSNNGraph) | null
Swift declaration
init?(device: any MTLDevice, resultImage: MPSNNImageNode, resultImageIsNeeded resultIsNeeded: Bool)
init · iOS 13.0+

init

TypeScript
static initDeviceResultImagesResultsAreNeeded(device: SDKHandle, resultImages: Array<MPSNNImageNode>): { $ret: (MPSNNGraph) | null; $out: { "areResultsNeeded": boolean } }
Swift declaration
init?(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

TypeScript
readCountForSourceImage(index: number): number
Swift declaration
func readCountForSourceImage(at index: Int) -> Int
method · iOS 12.1+

readCountForSourceState

TypeScript
readCountForSourceState(index: number): number
Swift declaration
func readCountForSourceState(at index: Int) -> Int
method · iOS 11.0+

reloadFromDataSources

TypeScript
reloadFromDataSources(): void
Swift declaration
func reloadFromDataSources()
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 11.0+

format

TypeScript
get format(): MPSImageFeatureChannelFormat
Swift declaration
var format: MPSImageFeatureChannelFormat { get set }
set · iOS 11.0+

format

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

intermediateImageHandles

TypeScript
get intermediateImageHandles(): (Array<SDKHandle>) | null
Swift declaration
var intermediateImageHandles: [any MPSHandle]? { get }
get · iOS 11.0+

outputStateIsTemporary

TypeScript
get outputStateIsTemporary(): boolean
Swift declaration
var outputStateIsTemporary: Bool { get set }
set · iOS 11.0+

outputStateIsTemporary

TypeScript
set outputStateIsTemporary(value: boolean)
Swift declaration
var outputStateIsTemporary: Bool { get set }
get · iOS 11.0+

resultHandle

TypeScript
get resultHandle(): (SDKHandle) | null
Swift declaration
var resultHandle: (any MPSHandle)? { get }
get · iOS 11.0+

resultImageIsNeeded

TypeScript
get resultImageIsNeeded(): boolean
Swift declaration
var resultImageIsNeeded: Bool { get }
get · iOS 11.0+

resultStateHandles

TypeScript
get resultStateHandles(): (Array<SDKHandle>) | null
Swift declaration
var resultStateHandles: [any MPSHandle]? { get }
get · iOS 11.0+

sourceImageHandles

TypeScript
get sourceImageHandles(): Array<SDKHandle>
Swift declaration
var sourceImageHandles: [any MPSHandle] { get }
get · iOS 11.0+

sourceStateHandles

TypeScript
get sourceStateHandles(): (Array<SDKHandle>) | null
Swift declaration
var 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 →