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

# encodeBatch(commandBuffer:sourceImages:)

## Declaration

```swift
func encodeBatch(commandBuffer: any MTLCommandBuffer, sourceImages sourceImageBatches: [[MPSImage]]) -> [MPSImage]
```
