MPSNNStateNode(3) MetalPerformanceShaders.framework MPSNNStateNode(3)

MPSNNStateNode

#import <MPSNNGraphNodes.h>

Inherits NSObject.

Inherited by MPSNNBinaryGradientStateNode, MPSNNGradientStateNode, and MPSNNLabelsNode.


(nonnull instancetype) - init


id< MPSHandle > handle
BOOL exportFromGraph
BOOL synchronizeResource

A placeholder node denoting the position in the graph of a MPSState object Some filters need additional information about an image in order to function. For example a max-pooling gradient filter needs to know which position the max result came from in the original pooling filter in order to select the right data for gradient computation. In other cases, state may be moved into a MPSState object in order to keep the filter itself immutable. The MPSState object typically encapsulates one or more MTLResource objects.

- (nonnull instancetype) init

- (BOOL) exportFromGraph [read], [write], [nonatomic], [assign]

Tag a state node for view later Most state nodes are private to the graph. These alias memory heavily and consequently generally have invalid state when the graph exits. When exportFromGraph = YES, the image is preserved and made available through the [MPSNNGraph encode... resultStates:... list.

CAUTION: exporting an state from a graph prevents MPS from recycling memory. It will nearly always cause the amount of memory used by the graph to increase by the size of the state. There will probably be a performance regression accordingly. This feature should generally be used only when the node is needed as an input for further work and recomputing it is prohibitively costly.

Default: NO

- (id<MPSHandle>) handle [read], [write], [nonatomic], [retain]

MPS resource identification See MPSHandle protocol reference. Default: nil

- (BOOL) synchronizeResource [read], [write], [nonatomic], [assign]

Set to true to cause the resource to be synchronized with the CPU Ignored on non-MacOS.

Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3