---
title: HTL_create_randws_numa_resource
description: "创建randws_numa资源。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2300/accel/kunpengaccel_ksl_16_0145.html
sourcePath: /source/zh/kunpengboostkithistory/2300/accel/kunpengaccel_ksl_16_0145.html
indexId: 7fad39b1d861d21d0b829ce48f37df6be323d14812b50251a501399c3834b71274
---
# HTL_create_randws_numa_resource

创建randws_numa资源。

#### 接口定义

int HTL_create_randws_numa_resource(int num_executors);


#### 描述

HTL_create_randws_numa_resource()用于创建randws_numa资源，通过num_executors设置执行器数量，执行器采用随机NUMA调度器。

调用该函数前，需执行HTL初始化函数HTL_initialize_library()。


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| num\_executors | int | 执行器数量。 | 输入 |


#### 返回值

- HTL_THREAD_SUCCESS：成功。
- 其他：失败。见错误码定义。


#### 示例

```
HTL_initialize_library();
int num_xstreams = 4;
int ret = HTL_create_randws_numa_resource(num_executors);
```
