---
title: MPSMatrixDecompositionLU
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsmatrixdecompositionlu
---

# MPSMatrixDecompositionLU

A kernel for computing the LU factorization of a matrix using partial pivoting with row interchanges.

## Declaration

```swift
class MPSMatrixDecompositionLU
```

## Overview

Overview This kernel object computes an LU factorization, PA = LU, where: A is a matrix for which the LU factorization is to be computed L is a unit lower triangular matrix U is an upper triangular matrix P is a permutation matrix

## Topics

### Initializers

- [init(device:rows:columns:)](metalperformanceshaders/mpsmatrixdecompositionlu/init(device:rows:columns:).md)

### Instance Methods

- [encode(commandBuffer:sourceMatrix:resultMatrix:pivotIndices:info:)](metalperformanceshaders/mpsmatrixdecompositionlu/encode(commandbuffer:sourcematrix:resultmatrix:pivotindices:info:).md)

## Relationships

### Inherits From

- [MPSMatrixUnaryKernel](metalperformanceshaders/mpsmatrixunarykernel.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)
- [MPSMatrixSolveLU](metalperformanceshaders/mpsmatrixsolvelu.md)
- [MPSMatrixSolveTriangular](metalperformanceshaders/mpsmatrixsolvetriangular.md)
- [MPSMatrixUnaryKernel](metalperformanceshaders/mpsmatrixunarykernel.md)
- [MPSMatrixBinaryKernel](metalperformanceshaders/mpsmatrixbinarykernel.md)
- [MPSMatrixDecompositionStatus](metalperformanceshaders/mpsmatrixdecompositionstatus.md)
