<!--
{
  "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(_:_:_:_:_:)-155od",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@SparseSolve#$@SA@SparseIterativeMethod#$@SA@SparseMatrix_Complex_Float#$@SA@DenseMatrix_Complex_Float#S2_#$@SA@SparseOpaquePreconditioner_Complex_Float#"
  },
  "title" : "SparseSolve(_:_:_:_:_:)"
}
-->

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

Solve `AX=B` using the specified iterative method for complex float values.

```
func SparseSolve(_ method: SparseIterativeMethod, _ A: SparseMatrix_Complex_Float, _ B: DenseMatrix_Complex_Float, _ X: DenseMatrix_Complex_Float, _ Preconditioner: SparseOpaquePreconditioner_Complex_Float) -> 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 sides `B` to solve for. If `A` has dimension `m x n`, then
`B` must have dimension `m x nrhs`, where nrhs is the number of
right-hand sides to find solutions for.

`X`

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

`Preconditioner`

The preconditioner to 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)