---
title: kpccl_get_kernel_concurrency
description: "获取设置的全局算子并发度的值。"
url: https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop2400/KunoengHPCKit_developer_047.html
sourcePath: /source/zh/hpchistory/hpckit/develop2400/KunoengHPCKit_developer_047.html
indexId: 1a6c87fe0fe38036b1e219c10e2f21751b90c6582fb5aee377e4c07740bda58073
---
# kpccl_get_kernel_concurrency

获取设置的全局算子并发度的值。

#### 接口定义

int kpccl_get_kernel_concurrency();


#### 返回值

返回全局的算子并发度的值

该值未设置时返回kpccl_get_num_executors();


#### 示例

```
#include <stdio.h>
#include "kpccl.h"
int main()
{
kpccl_set_kernel_concurrency(2);
int num =
kpccl_get_kernel_concurrency
();
printf("kpccl kernel concurrency = %d\n", num);
return 0;
}
```

运行结果如下。

```
kpccl kernel concurrency = 2
```

上述示例设置并打印了全局算子并发度的值；上述kpccl_get_kernel_concurrency函数获取了当前的全局算子并发度。
