24.02.1
|
Go to the documentation of this file.
49 if (opencl_context ==
nullptr)
54 *opencl_context = utils::cast::polymorphic_downcast<arm_compute::gpu::opencl::ClContext *>(ctx)->cl_ctx().get();
79 auto cl_ctx = utils::cast::polymorphic_downcast<arm_compute::gpu::opencl::ClContext *>(ctx);
80 if (!cl_ctx->set_cl_ctx(::cl::Context(opencl_context)))
103 if (opencl_device ==
nullptr)
108 *opencl_device = utils::cast::polymorphic_downcast<arm_compute::gpu::opencl::ClContext *>(ctx)->cl_dev().get();
128 if (opencl_queue ==
nullptr)
133 *opencl_queue = utils::cast::polymorphic_downcast<arm_compute::gpu::opencl::ClQueue *>(queue)->cl_queue().get();
153 auto cl_queue = utils::cast::polymorphic_downcast<arm_compute::gpu::opencl::ClQueue *>(queue);
154 if (!cl_queue->set_cl_queue(::cl::CommandQueue(opencl_queue)))
177 if (opencl_mem ==
nullptr)
182 auto cl_tensor = utils::cast::polymorphic_downcast<arm_compute::ICLTensor *>(
tensor->tensor());
183 *opencl_mem = cl_tensor->cl_buffer().get();
AclStatus AclGetClDevice(AclContext external_ctx, cl_device_id *opencl_device)
Extract the underlying OpenCL device id used by a given Compute Library context object.
Base class specifying the tensor interface.
AclStatus AclGetClContext(AclContext external_ctx, cl_context *opencl_context)
Extract the underlying OpenCL context used by a given Compute Library context object.
@ AclSuccess
Call succeeded, leading to valid state for all involved objects/data.
Target type() const
Target type accessor.
AclStatus AclGetClQueue(AclQueue external_queue, cl_command_queue *opencl_queue)
Extract the underlying OpenCL queue used by a given Compute Library queue object.
@ AclUnsupportedConfig
Call failed as configuration is unsupported.
Base class specifying the queue interface.
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.
int refcount() const
Reference counter accessor.
StatusCode validate_internal_context(const IContext *ctx)
Check if an internal context is valid.
AclStatus AclGetClMem(AclTensor external_tensor, cl_mem *opencl_mem)
Extract the underlying OpenCL memory object by a given Compute Library tensor object.
@ AclInvalidTarget
Call failed as invalid argument was passed.
@ AclRuntimeError
Call failed during execution.
CLTensor * tensor
Pointer to the auxiliary tensor.
@ AclInvalidArgument
Call failed as invalid argument was passed.
AclStatus AclSetClContext(AclContext external_ctx, cl_context opencl_context)
Set the underlying OpenCL context to be used by a given Compute Library context object.
arm_compute::detail::Header header
Copyright (c) 2017-2024 Arm Limited.
StatusCode validate_internal_tensor(const ITensorV2 *tensor)
Check if an internal tensor is valid.
IContext * get_internal(AclContext ctx)
Extract internal representation of a Context.
StatusCode validate_internal_queue(const IQueue *queue)
Check if an internal queue is valid.