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

Function CreateCLGLContext

tensorflow/lite/delegates/gpu/cl/cl_context.cc:103–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103Status CreateCLGLContext(const CLDevice& device,
104 cl_context_properties egl_context,
105 cl_context_properties egl_display, CLContext* result) {
106 if (!device.SupportsExtension("cl_khr_gl_sharing")) {
107 return UnavailableError("Device doesn't support CL-GL sharing.");
108 }
109 cl_context_properties platform =
110 reinterpret_cast<cl_context_properties>(device.platform());
111 cl_context_properties props[] = {CL_GL_CONTEXT_KHR,
112 egl_context,
113 CL_EGL_DISPLAY_KHR,
114 egl_display,
115 CL_CONTEXT_PLATFORM,
116 platform,
117 0};
118 return CreateCLContext(device, props, result);
119}
120
121} // namespace cl
122} // namespace gpu

Callers 1

CreateEnvironmentFunction · 0.85

Calls 4

CreateCLContextFunction · 0.85
SupportsExtensionMethod · 0.80
UnavailableErrorFunction · 0.50
platformMethod · 0.45

Tested by

no test coverage detected