---
title: MPSNNBinaryGradientState
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsnnbinarygradientstate
---

# MPSNNBinaryGradientState

A class representing the state of a gradient binary kernel when it was encoded.

## Declaration

```swift
class MPSNNBinaryGradientState
```

## Relationships

### Inherits From

- [MPSState](metalperformanceshaders/mpsstate.md)

### Inherited By

- [MPSCNNArithmeticGradientState](metalperformanceshaders/mpscnnarithmeticgradientstate.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Instance Methods

- [encode(to:sourceImages:)](metalperformanceshaders/mpsnngraph/encode(to:sourceimages:).md)
- [encode(to:sourceImages:sourceStates:intermediateImages:destinationStates:)](metalperformanceshaders/mpsnngraph/encode(to:sourceimages:sourcestates:intermediateimages:destinationstates:).md)
- [MPSState](metalperformanceshaders/mpsstate.md)
- [MPSNNGradientState](metalperformanceshaders/mpsnngradientstate.md)
- [executeAsync(withSourceImages:completionHandler:)](metalperformanceshaders/mpsnngraph/executeasync(withsourceimages:completionhandler:).md)
- [MPSNNGraphCompletionHandler](metalperformanceshaders/mpsnngraphcompletionhandler.md)
- [encodeBatch(to:sourceImages:sourceStates:)](metalperformanceshaders/mpsnngraph/encodebatch(to:sourceimages:sourcestates:).md)
- [encodeBatch(to:sourceImages:sourceStates:intermediateImages:destinationStates:)](metalperformanceshaders/mpsnngraph/encodebatch(to:sourceimages:sourcestates:intermediateimages:destinationstates:).md)
- [readCountForSourceImage(at:)](metalperformanceshaders/mpsnngraph/readcountforsourceimage(at:).md)
- [readCountForSourceState(at:)](metalperformanceshaders/mpsnngraph/readcountforsourcestate(at:).md)
- [reloadFromDataSources()](metalperformanceshaders/mpsnngraph/reloadfromdatasources().md)
