<!--
{
  "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(_:_:_:_:_:)-7hdp4",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@SparseSolve#$@SA@SparseIterativeMethod#$@SA@SparseMatrix_Complex_Double#$@SA@DenseVector_Complex_Double#S2_#$@EA@SparsePreconditioner_t#"
  },
  "title" : "SparseSolve(_:_:_:_:_:)"
}
-->

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

Solve `Ax=b` using the specified iterative method for complex double values.

```
func SparseSolve(_ method: SparseIterativeMethod, _ A: SparseMatrix_Complex_Double, _ b: DenseVector_Complex_Double, _ x: DenseVector_Complex_Double, _ Preconditioner: SparsePreconditioner_t) -> SparseIterativeStatus_t
```

## Parameters

`method`

(input) Iterative method specification, eg return value of
`SparseConjugateGradient()`.

`A`

(input) The matrix `A` to solve the system for. Only used for
multiplication by `A` or `A^T`.

`b`

The right-hand side b to solve for. If `A` has dimension `m x n`, then
`b` must have length `m`.

`x`

On entry, initial guess for solution, on return the solution. If `A`
has dimension `m x n`, then `x` must have length `n`. If no good initial
estimate is available, user should set the initial guess to be the
zero vector.

`Preconditioner`

Type of preconditioner to create and apply.

---

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)