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

Function IndentAllButFirstLine

tensorflow/compiler/jit/node_matchers.cc:36–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34using impl::OutEdge;
35
36string IndentAllButFirstLine(absl::string_view text) {
37 std::vector<std::string> lines = absl::StrSplit(text, '\n');
38 for (int i = 1; i < lines.size(); i++) {
39 lines[i].insert(0, " ");
40 }
41 return absl::StrJoin(lines, "\n");
42}
43
44template <typename T>
45bool CompareTensor(const Tensor& actual, const Tensor& expected,

Callers 1

DescribeToMethod · 0.85

Calls 2

sizeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected