| 169 | } |
| 170 | |
| 171 | inline bool IdentityImpliesEqualityNansNotEqual(const DataType& type) { |
| 172 | if (type.id() == Type::FLOAT || type.id() == Type::DOUBLE || |
| 173 | type.id() == Type::HALF_FLOAT) { |
| 174 | return false; |
| 175 | } |
| 176 | for (const auto& child : type.fields()) { |
| 177 | if (!IdentityImpliesEqualityNansNotEqual(*child->type())) { |
| 178 | return false; |
| 179 | } |
| 180 | } |
| 181 | return true; |
| 182 | } |
| 183 | |
| 184 | inline bool IdentityImpliesEquality(const DataType& type, const EqualOptions& options) { |
| 185 | if (options.nans_equal()) { |
no test coverage detected