kupl_get_kernel_concurrency_local
获取设置的当前线程的算子并发度的值。
接口定义
int kupl_get_kernel_concurrency_local();
返回值
- 返回当前线程的算子并发度的值
- 算子并发度值未设置时返回kupl_get_kernel_concurrency();
示例
1 2 3 4 5 6 7 8 9 10 | #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函数获取了当前线程的算子并发度。
父主题: 内存管理函数