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

Function AllocatorAttributesToString

tensorflow/core/framework/function.cc:1587–1601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1585}
1586
1587string AllocatorAttributesToString(
1588 const std::vector<AllocatorAttributes>& attrs) {
1589 string result("[");
1590 // AllocatorAttribute::DebugString produces around 85 bytes now.
1591 result.reserve(100 * attrs.size());
1592 for (const AllocatorAttributes& attr : attrs) {
1593 result.append(attr.DebugString());
1594 result.append(", ");
1595 }
1596 if (!attrs.empty()) {
1597 result.resize(result.size() - 2);
1598 }
1599 result.append("]");
1600 return result;
1601}
1602
1603const char* IsSet(void* ptr) { return ptr == nullptr ? "unset" : "set"; }
1604

Callers 1

DebugStringMethod · 0.85

Calls 6

reserveMethod · 0.45
sizeMethod · 0.45
appendMethod · 0.45
DebugStringMethod · 0.45
emptyMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected