跳到主要内容

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