---
title: "encodeBatch(commandBuffer:sourceImages:destinationImages:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpscnnmultiarykernel/encodebatch(commandbuffer:sourceimages:destinationimages:)"
---

# encodeBatch(commandBuffer:sourceImages:destinationImages:)

## Declaration

```swift
func encodeBatch(commandBuffer: any MTLCommandBuffer, sourceImages: [[MPSImage]], destinationImages: [MPSImage])
```
