---
title: "encode(commandBuffer:sourceMatrix:rightHandSideMatrix:solutionMatrix:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsmatrixsolvetriangular/encode(commandbuffer:sourcematrix:righthandsidematrix:solutionmatrix:)"
---

# encode(commandBuffer:sourceMatrix:rightHandSideMatrix:solutionMatrix:)

## Declaration

```swift
func encode(commandBuffer: any MTLCommandBuffer, sourceMatrix: MPSMatrix, rightHandSideMatrix: MPSMatrix, solutionMatrix: MPSMatrix)
```
