---
title: "SparseCreatePreconditioner(_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/sparsecreatepreconditioner(_:_:)-59ql5"
---

# SparseCreatePreconditioner(_:_:)

Creates a preconditioner for the specified matrix of single-precision values.

## Declaration

```swift
func SparseCreatePreconditioner(_ type: SparsePreconditioner_t, _ A: SparseMatrix_Float) -> SparseOpaquePreconditioner_Float
```

## Parameters

- `type`: The type of preconditioner to create.
- `A`: The matrix to construct a preconditioner for.

## Return Value

Return Value A SparseOpaquePreconditioner_Float structure.  You must free the resource through a call to SparseCleanup(_:) after you finish with the object.

## See Also

### Creating preconditioners

- [SparseCreatePreconditioner(_:_:)](accelerate/sparsecreatepreconditioner(_:_:)-4ysww.md)
- [SparseOpaquePreconditioner_Double](accelerate/sparseopaquepreconditioner_double.md)
- [SparseOpaquePreconditioner_Float](accelerate/sparseopaquepreconditioner_float.md)
- [SparseCreatePreconditioner(_:_:)](accelerate/sparsecreatepreconditioner(_:_:)-1yp4n.md)
- [SparseCreatePreconditioner(_:_:)](accelerate/sparsecreatepreconditioner(_:_:)-95u9p.md)
