---
title: maxIterations
framework: accelerate
role: symbol
role_heading: Instance Property
path: accelerate/sparselsmroptions/maxiterations
---

# maxIterations

The maximum number of iterations.

## Declaration

```swift
var maxIterations: Int32
```

## Discussion

Discussion If maxIterations is less than 0, the operation uses a default value of 4n. However, if a good preconditioner is available or the matrix is well-conditioned such that singular values cluster, a value of n/2 may be more appropriate.

## See Also

### Inspecting LSMR Options

- [atol](accelerate/sparselsmroptions/atol.md)
- [btol](accelerate/sparselsmroptions/btol.md)
- [conditionLimit](accelerate/sparselsmroptions/conditionlimit.md)
- [convergenceTest](accelerate/sparselsmroptions/convergencetest.md)
- [SparseLSMRConvergenceTest_t](accelerate/sparselsmrconvergencetest_t.md)
- [lambda](accelerate/sparselsmroptions/lambda.md)
- [nvec](accelerate/sparselsmroptions/nvec.md)
- [reportError](accelerate/sparselsmroptions/reporterror.md)
- [reportStatus](accelerate/sparselsmroptions/reportstatus.md)
- [rtol](accelerate/sparselsmroptions/rtol.md)
