---
title: "encode(commandBuffer:inputMatrix:inputVector:resultVector:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsmatrixvectormultiplication/encode(commandbuffer:inputmatrix:inputvector:resultvector:)"
---

# encode(commandBuffer:inputMatrix:inputVector:resultVector:)

## Declaration

```swift
func encode(commandBuffer: any MTLCommandBuffer, inputMatrix: MPSMatrix, inputVector: MPSVector, resultVector: MPSVector)
```
