50 if(opencl_context ==
nullptr)
55 *opencl_context = utils::cast::polymorphic_downcast<arm_compute::gpu::opencl::ClContext *>(ctx)->cl_ctx().get();
80 auto cl_ctx = utils::cast::polymorphic_downcast<arm_compute::gpu::opencl::ClContext *>(ctx);
81 if(!cl_ctx->set_cl_ctx(::cl::Context(opencl_context)))
104 if(opencl_device ==
nullptr)
109 *opencl_device = utils::cast::polymorphic_downcast<arm_compute::gpu::opencl::ClContext *>(ctx)->cl_dev().get();
129 if(opencl_queue ==
nullptr)
134 *opencl_queue = utils::cast::polymorphic_downcast<arm_compute::gpu::opencl::ClQueue *>(queue)->cl_queue().get();
154 auto cl_queue = utils::cast::polymorphic_downcast<arm_compute::gpu::opencl::ClQueue *>(queue);
155 if(!cl_queue->set_cl_queue(::cl::CommandQueue(opencl_queue)))
178 if(opencl_mem ==
nullptr)
183 auto cl_tensor = utils::cast::polymorphic_downcast<arm_compute::ICLTensor *>(tensor->
tensor());
184 *opencl_mem = cl_tensor->cl_buffer().get();
Base class specifying the queue interface.
Call failed during execution.
AclStatus AclGetClMem(AclTensor external_tensor, cl_mem *opencl_mem)
Extract the underlying OpenCL memory object by a given Compute Library tensor object.
Base class specifying the tensor interface.
arm_compute::detail::Header header
Call failed as invalid argument was passed.
StatusCode validate_internal_context(const IContext *ctx)
Check if an internal context is valid.
StatusCode validate_internal_tensor(const ITensorV2 *tensor)
Check if an internal tensor is valid.
Copyright (c) 2017-2021 Arm Limited.
AclStatus AclSetClQueue(AclQueue external_queue, cl_command_queue opencl_queue)
Set the underlying OpenCL queue to be used by a given Compute Library queue object.
Call failed as invalid argument was passed.
arm_compute::detail::Header header
AclStatus AclSetClContext(AclContext external_ctx, cl_context opencl_context)
Set the underlying OpenCL context to be used by a given Compute Library context object.
StatusCode validate_internal_queue(const IQueue *queue)
Check if an internal queue is valid.
int refcount() const
Reference counter accessor.
Call failed as configuration is unsupported.
AclStatus AclGetClQueue(AclQueue external_queue, cl_command_queue *opencl_queue)
Extract the underlying OpenCL queue used by a given Compute Library queue object.
Call succeeded, leading to valid state for all involved objects/data.
AclStatus AclGetClContext(AclContext external_ctx, cl_context *opencl_context)
Extract the underlying OpenCL context used by a given Compute Library context object.
Target type() const
Target type accessor.
AclStatus AclGetClDevice(AclContext external_ctx, cl_device_id *opencl_device)
Extract the underlying OpenCL device id used by a given Compute Library context object.
virtual arm_compute::ITensor * tensor() const =0
Get the legacy tensor object.
IContext * get_internal(AclContext ctx)
Extract internal representation of a Context.