Returns true and captures the shape iff it matches the pattern.
| 954 | |
| 955 | // Returns true and captures the shape iff it matches the pattern. |
| 956 | bool Match(const ::xla::Shape* shape, MatchOption option) const { |
| 957 | if (impl_.Match(shape, option)) { |
| 958 | if (option.capture && matched_shape_) { |
| 959 | *matched_shape_ = shape; |
| 960 | } |
| 961 | return true; |
| 962 | } |
| 963 | if (shape) { |
| 964 | EXPLAIN << "\nin " |
| 965 | << (shape->has_layout() ? ShapeUtil::HumanStringWithLayout(*shape) |
| 966 | : ShapeUtil::HumanString(*shape)); |
| 967 | } |
| 968 | return false; |
| 969 | } |
| 970 | |
| 971 | // Returns true and captures the shape iff it matches the pattern. |
| 972 | bool Match(::xla::Shape* shape, MatchOption option) const { |
nothing calls this directly
no test coverage detected