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

# encode(commandBuffer:inputMatrix:resultMatrix:)

## Declaration

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