static */
| 647 | } |
| 648 | |
| 649 | /* static */ int64 ShapeUtil::ByteSizeOfElements(const Shape& shape) { |
| 650 | TF_DCHECK_OK(ValidateShape(shape)); |
| 651 | CHECK(shape.IsArray()); |
| 652 | int64 allocated_element_count; |
| 653 | |
| 654 | CHECK(LayoutUtil::IsDenseArray(shape)) << shape.ShortDebugString(); |
| 655 | allocated_element_count = ElementsIn(shape); |
| 656 | return allocated_element_count * |
| 657 | ByteSizeOfPrimitiveType(shape.element_type()); |
| 658 | } |
| 659 | |
| 660 | /* static */ Status ShapeUtil::ValidateShapeWithOptionalLayoutInternal( |
| 661 | const Shape& shape) { |
nothing calls this directly
no test coverage detected