---
title: "encodeBatch(commandBuffer:sourceImages:destinationStates:destinationStateIsTemporary:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpscnnkernel/encodebatch(commandbuffer:sourceimages:destinationstates:destinationstateistemporary:)"
---

# encodeBatch(commandBuffer:sourceImages:destinationStates:destinationStateIsTemporary:)

## Declaration

```swift
func encodeBatch(commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage], destinationStates outStates: AutoreleasingUnsafeMutablePointer<NSArray?>, destinationStateIsTemporary isTemporary: Bool) -> [MPSImage]
```

## See Also

### Instance Methods

- [encode(commandBuffer:sourceImage:)](metalperformanceshaders/mpscnnkernel/encode(commandbuffer:sourceimage:).md)
- [encode(commandBuffer:sourceImage:destinationImage:)](metalperformanceshaders/mpscnnkernel/encode(commandbuffer:sourceimage:destinationimage:).md)
- [appendBatchBarrier()](metalperformanceshaders/mpscnnkernel/appendbatchbarrier().md)
- [batchEncodingStorageSize(sourceImage:sourceStates:destinationImage:)](metalperformanceshaders/mpscnnkernel/batchencodingstoragesize(sourceimage:sourcestates:destinationimage:).md)
- [destinationImageDescriptor(sourceImages:sourceStates:)](metalperformanceshaders/mpscnnkernel/destinationimagedescriptor(sourceimages:sourcestates:).md)
- [encode(commandBuffer:sourceImage:destinationState:destinationImage:)](metalperformanceshaders/mpscnnkernel/encode(commandbuffer:sourceimage:destinationstate:destinationimage:).md)
- [encode(commandBuffer:sourceImage:destinationState:destinationStateIsTemporary:)](metalperformanceshaders/mpscnnkernel/encode(commandbuffer:sourceimage:destinationstate:destinationstateistemporary:).md)
- [encodeBatch(commandBuffer:sourceImages:)](metalperformanceshaders/mpscnnkernel/encodebatch(commandbuffer:sourceimages:).md)
- [encodeBatch(commandBuffer:sourceImages:destinationImages:)](metalperformanceshaders/mpscnnkernel/encodebatch(commandbuffer:sourceimages:destinationimages:).md)
- [encodeBatch(commandBuffer:sourceImages:destinationStates:destinationImages:)](metalperformanceshaders/mpscnnkernel/encodebatch(commandbuffer:sourceimages:destinationstates:destinationimages:).md)
- [encodingStorageSize(sourceImage:sourceStates:destinationImage:)](metalperformanceshaders/mpscnnkernel/encodingstoragesize(sourceimage:sourcestates:destinationimage:).md)
- [isResultStateReusedAcrossBatch()](metalperformanceshaders/mpscnnkernel/isresultstatereusedacrossbatch().md)
- [resultState(sourceImage:sourceStates:destinationImage:)](metalperformanceshaders/mpscnnkernel/resultstate(sourceimage:sourcestates:destinationimage:).md)
- [resultStateBatch(sourceImage:sourceStates:destinationImage:)](metalperformanceshaders/mpscnnkernel/resultstatebatch(sourceimage:sourcestates:destinationimage:).md)
- [temporaryResultState(commandBuffer:sourceImage:sourceStates:destinationImage:)](metalperformanceshaders/mpscnnkernel/temporaryresultstate(commandbuffer:sourceimage:sourcestates:destinationimage:).md)
