---
title: "encode(commandBuffer:destinationVector:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsmatrixrandom/encode(commandbuffer:destinationvector:)"
---

# encode(commandBuffer:destinationVector:)

## Declaration

```swift
func encode(commandBuffer: any MTLCommandBuffer, destinationVector: MPSVector)
```
