| 86 | } |
| 87 | |
| 88 | extern "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 | |
| 113 | extern "C" AclStatus AclGetClQueue(AclQueue external_queue, cl_command_queue *opencl_queue) |
| 114 | { |
no test coverage detected