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

# SparseSolve(_:_:_:)

Solve the equation Subfactor * X = B for the matrix X of complex float values in place.

## Declaration

```swift
func SparseSolve(_ Subfactor: SparseOpaqueSubfactor_Complex_Float, _ XB: DenseMatrix_Complex_Float, _ workspace: UnsafeMutableRawPointer)
```

## Parameters

- `Subfactor`: (Input) The subfactor to solve a system involving, as returned by SparseCreateSubfactor().
- `XB`: (Input/Output) On input, the matrix B. On return it is overwritten with the matrix X. If Subfactor is m x n, then XB must have dimension k x nrhs, where k = max(m, n) and nrhs is the number of right-hand sides. If m != n, then only the first min(m,n) entries are used for input or output as approriate.
- `workspace`: (Scratch) A workspace of size Subfactor.workspaceRequiredStatic + nrhs * Subfactor.workspaceRequiredPerRHS * 2. This memory must be 16-byte aligned (any allocation returned by malloc() has this property).

## See Also

### Complex matrix solving functions

- [SparseSolve(_:_:)](accelerate/sparsesolve(_:_:)-31yj7.md)
- [SparseSolve(_:_:)](accelerate/sparsesolve(_:_:)-3x0vj.md)
- [SparseSolve(_:_:)](accelerate/sparsesolve(_:_:)-4j17a.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-2rk1c.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-34okt.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-48njk.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-6pudz.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-7krer.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-7qdpl.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-8ikjb.md)
- [SparseSolve(_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:)-5xn6p.md)
- [SparseSolve(_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:)-6demt.md)
- [SparseSolve(_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:)-6od6k.md)
- [SparseSolve(_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:)-7mtyx.md)
