将执行器绑定到目标CPU。
int HTL_thread_executor_set_cpubind(HTL_thread_executor_t executor, int cpuid);
HTL_thread_executor_set_cpubind()将执行器绑定到CPU ID上,CPU ID对应于处理器索引。
参数名 |
类型 |
描述 |
输入/输出 |
---|---|---|---|
executor |
HTL_thread_executor_t |
执行器句柄。 |
输入 |
cpuid |
int |
CPU ID。 |
输入 |
1 2 | new_cpuid = (cpuid + 1) % num_executors; ret = HTL_thread_executor_set_cpubind(executor, new_cpuid); |