---
title: "BLASSetThreading(_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/blassetthreading(_:)"
---

# BLASSetThreading(_:)

Sets the BLAS and LAPACK threading model.

## Declaration

```swift
func BLASSetThreading(_ threading: BLAS_THREADING) -> Int32
```

## Parameters

- `threading`: A constant that specifies the threading model.

## Return Value

Return Value 0 on success or -1 if the current platform doesn’t support the threading model.

## Discussion

Discussion This function sets the threading model for subsequent calls into BLAS and LAPACK. This setting is per thread, and Accelerate saves it in a thread-local variable.

## See Also

### Specifying the threading model

- [BLAS](accelerate/blas.md)
- [BLASGetThreading()](accelerate/blasgetthreading().md)
- [BLAS_THREADING](accelerate/blas_threading.md)
