| 669 | |
| 670 | template <typename T> |
| 671 | StatusOr<ShapeTree<T>> ShapeTree<T>::SubShapeTree( |
| 672 | const ShapeIndex& index) const { |
| 673 | TF_ASSIGN_OR_RETURN(const Shape* sub_shape, |
| 674 | ShapeUtil::TryGetSubshape(shape(), index)); |
| 675 | ShapeTree<T> sub_shape_tree(*sub_shape); |
| 676 | sub_shape_tree.CopySubtreeFrom(*this, index, {}); |
| 677 | return std::move(sub_shape_tree); |
| 678 | } |
| 679 | |
| 680 | template <typename T> |
| 681 | bool ShapeTree<T>::operator==(const ShapeTree<T>& other) const { |
no test coverage detected