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

Function DecrementUsageCounter

tensorflow/lite/kernels/eigen_support.cc:162–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void DecrementUsageCounter(TfLiteContext* context) {
163 auto* ptr = GetEigenContext(context);
164 if (ptr == nullptr) {
165 TF_LITE_FATAL(
166 "Call to DecrementUsageCounter() not preceded by "
167 "IncrementUsageCounter()");
168 }
169 if (--ptr->num_references == 0) {
170 delete ptr;
171 context->SetExternalContext(context, kTfLiteEigenContext, nullptr);
172 }
173}
174
175const Eigen::ThreadPoolDevice* GetThreadPoolDevice(TfLiteContext* context) {
176 auto* ptr = GetEigenContext(context);

Callers 3

FreeFunction · 0.85
TESTFunction · 0.85
FreeFunction · 0.85

Calls 2

GetEigenContextFunction · 0.85
SetExternalContextMethod · 0.45

Tested by 1

TESTFunction · 0.68