---
title: GetInDataNodesAndPortIndexs
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/atlasgeapi_07_0039.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/atlasgeapi_07_0039.html
indexId: 388cc8ac622daa5d4db744b74e2fd36c03b12bdcac89c374142f95ed5c8c609972
---
# GetInDataNodesAndPortIndexs

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |


#### 头文件/库文件

- 头文件：#include <graph/gnode.h>
- 库文件：libgraph.so


#### 功能说明

获取算子指定输入端口对应的对端算子以及对端算子的输出端口号。


#### 函数原型

```
std::pair<GNodePtr, int32_t> GetInDataNodesAndPortIndexs(const int32_t index) const
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| index | 输入 | 算子的输入端口号。 |


#### 返回值说明

| 参数名 | 类型 | 说明 |
| --- | --- | --- |
| \- | std::pair<GNodePtr, int32\_t > | 对端输入算子以及对端输入算子的输出端口号，空表示没有对端算子。 |


#### 约束说明

无
