| 970 | std::vector<string>* pieces); |
| 971 | |
| 972 | void TupleToStringHelper(const LiteralBase& literal, |
| 973 | const ShapeIndex& shape_index, bool print_shape, |
| 974 | bool print_layout, std::vector<string>* pieces) { |
| 975 | const Shape& subshape = ShapeUtil::GetSubshape(literal.shape(), shape_index); |
| 976 | pieces->push_back("(\n"); |
| 977 | std::vector<string> tuple_pieces; |
| 978 | for (int i = 0; i < ShapeUtil::TupleElementCount(subshape); ++i) { |
| 979 | ShapeIndex element_index = shape_index; |
| 980 | element_index.push_back(i); |
| 981 | std::vector<string> element_pieces; |
| 982 | ToStringHelper(literal, element_index, print_shape, print_layout, |
| 983 | &element_pieces); |
| 984 | tuple_pieces.push_back(absl::StrJoin(element_pieces, "")); |
| 985 | } |
| 986 | pieces->push_back(absl::StrJoin(tuple_pieces, ",\n")); |
| 987 | pieces->push_back("\n)"); |
| 988 | } |
| 989 | |
| 990 | void DenseArrayToStringHelper(const LiteralBase& literal, |
| 991 | const ShapeIndex& shape_index, bool print_shape, |
no test coverage detected