---
title: GetOutputShape
description: "根据算子输出索引获取对应的输出shape指针。这里的输出索引是指算子实例化后实际的索引，不是原型定义中的索引。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00232.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00232.html
indexId: dfa98ed7a64b8c76b07198353621a9bb3c43372dda23cc9551790ec37355db7178
---
# GetOutputShape

#### 函数功能

根据算子输出索引获取对应的输出shape指针。这里的输出索引是指算子实例化后实际的索引，不是原型定义中的索引。


#### 函数原型

const StorageShape *GetOutputShape(size_t index) const


#### 参数说明

| 参数 | 输入/输出 | 说明 |
| --- | --- | --- |
| index | 输入 | 算子输出索引，从0开始计数。 |


#### 返回值说明

指定的输出shape指针，index非法时，返回空指针。

关于StorageShape类型的定义，请参见StorageShape。


#### 约束说明

无。


#### 调用示例

```
ge::graphStatus Tiling4ConcatD(TilingContext* context) {
auto out_shape = context->GetOutputShape(0);
}
```
