---
title: "encode(commandBuffer:sourceMatrix:resultMatrix:pivotIndices:info:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsmatrixdecompositionlu/encode(commandbuffer:sourcematrix:resultmatrix:pivotindices:info:)"
---

# encode(commandBuffer:sourceMatrix:resultMatrix:pivotIndices:info:)

## Declaration

```swift
func encode(commandBuffer: any MTLCommandBuffer, sourceMatrix: MPSMatrix, resultMatrix: MPSMatrix, pivotIndices: MPSMatrix, info status: (any MTLBuffer)?)
```
