---
title: 简介
description: "该类描述了tensor的shape，包含两个信息：origin_shape以及storage_shape。其中，origin_shape表示tensor的shape数学描述，storage_shape表示origin_shape实际运行时的shape格式。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00174.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00174.html
indexId: a98ef1fee07b6b2ad5fdda2ac4550daade9bfeb38aefe2199c328a771bf389e578
---
# 简介

该类描述了tensor的shape，包含两个信息：origin_shape以及storage_shape。其中，origin_shape表示tensor的shape数学描述，storage_shape表示origin_shape实际运行时的shape格式。

#### 需要包含的头文件

```
#include <storage_shape.h>
```


#### Public成员函数

```
StorageShape
()
StorageShape
(const std::initializer_list<int64_t> &origin_shape, const std::initializer_list<int64_t> &storage_shape)
const
Shape
&
GetOriginShape
() const
const
Shape
&
GetStorageShape
() const
Shape
&
MutableOriginShape
()
Shape
&
MutableStorageShape
()
bool
operator==
(const
StorageShape
&other) const
bool
operator!=
(const
StorageShape
&other) const
```
