---
title: operator==
description: "判断shape是否相等。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00180.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00180.html
indexId: 70ff252f564f05417cb21e9fa7c29b7f9b4a177027c692c5ad9338a695abd10a78
---
# operator==

#### 函数功能

判断shape是否相等。


#### 函数原型

```
bool operator==(const StorageShape &other) const
```


#### 参数说明

| 参数 | 输入/输出 | 说明 |
| --- | --- | --- |
| other | 输入 | 另一个shape。 |


#### 返回值说明

true：相等；false：不相等。


#### 约束说明

无。


#### 调用示例

```
StorageShape shape0({3, 256, 256}, {256, 256, 3});
StorageShape shape1({3, 256, 256}, {3, 256, 256});
bool is_same_shape = shape0 == shape1; // false
```
