cl::sycl::kernel Class Reference
SYCL Kernel interface. More...
#include <kernel.h>
Public Member Functions | |
kernel (const kernel &rhs)=default | |
Copy constructor. More... | |
kernel & | operator= (const kernel &rhs)=default |
Assignment operator. More... | |
kernel (kernel &&rhs)=default | |
Move constructor. More... | |
kernel & | operator= (kernel &&rhs)=default |
Move assignment operator. More... | |
COMPUTECPP_TEST_VIRTUAL | ~kernel ()=default |
COMPUTECPP_DEPRECATED_BY_SYCL_VER (201703, "Use the OpenCL interop constructor which takes a SYCL context instead.") kernel(cl_kernel clKernel) | |
Create a kernel object from cl_kernel object created by an OpenCL runtime. More... | |
kernel (cl_kernel clKernel, const context &syclContext) | |
Constructs a kernel object from an OpenCL cl_kernel object. More... | |
COMPUTECPP_TEST_VIRTUAL program | get_program () const |
Gets the SYCL program object this kernel is associated to. More... | |
COMPUTECPP_TEST_VIRTUAL context | get_context () const |
Gets the SYCL Context this kernel has been constructed to. More... | |
COMPUTECPP_TEST_VIRTUAL cl_kernel | get () const |
Get the underlying OpenCL kernel object. More... | |
template<info::kernel param> | |
COMPUTECPP_EXPORT info::param_traits< info::kernel, param >::return_type | get_info () const |
Query information about the kernel. More... | |
template<info::kernel_work_group param> | |
info::param_traits< info::kernel_work_group, param >::return_type | get_work_group_info (const cl::sycl::device &device) const |
template<info::kernel_sub_group param> | |
info::param_traits< info::kernel_sub_group, param >::return_type | get_sub_group_info (const cl::sycl::device &device) const |
template<info::kernel_sub_group param> | |
info::param_traits< info::kernel_sub_group, param >::return_type | get_sub_group_info (const cl::sycl::device &device, typename info::param_traits< info::kernel_sub_group, param >::input_type value) const |
bool | is_host () const |
Returns whether the kernel was constructed from a host context. More... | |
Protected Member Functions | |
COMPUTECPP_TEST_VIRTUAL cl_kernel | get_no_retain () const |
Get the underlying OpenCL kernel object without retaining it. More... | |
Friends | |
bool | operator== (const kernel &lhs, const kernel &rhs) |
Determines if lhs and rhs are equal. More... | |
bool | operator!= (const kernel &lhs, const kernel &rhs) |
Determines if lhs and rhs are not equal. More... | |
Detailed Description
SYCL Kernel interface.
See Section 3.5.4 of the Specification.
Constructor & Destructor Documentation
◆ kernel() [1/3]
|
default |
Copy constructor.
Create a copy of a kernel.
◆ kernel() [2/3]
|
default |
Move constructor.
Create a copy of a kernel.
◆ ~kernel()
|
default |
◆ kernel() [3/3]
cl::sycl::kernel::kernel | ( | cl_kernel | clKernel, |
const context & | syclContext | ||
) |
Constructs a kernel object from an OpenCL cl_kernel object.
- Parameters
-
clKernel Kernel object created by an OpenCL runtime syclContext Context associated with the OpenCL kernel object
Member Function Documentation
◆ COMPUTECPP_DEPRECATED_BY_SYCL_VER()
cl::sycl::kernel::COMPUTECPP_DEPRECATED_BY_SYCL_VER | ( | 201703 | , |
"Use the OpenCL interop constructor which takes a SYCL context instead." | |||
) |
Create a kernel object from cl_kernel object created by an OpenCL runtime.
- Parameters
-
clKernel an OpenCL kernel created using the OpenCL API.
- Deprecated:
- Provide a context as the second argument
◆ get()
COMPUTECPP_TEST_VIRTUAL cl_kernel cl::sycl::kernel::get | ( | ) | const |
Get the underlying OpenCL kernel object.
- Returns
- A cl_kernel object usable with the OpenCL API.
◆ get_context()
COMPUTECPP_TEST_VIRTUAL context cl::sycl::kernel::get_context | ( | ) | const |
Gets the SYCL Context this kernel has been constructed to.
- Returns
- The SYCL context this kernel belongs to
◆ get_info()
COMPUTECPP_EXPORT info::param_traits<info::kernel, param>::return_type cl::sycl::kernel::get_info | ( | ) | const |
Query information about the kernel.
- Template Parameters
-
param The kernel information descriptor
- Returns
- The kernel information requested with param.
◆ get_no_retain()
|
protected |
Get the underlying OpenCL kernel object without retaining it.
- Returns
- A cl_kernel object usable with the OpenCL API.
◆ get_program()
COMPUTECPP_TEST_VIRTUAL program cl::sycl::kernel::get_program | ( | ) | const |
Gets the SYCL program object this kernel is associated to.
- Returns
- The SYCL program this kernel belongs to
◆ get_sub_group_info() [1/2]
|
inline |
◆ get_sub_group_info() [2/2]
|
inline |
◆ get_work_group_info()
|
inline |
◆ is_host()
bool cl::sycl::kernel::is_host | ( | ) | const |
Returns whether the kernel was constructed from a host context.
- Returns
- True if kernel constructed from a host context
◆ operator=() [1/2]
Assignment operator.
Assign a copy of a kernel.
◆ operator=() [2/2]
Move assignment operator.
Assign a copy of a kernel.
Friends And Related Function Documentation
◆ operator!=
◆ operator==
The documentation for this class was generated from the following file: