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

Function STLDeleteElements

tensorflow/core/lib/gtl/stl_util.h:109–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107// If container is NULL, this function is a no-op.
108template <typename T>
109void STLDeleteElements(T* container) {
110 if (!container) return;
111 auto it = container->begin();
112 while (it != container->end()) {
113 auto temp = it;
114 ++it;
115 delete *temp;
116 }
117 container->clear();
118}
119
120// Given an STL container consisting of (key, value) pairs, STLDeleteValues
121// deletes all the "value" components and clears the container. Does nothing in

Callers 8

ResetInputsMethod · 0.85
ResetMethod · 0.85
~DeviceBaseMethod · 0.85
TestOnlyResetMethod · 0.85
TESTFunction · 0.85
ComputeMethod · 0.85
~OpsTestBaseMethod · 0.85
RunOpKernelMethod · 0.85

Calls 3

beginMethod · 0.45
endMethod · 0.45
clearMethod · 0.45

Tested by 6

ResetInputsMethod · 0.68
ResetMethod · 0.68
TestOnlyResetMethod · 0.68
TESTFunction · 0.68
~OpsTestBaseMethod · 0.68
RunOpKernelMethod · 0.68