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

Function DecrefCache

tensorflow/python/lib/core/ndarray_tensor_bridge.cc:37–40  ·  view source on GitHub ↗

Caches pointers to numpy arrays which need to be dereferenced.

Source from the content-addressed store, hash-verified

35
36// Caches pointers to numpy arrays which need to be dereferenced.
37static std::vector<void*>* DecrefCache() {
38 static std::vector<void*>* decref_cache = new std::vector<void*>;
39 return decref_cache;
40}
41
42// Destructor passed to TF_NewTensor when it reuses a numpy buffer. Stores a
43// pointer to the pyobj in a buffer to be dereferenced later when we're actually

Callers 2

DelayedNumpyDecrefFunction · 0.85
ClearDecrefCacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected