---
title: "encode(commandBuffer:inputMatrix:biasVector:resultMatrix:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsmatrixneuron/encode(commandbuffer:inputmatrix:biasvector:resultmatrix:)"
---

# encode(commandBuffer:inputMatrix:biasVector:resultMatrix:)

## Declaration

```swift
func encode(commandBuffer: any MTLCommandBuffer, inputMatrix: MPSMatrix, biasVector: MPSVector?, resultMatrix: MPSMatrix)
```
