---
title: "encode(commandBuffer:sourceMatrix:resultMatrix:status:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsmatrixdecompositioncholesky/encode(commandbuffer:sourcematrix:resultmatrix:status:)"
---

# encode(commandBuffer:sourceMatrix:resultMatrix:status:)

## Declaration

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