---
title: aclmdlGetInputIndexByName
description: "根据模型中的输入名称获取对应输入的索引编号。同步接口。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/aadgc/aclcppdevg_03_1760.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/aadgc/aclcppdevg_03_1760.html
indexId: b0821d401b8283c17109024ffeb01a7c1dc3c5947886f29d2a521007bdffdb9b105
---
# aclmdlGetInputIndexByName

#### 函数功能

根据模型中的输入名称获取对应输入的索引编号。同步接口。


#### 函数原型

aclError aclmdlGetInputIndexByName(const aclmdlDesc *modelDesc, const char *name, size_t *index)


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| modelDesc | 输入 | aclmdlDesc类型的指针。 需提前调用aclmdlCreateDesc接口创建aclmdlDesc类型的数据。 |
| name | 输入 | 输入名称的指针。 |
| index | 输出 | 输入的索引编号的指针。 |


#### 返回值说明

返回0表示成功，返回非0表示失败。
