---
title: MPSMatrixSolveTriangular
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsmatrixsolvetriangular
---

# MPSMatrixSolveTriangular

A kernel for computing the solution of a linear system of equations using a triangular coefficient matrix.

## Declaration

```swift
class MPSMatrixSolveTriangular
```

## Overview

Overview This kernel finds the solution matrix to the system op(A) * X = alpha * B or X * op(A) = alpha * B, where: A is either an upper or lower triangular matrix op(A) is either Aᵀ or A X is the resulting matrix of solutions B is the array of right hand sides for which the equations are to be solved

## Topics

### Initializers

- [init(device:right:upper:transpose:unit:order:numberOfRightHandSides:alpha:)](metalperformanceshaders/mpsmatrixsolvetriangular/init(device:right:upper:transpose:unit:order:numberofrighthandsides:alpha:).md)

### Instance Methods

- [encode(commandBuffer:sourceMatrix:rightHandSideMatrix:solutionMatrix:)](metalperformanceshaders/mpsmatrixsolvetriangular/encode(commandbuffer:sourcematrix:righthandsidematrix:solutionmatrix:).md)

## Relationships

### Inherits From

- [MPSMatrixBinaryKernel](metalperformanceshaders/mpsmatrixbinarykernel.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Classes for Decomposition and Solving

- [MPSMatrixDecompositionCholesky](metalperformanceshaders/mpsmatrixdecompositioncholesky.md)
- [MPSMatrixSolveCholesky](metalperformanceshaders/mpsmatrixsolvecholesky.md)
- [MPSMatrixDecompositionLU](metalperformanceshaders/mpsmatrixdecompositionlu.md)
- [MPSMatrixSolveLU](metalperformanceshaders/mpsmatrixsolvelu.md)
- [MPSMatrixUnaryKernel](metalperformanceshaders/mpsmatrixunarykernel.md)
- [MPSMatrixBinaryKernel](metalperformanceshaders/mpsmatrixbinarykernel.md)
- [MPSMatrixDecompositionStatus](metalperformanceshaders/mpsmatrixdecompositionstatus.md)
