---
title: MPSCNNBinaryKernel
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpscnnbinarykernel
---

# MPSCNNBinaryKernel

A convolution neural network kernel.

## Declaration

```swift
class MPSCNNBinaryKernel
```

## Topics

### Initializers

- [init(coder:device:)](metalperformanceshaders/mpscnnbinarykernel/init(coder:device:).md)
- [init(device:)](metalperformanceshaders/mpscnnbinarykernel/init(device:).md)

### Instance Properties

- [clipRect](metalperformanceshaders/mpscnnbinarykernel/cliprect.md)
- [destinationFeatureChannelOffset](metalperformanceshaders/mpscnnbinarykernel/destinationfeaturechanneloffset.md)
- [destinationImageAllocator](metalperformanceshaders/mpscnnbinarykernel/destinationimageallocator.md)
- [isBackwards](metalperformanceshaders/mpscnnbinarykernel/isbackwards.md)
- [padding](metalperformanceshaders/mpscnnbinarykernel/padding.md)
- [primaryEdgeMode](metalperformanceshaders/mpscnnbinarykernel/primaryedgemode.md)
- [primaryOffset](metalperformanceshaders/mpscnnbinarykernel/primaryoffset.md)
- [primaryStrideInPixelsX](metalperformanceshaders/mpscnnbinarykernel/primarystrideinpixelsx.md)
- [primaryStrideInPixelsY](metalperformanceshaders/mpscnnbinarykernel/primarystrideinpixelsy.md)
- [secondaryEdgeMode](metalperformanceshaders/mpscnnbinarykernel/secondaryedgemode.md)
- [secondaryOffset](metalperformanceshaders/mpscnnbinarykernel/secondaryoffset.md)
- [secondaryStrideInPixelsX](metalperformanceshaders/mpscnnbinarykernel/secondarystrideinpixelsx.md)
- [secondaryStrideInPixelsY](metalperformanceshaders/mpscnnbinarykernel/secondarystrideinpixelsy.md)
- [isStateModified](metalperformanceshaders/mpscnnbinarykernel/isstatemodified.md)
- [primaryDilationRateX](metalperformanceshaders/mpscnnbinarykernel/primarydilationratex.md)
- [primaryDilationRateY](metalperformanceshaders/mpscnnbinarykernel/primarydilationratey.md)
- [primaryKernelHeight](metalperformanceshaders/mpscnnbinarykernel/primarykernelheight.md)
- [primaryKernelWidth](metalperformanceshaders/mpscnnbinarykernel/primarykernelwidth.md)
- [primarySourceFeatureChannelMaxCount](metalperformanceshaders/mpscnnbinarykernel/primarysourcefeaturechannelmaxcount.md)
- [primarySourceFeatureChannelOffset](metalperformanceshaders/mpscnnbinarykernel/primarysourcefeaturechanneloffset.md)
- [secondaryDilationRateX](metalperformanceshaders/mpscnnbinarykernel/secondarydilationratex.md)
- [secondaryDilationRateY](metalperformanceshaders/mpscnnbinarykernel/secondarydilationratey.md)
- [secondaryKernelHeight](metalperformanceshaders/mpscnnbinarykernel/secondarykernelheight.md)
- [secondaryKernelWidth](metalperformanceshaders/mpscnnbinarykernel/secondarykernelwidth.md)
- [secondarySourceFeatureChannelMaxCount](metalperformanceshaders/mpscnnbinarykernel/secondarysourcefeaturechannelmaxcount.md)
- [secondarySourceFeatureChannelOffset](metalperformanceshaders/mpscnnbinarykernel/secondarysourcefeaturechanneloffset.md)

### Instance Methods

- [encode(commandBuffer:primaryImage:secondaryImage:)](metalperformanceshaders/mpscnnbinarykernel/encode(commandbuffer:primaryimage:secondaryimage:).md)
- [encode(commandBuffer:primaryImage:secondaryImage:destinationImage:)](metalperformanceshaders/mpscnnbinarykernel/encode(commandbuffer:primaryimage:secondaryimage:destinationimage:).md)
- [appendBatchBarrier()](metalperformanceshaders/mpscnnbinarykernel/appendbatchbarrier().md)
- [batchEncodingStorageSize(primaryImage:secondaryImage:sourceStates:destinationImage:)](metalperformanceshaders/mpscnnbinarykernel/batchencodingstoragesize(primaryimage:secondaryimage:sourcestates:destinationimage:).md)
- [destinationImageDescriptor(forSourceImages:sourceStates:)](metalperformanceshaders/mpscnnbinarykernel/destinationimagedescriptor(forsourceimages:sourcestates:).md)
- [encode(commandBuffer:primaryImage:secondaryImage:destinationState:destinationStateIsTemporary:)](metalperformanceshaders/mpscnnbinarykernel/encode(commandbuffer:primaryimage:secondaryimage:destinationstate:destinationstateistemporary:).md)
- [encodeBatch(commandBuffer:primaryImages:secondaryImages:)](metalperformanceshaders/mpscnnbinarykernel/encodebatch(commandbuffer:primaryimages:secondaryimages:).md)
- [encodeBatch(commandBuffer:primaryImages:secondaryImages:destinationImages:)](metalperformanceshaders/mpscnnbinarykernel/encodebatch(commandbuffer:primaryimages:secondaryimages:destinationimages:).md)
- [encodeBatch(commandBuffer:primaryImages:secondaryImages:destinationStates:destinationStateIsTemporary:)](metalperformanceshaders/mpscnnbinarykernel/encodebatch(commandbuffer:primaryimages:secondaryimages:destinationstates:destinationstateistemporary:).md)
- [encodingStorageSize(primaryImage:secondaryImage:sourceStates:destinationImage:)](metalperformanceshaders/mpscnnbinarykernel/encodingstoragesize(primaryimage:secondaryimage:sourcestates:destinationimage:).md)
- [isResultStateReusedAcrossBatch()](metalperformanceshaders/mpscnnbinarykernel/isresultstatereusedacrossbatch().md)
- [resultState(primaryImage:secondaryImage:sourceStates:destinationImage:)](metalperformanceshaders/mpscnnbinarykernel/resultstate(primaryimage:secondaryimage:sourcestates:destinationimage:).md)
- [resultStateBatch(primaryImage:secondaryImage:sourceStates:destinationImage:)](metalperformanceshaders/mpscnnbinarykernel/resultstatebatch(primaryimage:secondaryimage:sourcestates:destinationimage:).md)
- [temporaryResultState(commandBuffer:primaryImage:secondaryImage:sourceStates:destinationImage:)](metalperformanceshaders/mpscnnbinarykernel/temporaryresultstate(commandbuffer:primaryimage:secondaryimage:sourcestates:destinationimage:).md)
- [temporaryResultStateBatch(commandBuffer:primaryImage:secondaryImage:sourceStates:destinationImage:)](metalperformanceshaders/mpscnnbinarykernel/temporaryresultstatebatch(commandbuffer:primaryimage:secondaryimage:sourcestates:destinationimage:).md)

## Relationships

### Inherits From

- [MPSKernel](metalperformanceshaders/mpskernel.md)

### Inherited By

- [MPSCNNArithmetic](metalperformanceshaders/mpscnnarithmetic.md)
- [MPSCNNGradientKernel](metalperformanceshaders/mpscnngradientkernel.md)
- [MPSNNGridSample](metalperformanceshaders/mpsnngridsample.md)
- [MPSNNLossGradient](metalperformanceshaders/mpsnnlossgradient.md)
- [MPSNNReduceBinary](metalperformanceshaders/mpsnnreducebinary.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Layer Base Classes

- [MPSCNNKernel](metalperformanceshaders/mpscnnkernel.md)
- [MPSCNNGradientKernel](metalperformanceshaders/mpscnngradientkernel.md)
