static */
| 299 | } |
| 300 | |
| 301 | /* static */ void ShapeUtil::UpdateDynamicDimension(Shape* shape, |
| 302 | ShapeIndexView index, |
| 303 | int64 dim, |
| 304 | bool is_dynamic) { |
| 305 | if (index.empty()) { |
| 306 | CHECK(!shape->IsTuple()); |
| 307 | shape->set_dynamic_dimension(dim, is_dynamic); |
| 308 | return; |
| 309 | } |
| 310 | |
| 311 | UpdateDynamicDimension(shape->mutable_tuple_shapes(index.front()), |
| 312 | index.ConsumeFront(), dim, is_dynamic); |
| 313 | } |
| 314 | |
| 315 | /* static */ void ShapeUtil::AppendMajorDimension(int bound, Shape* shape) { |
| 316 | CHECK(LayoutUtil::IsDenseArray(*shape)); |
nothing calls this directly
no test coverage detected