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

Function CreateCLContext

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

Source from the content-addressed store, hash-verified

44}
45
46Status CreateCLContext(const CLDevice& device,
47 cl_context_properties* properties, CLContext* result) {
48 int error_code;
49 cl_device_id device_id = device.id();
50 cl_context context =
51 clCreateContext(properties, 1, &device_id, nullptr, nullptr, &error_code);
52 if (!context) {
53 return UnknownError(absl::StrCat("Failed to create a compute context - ",
54 CLErrorCodeToString(error_code)));
55 }
56
57 *result = CLContext(context);
58 return OkStatus();
59}
60
61} // namespace
62

Callers 2

CreateCLGLContextFunction · 0.85
CreateEnvironmentFunction · 0.85

Calls 6

CLErrorCodeToStringFunction · 0.85
CLContextClass · 0.85
OkStatusFunction · 0.85
UnknownErrorFunction · 0.50
StrCatFunction · 0.50
idMethod · 0.45

Tested by

no test coverage detected