---
title: BlasGetNumThreads
description: "获取运行时的线程数。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/240RC2/accel/kunpengaccel_kml_16_0195.html
sourcePath: /source/zh/kunpengboostkithistory/240RC2/accel/kunpengaccel_kml_16_0195.html
indexId: 39034795d6131ccdb2035b5ae70c4b066dbb46e4a2ebc70dae20789d104309c676
---
# BlasGetNumThreads

获取运行时的线程数。

#### 接口定义

int BlasGetNumThreads(void)


#### 返回值

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


#### 依赖

#include "kblas.h"


#### 示例

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