---
title: "SparseSolve(_:_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/sparsesolve(_:_:_:_:)-1hhdi"
---

# SparseSolve(_:_:_:_:)

Solves the equation Subfactor * X = B for the matrix of single-precision values X, without any internal memory allocations.

## Declaration

```swift
func SparseSolve(_ Subfactor: SparseOpaqueSubfactor_Float, _ B: DenseMatrix_Float, _ X: DenseMatrix_Float, _ workspace: UnsafeMutableRawPointer)
```

## Parameters

- `Subfactor`: The Subfactor in Subfactor * X = B that doc://com.apple.accelerate/documentation/Accelerate/SparseCreateSubfactor(_:_:)-4renf returns.
- `B`: The matrix B.
- `X`: The matrix X.
- `workspace`: A workspace of size workspaceRequiredStatic + nrhs * workspaceRequiredPerRHS where nrhs is the number of right-hand-side vectors.

## See Also

### Matrix-solving functions with user-defined workspace

- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-8k0w9.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-9kp2g.md)
- [SparseSolve(_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:)-90z8f.md)
