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

Function Reindent

tensorflow/compiler/xla/util.cc:102–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102string Reindent(absl::string_view original,
103 const absl::string_view indentation) {
104 std::vector<string> pieces =
105 absl::StrSplit(absl::string_view(original.data(), original.size()), '\n');
106 return absl::StrJoin(pieces, "\n", [indentation](string* out, string s) {
107 absl::StrAppend(out, indentation, absl::StripAsciiWhitespace(s));
108 });
109}
110
111bool IsPermutation(absl::Span<const int64> permutation, int64 rank) {
112 if (rank != permutation.size()) {

Callers 1

TESTFunction · 0.85

Calls 4

string_viewClass · 0.85
StrAppendFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68