MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / AclGetClDevice

Function AclGetClDevice

src/c/cl/AclOpenClExt.cpp:88–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88extern "C" AclStatus AclGetClDevice(AclContext external_ctx, cl_device_id *opencl_device)
89{
90 using namespace arm_compute;
91 IContext *ctx = get_internal(external_ctx);
92
93 if (detail::validate_internal_context(ctx) != StatusCode::Success)
94 {
95 return AclStatus::AclInvalidArgument;
96 }
97
98 if (ctx->type() != Target::GpuOcl)
99 {
100 return AclStatus::AclInvalidTarget;
101 }
102
103 if (opencl_device == nullptr)
104 {
105 return AclStatus::AclInvalidArgument;
106 }
107
108 *opencl_device = utils::cast::polymorphic_downcast<arm_compute::gpu::opencl::ClContext *>(ctx)->cl_dev().get();
109
110 return AclStatus::AclSuccess;
111}
112
113extern "C" AclStatus AclGetClQueue(AclQueue external_queue, cl_command_queue *opencl_queue)
114{

Callers 1

TEST_CASEFunction · 0.85

Calls 5

cl_devMethod · 0.80
get_internalFunction · 0.50
typeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected