---
title: MPSMatrixSolveLU
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsmatrixsolvelu
---

# MPSMatrixSolveLU

A kernel for computing the solution of a linear system of equations using an LU factorization.

## Declaration

```swift
class MPSMatrixSolveLU
```

## Overview

Overview This kernel finds the solution matrix to the system op(A) * X = B, where: op(A) is 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:transpose:order:numberOfRightHandSides:)](metalperformanceshaders/mpsmatrixsolvelu/init(device:transpose:order:numberofrighthandsides:).md)

### Instance Methods

- [encode(commandBuffer:sourceMatrix:rightHandSideMatrix:pivotIndices:solutionMatrix:)](metalperformanceshaders/mpsmatrixsolvelu/encode(commandbuffer:sourcematrix:righthandsidematrix:pivotindices: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)
- [MPSMatrixSolveTriangular](metalperformanceshaders/mpsmatrixsolvetriangular.md)
- [MPSMatrixUnaryKernel](metalperformanceshaders/mpsmatrixunarykernel.md)
- [MPSMatrixBinaryKernel](metalperformanceshaders/mpsmatrixbinarykernel.md)
- [MPSMatrixDecompositionStatus](metalperformanceshaders/mpsmatrixdecompositionstatus.md)
