.TH "MPSNNStateNode" 3 "Mon Jul 9 2018" "Version MetalPerformanceShaders-119.3" "MetalPerformanceShaders.framework" \" -*- nroff -*- .ad l .nh .SH NAME MPSNNStateNode .SH SYNOPSIS .br .PP .PP \fC#import \fP .PP Inherits NSObject\&. .PP Inherited by \fBMPSNNBinaryGradientStateNode\fP, \fBMPSNNGradientStateNode\fP, and \fBMPSNNLabelsNode\fP\&. .SS "Instance Methods" .in +1c .ti -1c .RI "(nonnull instancetype) \- \fBinit\fP" .br .in -1c .SS "Properties" .in +1c .ti -1c .RI "id< \fBMPSHandle\fP > \fBhandle\fP" .br .ti -1c .RI "BOOL \fBexportFromGraph\fP" .br .ti -1c .RI "BOOL \fBsynchronizeResource\fP" .br .in -1c .SH "Detailed Description" .PP \fBA\fP placeholder node denoting the position in the graph of a \fBMPSState\fP 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 \fBMPSState\fP object in order to keep the filter itself immutable\&. The \fBMPSState\fP object typically encapsulates one or more MTLResource objects\&. .SH "Method Documentation" .PP .SS "\- (nonnull instancetype) init " .SH "Property Documentation" .PP .SS "\- (BOOL) exportFromGraph\fC [read]\fP, \fC [write]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" 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 [\fBMPSNNGraph\fP encode\&.\&.\&. resultStates:\&.\&.\&. list\&. .PP 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\&. .PP Default: NO .SS "\- (id<\fBMPSHandle\fP>) handle\fC [read]\fP, \fC [write]\fP, \fC [nonatomic]\fP, \fC [retain]\fP" MPS resource identification See \fBMPSHandle\fP protocol reference\&. Default: nil .SS "\- (BOOL) synchronizeResource\fC [read]\fP, \fC [write]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" Set to true to cause the resource to be synchronized with the CPU Ignored on non-MacOS\&. .SH "Author" .PP Generated automatically by Doxygen for MetalPerformanceShaders\&.framework from the source code\&.