DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
cl::sycl::interop_handle Class Reference

#include <CL/sycl/interop_handle.hpp>

Public Member Functions

 interop_handle ()=delete
 
backend get_backend () const noexcept
 Returns a backend associated with the queue associated with this interop_handle. More...
 
template<backend Backend = backend::opencl, typename DataT , int Dims, access::mode Mode, access::target Target, access::placeholder IsPlh>
backend_return_t< Backend, buffer< DataT, Dims > > get_native_mem (const accessor< DataT, Dims, Mode, Target, IsPlh > &Acc) const
 Receives a SYCL accessor that has been defined as a requirement for the command group, and returns the underlying OpenCL memory object that is used by the SYCL runtime. More...
 
template<backend Backend = backend::opencl>
backend_return_t< Backend, queueget_native_queue () const
 Returns an underlying native backend object associated with teh queue that the host task was submitted to. More...
 
template<backend Backend = backend::opencl>
backend_return_t< Backend, deviceget_native_device () const
 Returns the SYCL application interoperability native backend object associated with the device associated with the SYCL queue that the host task was submitted to. More...
 
template<backend Backend = backend::opencl>
backend_return_t< Backend, contextget_native_context () const
 Returns the SYCL application interoperability native backend object associated with the context associated with the SYCL queue that the host task was submitted to. More...
 

Friends

class detail::ExecCGCommand
 
class detail::DispatchHostTask
 

Detailed Description

Definition at line 37 of file interop_handle.hpp.

Constructor & Destructor Documentation

◆ interop_handle()

cl::sycl::interop_handle::interop_handle ( )
delete

Member Function Documentation

◆ get_backend()

backend cl::sycl::interop_handle::get_backend ( ) const
noexcept

Returns a backend associated with the queue associated with this interop_handle.

Definition at line 22 of file interop_handle.cpp.

References cl::sycl::detail::getImplBackend().

◆ get_native_context()

template<backend Backend = backend::opencl>
backend_return_t<Backend, context> cl::sycl::interop_handle::get_native_context ( ) const
inline

Returns the SYCL application interoperability native backend object associated with the context associated with the SYCL queue that the host task was submitted to.

The native backend object returned must be in a state where it is capable of being used in a way appropriate for the associated SYCL backend.

Definition at line 128 of file interop_handle.hpp.

References PI_INVALID_MEM_OBJECT.

◆ get_native_device()

template<backend Backend = backend::opencl>
backend_return_t<Backend, device> cl::sycl::interop_handle::get_native_device ( ) const
inline

Returns the SYCL application interoperability native backend object associated with the device associated with the SYCL queue that the host task was submitted to.

The native backend object returned must be in a state where it is capable of being used in a way appropriate for the associated SYCL backend.

Definition at line 106 of file interop_handle.hpp.

References PI_INVALID_MEM_OBJECT.

◆ get_native_mem()

template<backend Backend = backend::opencl, typename DataT , int Dims, access::mode Mode, access::target Target, access::placeholder IsPlh>
backend_return_t<Backend, buffer<DataT, Dims> > cl::sycl::interop_handle::get_native_mem ( const accessor< DataT, Dims, Mode, Target, IsPlh > &  Acc) const
inline

Receives a SYCL accessor that has been defined as a requirement for the command group, and returns the underlying OpenCL memory object that is used by the SYCL runtime.

If the accessor passed as parameter is not part of the command group requirements (e.g. it is an unregistered placeholder accessor), the exception cl::sycl::invalid_object is thrown asynchronously.

Definition at line 54 of file interop_handle.hpp.

References cl::sycl::detail::getSyclObjImpl(), and PI_INVALID_MEM_OBJECT.

◆ get_native_queue()

template<backend Backend = backend::opencl>
backend_return_t<Backend, queue> cl::sycl::interop_handle::get_native_queue ( ) const
inline

Returns an underlying native backend object associated with teh queue that the host task was submitted to.

If the command group was submitted with a secondary queue and the fall-back was triggered, the queue that is associated with the interop_handle must be the fall-back queue. The native backend object returned must be in a state where it is capable of being used in a way appropriate for the associated SYCL backend. It is implementation-defined in cases where the SYCL queue maps to multiple underlying backend objects. It is responsibility of the SYCL runtime to ensure the backend queue returned is in a state that can be used to dispatch work, and that other potential backend command queues associated with the same SYCL command queue are not executing commands while the host task is executing.

Definition at line 85 of file interop_handle.hpp.

References PI_INVALID_MEM_OBJECT.

Friends And Related Function Documentation

◆ detail::DispatchHostTask

friend class detail::DispatchHostTask
friend

Definition at line 146 of file interop_handle.hpp.

◆ detail::ExecCGCommand

friend class detail::ExecCGCommand
friend

Definition at line 145 of file interop_handle.hpp.


The documentation for this class was generated from the following files: