| 633 | template <typename T> |
| 634 | template <typename Fn> |
| 635 | void ShapeTree<T>::ForEachMutableElement(const Fn& func) { |
| 636 | return ForEachMutableHelper( |
| 637 | [&func](const ShapeIndex& index, T* data) { |
| 638 | func(index, data); |
| 639 | return Status::OK(); |
| 640 | }, |
| 641 | &nodes_) |
| 642 | .IgnoreError(); |
| 643 | } |
| 644 | |
| 645 | template <typename T> |
| 646 | void ShapeTree<T>::CopySubtreeFrom(const ShapeTree<T>& other, |