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 |
__SYCL2020_DEPRECATED ("is_host() is deprecated as the host device is no longer supported.") bool is_host() const | |
Get a valid OpenCL kernel handle. More... | |
context | get_context () const |
Get the context that this kernel is defined for. 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_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 74 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 |
sycl::_V1::kernel::__SYCL2020_DEPRECATED | ( | "is_host() is deprecated as the host device is no longer supported." | ) | const |
Get a valid OpenCL kernel handle.
If this kernel encapsulates an instance of OpenCL kernel, a valid cl_kernel will be returned. If this kernel is a host kernel, an invalid_object_error exception will be thrown.
Param::return_type sycl::_V1::kernel::ext_oneapi_get_info | ( | const queue & | q | ) | const |
|
noexcept |
Returns the backend associated with this kernel.
Definition at line 43 of file kernel.cpp.
context sycl::_V1::kernel::get_context | ( | ) | const |
Get the context that this kernel is defined for.
The value returned must be equal to that returned by get_info<info::kernel::context>().
Definition at line 39 of file kernel.cpp.
detail::is_kernel_info_desc< Param >::return_type sycl::_V1::kernel::get_info |
Query information from the kernel object using the info::kernel_info descriptor.
Definition at line 53 of file kernel.cpp.
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 66 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 74 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.
Definition at line 97 of file kernel.hpp.
Definition at line 95 of file kernel.hpp.
|
friend |
|
friend |
Definition at line 136 of file backend.hpp.