---
title: BlasGetNumThreads
description: "获取运行时的线程数。"
url: https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop2400/kunpengaccel_kml_0635.html
sourcePath: /source/zh/hpchistory/hpckit/develop2400/kunpengaccel_kml_0635.html
indexId: 60f42fb2f5f1b2f410e7d7ff5106ef8bfac75e8d479c982a41b349d2c630b0d767
---
# BlasGetNumThreads

获取运行时的线程数。

#### 接口定义

int BlasGetNumThreads(void)


#### 返回值

返回运行时的线程数，最大值为CPU核数。


#### 依赖

#include "kblas.h"


#### 示例

```
int nthreads = BlasGetNumThreads(); // 获取运行时的线程数
```
