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

Method Release

tensorflow/lite/delegates/gpu/cl/gl_interop.cc:147–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147Status AcquiredGlObjects::Release(const std::vector<cl_event>& wait_events,
148 CLEvent* release_event) {
149 if (queue_ && !memory_.empty()) {
150 cl_event new_event;
151 cl_int error_code = clEnqueueReleaseGLObjects(
152 queue_, memory_.size(), memory_.data(), wait_events.size(),
153 wait_events.data(), release_event ? &new_event : nullptr);
154 if (error_code != CL_SUCCESS) {
155 return InternalError(absl::StrCat("Unable to release GL object. ",
156 CLErrorCodeToString(error_code)));
157 }
158 if (release_event) {
159 *release_event = CLEvent(new_event);
160 }
161 clFlush(queue_);
162 queue_ = nullptr;
163 }
164 return OkStatus();
165}
166
167GlInteropFabric::GlInteropFabric(EGLDisplay egl_display,
168 Environment* environment)

Callers 1

FinishMethod · 0.45

Calls 8

CLErrorCodeToStringFunction · 0.85
CLEventClass · 0.85
OkStatusFunction · 0.85
InternalErrorFunction · 0.50
StrCatFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected