跳到主要内容

operator==

函数功能​

判断格式是否相等。

函数原型​

bool operator==(const StorageFormat &other) const

参数说明​

参数输入/输出说明
other输入另一种格式。

返回值​

true代表相等。

false代表不等。

约束说明​

无

调用示例​

ExpandDimsType dim_type("1100");
StorageFormat format(ge::Format::FORMAT_NCHW, ge::Format::FORMAT_C1HWNC0, dim_type);
StorageFormat another_format(ge::Format::FORMAT_NCHW, ge::Format::FORMAT_NC, dim_type);
bool is_same_fmt = format == another_format; // false