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

Function ToString

tensorflow/core/distributed_runtime/rpc/grpc_util_test.cc:24–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23namespace {
24string ToString(const grpc::ByteBuffer& buf) {
25 std::vector<grpc::Slice> slices;
26 CHECK(buf.Dump(&slices).ok());
27 string result;
28 for (const grpc::Slice& s : slices) {
29 result.append(reinterpret_cast<const char*>(s.begin()), s.size());
30 }
31 return result;
32}
33
34// Return a ByteBuffer that contains str split up into num_slices slices.
35grpc::ByteBuffer MakeBuffer(const string& str, int num_slices) {

Callers 1

TESTFunction · 0.70

Calls 5

okMethod · 0.45
DumpMethod · 0.45
appendMethod · 0.45
beginMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected