Provides an abstraction of a SYCL kernel. More...
#include <sycl/kernel.hpp>
Public Member Functions | |
kernel (const kernel &RHS)=default | |
Constructs a SYCL kernel instance from an OpenCL cl_kernel. More... | |
kernel (kernel &&RHS)=default | |
kernel & | operator= (const kernel &RHS)=default |
kernel & | operator= (kernel &&RHS)=default |
bool | operator== (const kernel &RHS) const |
bool | operator!= (const kernel &RHS) const |
context | get_context () const |
Get a valid OpenCL kernel handle. More... | |
backend | get_backend () const noexcept |
Returns the backend associated with this kernel. More... | |
kernel_bundle< bundle_state::executable > | get_kernel_bundle () const |
Get the kernel_bundle associated with this kernel. More... | |
template<typename Param > | |
detail::is_kernel_info_desc< Param >::return_type | get_info () const |
Query information from the kernel object using the info::kernel_info descriptor. More... | |
template<typename Param > | |
detail::is_backend_info_desc< Param >::return_type | get_backend_info () const |
Queries the kernel object for SYCL backend-specific information. More... | |
template<typename Param > | |
detail::is_kernel_device_specific_info_desc< Param >::return_type | get_info (const device &Device) const |
Query device-specific information from the kernel object using the info::kernel_device_specific descriptor. More... | |
template<typename Param > | |
detail::is_kernel_device_specific_info_desc< Param >::return_type | get_info (const device &Device, const range< 3 > &WGSize) const |
Query device-specific information from a kernel using the info::kernel_device_specific descriptor for a specific device and value. More... | |
template<typename Param > | |
Param::return_type | ext_oneapi_get_info (const queue &q) const |
![]() | |
bool | ext_oneapi_owner_before (const ext::oneapi::detail::weak_object_base< kernel > &Other) const noexcept |
Compares the object against a weak object using an owner-based implementation-defined ordering. More... | |
bool | ext_oneapi_owner_before (const kernel &Other) const noexcept |
Compares the object against another object using an owner-based implementation-defined ordering. More... | |
Friends | |
template<class T > | |
T | detail::createSyclObjFromImpl (decltype(T::impl) ImplObj) |
template<backend BackendName, class SyclObjectT > | |
auto | get_native (const SyclObjectT &Obj) -> backend_return_t< BackendName, SyclObjectT > |
Provides an abstraction of a SYCL kernel.
Definition at line 71 of file kernel.hpp.
|
default |
Constructs a SYCL kernel instance from an OpenCL cl_kernel.
The requirements for this constructor are described in section 4.3.1 of the SYCL specification.
ClKernel | is a valid OpenCL cl_kernel instance |
SyclContext | is a valid SYCL context |
|
default |
Param::return_type sycl::_V1::kernel::ext_oneapi_get_info | ( | const queue & | q | ) | const |
Definition at line 110 of file kernel.cpp.
|
noexcept |
Returns the backend associated with this kernel.
Definition at line 43 of file kernel.cpp.
References sycl::_V1::detail::getImplBackend().
detail::is_backend_info_desc< Param >::return_type sycl::_V1::kernel::get_backend_info |
Queries the kernel object for SYCL backend-specific information.
The return type depends on information being queried.
Definition at line 67 of file kernel.cpp.
context sycl::_V1::kernel::get_context | ( | ) | const |
Get a valid OpenCL kernel handle.
If this kernel encapsulates an instance of OpenCL kernel, a valid cl_kernel will be returned.
The value returned must be equal to that returned by get_info<info::kernel::context>().
Definition at line 39 of file kernel.cpp.
|
inline |
Query information from the kernel object using the info::kernel_info descriptor.
Definition at line 129 of file kernel.hpp.
References sycl::_V1::detail::convert_from_abi_neutral().
detail::is_kernel_device_specific_info_desc< Param >::return_type sycl::_V1::kernel::get_info | ( | const device & | Device | ) | const |
Query device-specific information from the kernel object using the info::kernel_device_specific descriptor.
Device | is a valid SYCL device to query info for. |
Definition at line 81 of file kernel.cpp.
detail::is_kernel_device_specific_info_desc< Param >::return_type sycl::_V1::kernel::get_info | ( | const device & | Device, |
const range< 3 > & | WGSize | ||
) | const |
Query device-specific information from a kernel using the info::kernel_device_specific descriptor for a specific device and value.
max_sub_group_size is the only valid descriptor for this function.
Device | is a valid SYCL device. |
WGSize | is the work-group size the sub-group size is requested for. |
Definition at line 89 of file kernel.cpp.
kernel_bundle< sycl::bundle_state::executable > sycl::_V1::kernel::get_kernel_bundle | ( | ) | const |
Get the kernel_bundle associated with this kernel.
Definition at line 46 of file kernel.cpp.
References sycl::_V1::detail::createSyclObjFromImpl().
|
inline |
Definition at line 94 of file kernel.hpp.
|
inline |
Definition at line 92 of file kernel.hpp.
|
friend |
|
friend |
Definition at line 138 of file backend.hpp.