---
title: kupl_get_kernel_concurrency_local
description: "获取当前线程作为主线程去调用memcpy算子时支持的多线程并发度的值。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpckit/devg/KunpengHPCKit_developer_073.html
sourcePath: /source/zh/kunpenghpcs/hpckit/devg/KunpengHPCKit_developer_073.html
indexId: 78e338fab86f84e1a300a172033bfdea83aa8197d392cc31a2378d693bdaa8a367
---
# kupl_get_kernel_concurrency_local

获取当前线程作为主线程去调用memcpy算子时支持的多线程并发度的值。

#### 接口定义

int kupl_get_kernel_concurrency_local();


#### 返回值

- 返回当前线程的算子并发度的值
- 算子并发度值未设置时返回kupl_get_kernel_concurrency();


#### 示例

```
#include <stdio.h> 
#include "kupl.h" 

int main() 
{ 
    kupl_set_kernel_concurrency_local(2); 
    int num = kupl_get_kernel_concurrency_local();
    printf("local kupl kernel concurrency = %d\n", num); 
    return 0; 
}
```

运行结果如下。

```
local kupl kernel concurrency = 2
```

- 上述示例设置并打印了当前线程的算子并发度的值。
- 上述kupl_get_kernel_concurrency_local函数获取了当前线程的算子并发度。
