<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BLASSetThreading(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@BLASSetThreading"
  },
  "title" : "BLASSetThreading(_:)"
}
-->

# BLASSetThreading(_:)

Sets the BLAS and LAPACK threading model.

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

## Parameters

`threading`

A constant that specifies the threading model.

## Return Value

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

## 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.

---

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)