---
title: HTL_create_randws_numa_resource
description: "创建randws_numa资源。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengaccel/system-lib/htl/kunpengaccel_ksl_16_0145.html
sourcePath: /source/zh/kunpengaccel/system-lib/htl/kunpengaccel_ksl_16_0145.html
indexId: 9c38f065825033d384256a0f2b1b70572ea380ce6a2701fcae6812823862986368
---
# 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);
```
