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

# encodeBatch(commandBuffer:sourceImages:destinationMatrix:)

## Declaration

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

## See Also

### Instance Methods

- [encode(commandBuffer:sourceImage:destinationMatrix:)](metalperformanceshaders/mpsimagecopytomatrix/encode(commandbuffer:sourceimage:destinationmatrix:).md)
