MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / PrintDimSpacing

Function PrintDimSpacing

tensorflow/core/framework/tensor.cc:1111–1122  ·  view source on GitHub ↗

Appends the spacing between elements for a given dim onto a result string

Source from the content-addressed store, hash-verified

1109
1110// Appends the spacing between elements for a given dim onto a result string
1111void PrintDimSpacing(int dim_index, int num_dims, string* result) {
1112 if (dim_index == num_dims - 1) {
1113 strings::StrAppend(result, " ");
1114 return;
1115 }
1116 for (int j = 0; j < num_dims - dim_index - 1; j++) {
1117 strings::StrAppend(result, "\n");
1118 }
1119 for (int j = 0; j <= dim_index; j++) {
1120 strings::StrAppend(result, " ");
1121 }
1122}
1123
1124// Print from left dim to right dim recursively.
1125template <typename T>

Callers 1

PrintOneDimV2Function · 0.85

Calls 1

StrAppendFunction · 0.50

Tested by

no test coverage detected