DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::interop_handle Class Reference

#include <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, typename PropertyListT = ext::oneapi::accessor_property_list<>>
std::enable_if_t< Target !=access::target::image, backend_return_t< Backend, buffer< DataT, Dims > > > get_native_mem (const accessor< DataT, Dims, Mode, Target, IsPlh, PropertyListT > &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, typename DataT , int Dims, access::mode Mode, access::target Target, access::placeholder IsPlh>
backend_return_t< Backend, image< Dims > > get_native_mem (const detail::image_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 48 of file interop_handle.hpp.

Constructor & Destructor Documentation

◆ interop_handle()

sycl::_V1::interop_handle::interop_handle ( )
delete

Member Function Documentation

◆ get_backend()

backend sycl::_V1::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 sycl::_V1::detail::getImplBackend().

Referenced by get_native_context(), get_native_device(), get_native_mem(), and get_native_queue().

◆ get_native_context()

template<backend Backend = backend::opencl>
backend_return_t<Backend, context> sycl::_V1::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 169 of file interop_handle.hpp.

References get_backend().

◆ get_native_device()

template<backend Backend = backend::opencl>
backend_return_t<Backend, device> sycl::_V1::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 147 of file interop_handle.hpp.

References get_backend().

◆ get_native_mem() [1/2]

template<backend Backend = backend::opencl, typename DataT , int Dims, access::mode Mode, access::target Target, access::placeholder IsPlh, typename PropertyListT = ext::oneapi::accessor_property_list<>>
std::enable_if_t<Target != access::target::image, backend_return_t<Backend, buffer<DataT, Dims> > > sycl::_V1::interop_handle::get_native_mem ( const accessor< DataT, Dims, Mode, Target, IsPlh, PropertyListT > &  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 sycl::invalid_object is thrown asynchronously.

Definition at line 67 of file interop_handle.hpp.

References sycl::_V1::access::device, get_backend(), and sycl::_V1::detail::getSyclObjImpl().

◆ get_native_mem() [2/2]

template<backend Backend = backend::opencl, typename DataT , int Dims, access::mode Mode, access::target Target, access::placeholder IsPlh>
backend_return_t<Backend, image<Dims> > sycl::_V1::interop_handle::get_native_mem ( const detail::image_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 sycl::invalid_object is thrown asynchronously.

Definition at line 94 of file interop_handle.hpp.

References get_backend(), and sycl::_V1::detail::getSyclObjImpl().

◆ get_native_queue()

template<backend Backend = backend::opencl>
backend_return_t<Backend, queue> sycl::_V1::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 124 of file interop_handle.hpp.

References get_backend().

Friends And Related Function Documentation

◆ detail::DispatchHostTask

friend class detail::DispatchHostTask
friend

Definition at line 187 of file interop_handle.hpp.

◆ detail::ExecCGCommand

friend class detail::ExecCGCommand
friend

Definition at line 186 of file interop_handle.hpp.


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