<!--
{
  "availability" : [
    "iOS: 18.5.0 -",
    "iPadOS: 18.5.0 -",
    "macCatalyst: 18.5.0 -",
    "macOS: 15.5.0 -",
    "tvOS: 18.5.0 -",
    "visionOS: 2.5.0 -",
    "watchOS: 11.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/SparseSolve(_:_:_:)-6pudz",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@SparseSolve#$@SA@SparseOpaqueSubfactor_Complex_Double#$@SA@DenseMatrix_Complex_Double#*v#"
  },
  "title" : "SparseSolve(_:_:_:)"
}
-->

# SparseSolve(_:_:_:)

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

```
func SparseSolve(_ Subfactor: SparseOpaqueSubfactor_Complex_Double, _ XB: DenseMatrix_Complex_Double, _ 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).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)