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

Function PrintMemory

tensorflow/core/util/util.cc:88–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86static char hex_char[] = "0123456789abcdef";
87
88string PrintMemory(const char* ptr, size_t n) {
89 string ret;
90 ret.resize(n * 3);
91 for (int i = 0; i < n; ++i) {
92 ret[i * 3] = ' ';
93 ret[i * 3 + 1] = hex_char[ptr[i] >> 4];
94 ret[i * 3 + 2] = hex_char[ptr[i] & 0xf];
95 }
96 return ret;
97}
98
99string SliceDebugString(const TensorShape& shape, const int64 flat) {
100 // Special case rank 0 and 1

Callers 1

MemoryDebugStringMethod · 0.85

Calls 1

resizeMethod · 0.45

Tested by

no test coverage detected