| 621 | template <typename T> |
| 622 | template <typename Fn> |
| 623 | void ShapeTree<T>::ForEachElement(const Fn& func) const { |
| 624 | return ForEachHelper( |
| 625 | [&func](const ShapeIndex& index, const T& data) { |
| 626 | func(index, data); |
| 627 | return Status::OK(); |
| 628 | }, |
| 629 | nodes_) |
| 630 | .IgnoreError(); |
| 631 | } |
| 632 | |
| 633 | template <typename T> |
| 634 | template <typename Fn> |