HcommThreadFree
产品支持情况
产品 |
是否支持 |
|---|---|
Atlas 350 加速卡 |
√ |
☓ |
|
☓ |
|
☓ |
|
☓ |
|
☓ |
功能说明
使用HcommThreadAlloc接口申请的thread需要通过本接口进行释放。
函数原型
1 | HcclResult HcommThreadFree(const ThreadHandle* threads, uint32_t threadNum) |
参数说明
参数名 |
输入/输出 |
说明 |
|---|---|---|
threads |
输入 |
通信线程句柄 ThreadHandle类型的定义可参见ThreadHandle。 |
threadNum |
输入 |
通信线程数量。 |
返回值
HcclResult:接口成功返回HCCL_SUCCESS,其他失败。
约束说明
只能释放HcommThreadAlloc接口申请的thread。
调用示例
1 2 3 | ThreadHandle thread[2]; HcclResult ret = HcommThreadAlloc(COMM_ENGINE_AICPU_TS, 2, 3, thread); HcclResult ret = HcommThreadFree(thread, 2); |
父主题: 基础资源管理