#include <detail/kernel_impl.hpp>
Public Member Functions | |
kernel_impl (RT::PiKernel Kernel, ContextImplPtr Context, KernelBundleImplPtr KernelBundleImpl) | |
Constructs a SYCL kernel instance from a PiKernel. More... | |
kernel_impl (RT::PiKernel Kernel, ContextImplPtr ContextImpl, ProgramImplPtr ProgramImpl, bool IsCreatedFromSource, KernelBundleImplPtr KernelBundleImpl) | |
Constructs a SYCL kernel instance from a SYCL program and a PiKernel. More... | |
kernel_impl (RT::PiKernel Kernel, ContextImplPtr ContextImpl, DeviceImageImplPtr DeviceImageImpl, KernelBundleImplPtr KernelBundleImpl) | |
Constructs a SYCL kernel_impl instance from a SYCL device_image, kernel_bundle and / PiKernel. More... | |
kernel_impl (ContextImplPtr Context, ProgramImplPtr ProgramImpl) | |
Constructs a SYCL kernel for host device. More... | |
kernel_impl (const kernel_impl &)=delete | |
kernel_impl (kernel_impl &&)=delete | |
kernel_impl & | operator= (const kernel_impl &)=delete |
kernel_impl & | operator= (kernel_impl &&)=delete |
~kernel_impl () | |
cl_kernel | get () const |
Gets a valid OpenCL kernel handle. More... | |
bool | is_host () const |
Check if the associated SYCL context is a SYCL host context. More... | |
const plugin & | getPlugin () const |
template<info::kernel param> | |
info::param_traits< info::kernel, param >::return_type | get_info () const |
Query information from the kernel object using the info::kernel_info descriptor. More... | |
template<info::kernel_device_specific param> | |
info::param_traits< info::kernel_device_specific, param >::return_type | get_info (const device &Device) const |
Query device-specific information from a kernel object using the info::kernel_device_specific descriptor. More... | |
template<info::kernel_device_specific param> | |
info::param_traits< info::kernel_device_specific, param >::return_type | get_info (const device &Device, typename info::param_traits< info::kernel_device_specific, param >::input_type Value) const |
Query device-specific information from a kernel using the info::kernel_device_specific descriptor for a specific device and value. More... | |
template<info::kernel_work_group param> | |
info::param_traits< info::kernel_work_group, param >::return_type | get_work_group_info (const device &Device) const |
Query work-group information from a kernel using the info::kernel_work_group descriptor for a specific device. More... | |
template<info::kernel_sub_group param> | |
info::param_traits< info::kernel_sub_group, param >::return_type | get_sub_group_info (const device &Device) const |
Query sub-group information from a kernel using the info::kernel_sub_group descriptor for a specific device. More... | |
template<info::kernel_sub_group param> | |
info::param_traits< info::kernel_sub_group, param >::return_type | get_sub_group_info (const device &Device, typename info::param_traits< info::kernel_sub_group, param >::input_type Value) const |
Query sub-group information from a kernel using the info::kernel_sub_group descriptor for a specific device and value. More... | |
RT::PiKernel & | getHandleRef () |
Get a reference to a raw kernel object. More... | |
const RT::PiKernel & | getHandleRef () const |
Get a constant reference to a raw kernel object. More... | |
bool | isCreatedFromSource () const |
Check if kernel was created from a program that had been created from source. More... | |
const DeviceImageImplPtr & | getDeviceImage () const |
pi_native_handle | getNative () const |
KernelBundleImplPtr | get_kernel_bundle () const |
bool | isInterop () const |
Definition at line 34 of file kernel_impl.hpp.
cl::sycl::detail::kernel_impl::kernel_impl | ( | RT::PiKernel | Kernel, |
ContextImplPtr | Context, | ||
KernelBundleImplPtr | KernelBundleImpl | ||
) |
Constructs a SYCL kernel instance from a PiKernel.
This constructor is used for plug-in interoperability. It always marks kernel as being created from source and creates a new program_impl instance.
Kernel | is a valid PiKernel instance |
Context | is a valid SYCL context |
KernelBundleImpl | is a valid instance of kernel_bundle_impl |
Definition at line 20 of file kernel_impl.cpp.
References cl::sycl::detail::plugin::call(), getPlugin(), PI_TRUE, PI_USM_INDIRECT_ACCESS, piKernelRetain(), and piKernelSetExecInfo().
cl::sycl::detail::kernel_impl::kernel_impl | ( | RT::PiKernel | Kernel, |
ContextImplPtr | ContextImpl, | ||
ProgramImplPtr | ProgramImpl, | ||
bool | IsCreatedFromSource, | ||
KernelBundleImplPtr | KernelBundleImpl | ||
) |
Constructs a SYCL kernel instance from a SYCL program and a PiKernel.
This constructor creates a new instance from PiKernel and saves the provided SYCL program. If context of PiKernel differs from context of the SYCL program, an invalid_parameter_error exception is thrown.
Kernel | is a valid PiKernel instance |
ContextImpl | is a valid SYCL context |
ProgramImpl | is a valid instance of program_impl |
IsCreatedFromSource | is a flag that indicates whether program is created from source code |
KernelBundleImpl | is a valid instance of kernel_bundle_impl |
Definition at line 38 of file kernel_impl.cpp.
References cl::sycl::detail::plugin::call(), getPlugin(), PI_INVALID_CONTEXT, PI_KERNEL_INFO_CONTEXT, and piKernelGetInfo().
cl::sycl::detail::kernel_impl::kernel_impl | ( | RT::PiKernel | Kernel, |
ContextImplPtr | ContextImpl, | ||
DeviceImageImplPtr | DeviceImageImpl, | ||
KernelBundleImplPtr | KernelBundleImpl | ||
) |
Constructs a SYCL kernel_impl instance from a SYCL device_image, kernel_bundle and / PiKernel.
Kernel | is a valid PiKernel instance |
ContextImpl | is a valid SYCL context |
KernelBundleImpl | is a valid instance of kernel_bundle_impl |
Definition at line 58 of file kernel_impl.cpp.
References cl::sycl::detail::plugin::call(), getPlugin(), is_host(), and piKernelRetain().
cl::sycl::detail::kernel_impl::kernel_impl | ( | ContextImplPtr | Context, |
ProgramImplPtr | ProgramImpl | ||
) |
Constructs a SYCL kernel for host device.
Context | is a valid SYCL context |
ProgramImpl | is a valid instance of program_impl |
Definition at line 73 of file kernel_impl.cpp.
|
delete |
|
delete |
cl::sycl::detail::kernel_impl::~kernel_impl | ( | ) |
Definition at line 76 of file kernel_impl.cpp.
References cl::sycl::detail::plugin::call(), getPlugin(), is_host(), and piKernelRelease().
|
inline |
Gets 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.
Definition at line 99 of file kernel_impl.hpp.
References cl::sycl::detail::plugin::call(), cl::sycl::detail::pi::getPlugin(), PI_INVALID_KERNEL, and piKernelRetain().
|
inline |
Query information from the kernel object using the info::kernel_info descriptor.
Definition at line 221 of file kernel_impl.hpp.
References std::get(), and cl::sycl::detail::pi::getPlugin().
|
inline |
Query device-specific information from a kernel object using the info::kernel_device_specific descriptor.
Device | is a valid SYCL device to query info for. |
Definition at line 246 of file kernel_impl.hpp.
References std::get(), cl::sycl::detail::pi::getPlugin(), and cl::sycl::detail::getSyclObjImpl().
|
inline |
Query device-specific information from a kernel using the info::kernel_device_specific descriptor for a specific device and value.
Device | is a valid SYCL device. |
Value | depends on information being queried. |
Definition at line 260 of file kernel_impl.hpp.
References std::get(), cl::sycl::detail::pi::getPlugin(), cl::sycl::detail::getSyclObjImpl(), and PI_INVALID_DEVICE.
|
inline |
Definition at line 205 of file kernel_impl.hpp.
|
inline |
Query sub-group information from a kernel using the info::kernel_sub_group descriptor for a specific device.
Device | is a valid SYCL device |
Definition at line 283 of file kernel_impl.hpp.
|
inline |
Query sub-group information from a kernel using the info::kernel_sub_group descriptor for a specific device and value.
Device | is a valid SYCL device. |
Value | depends on information being queried. |
Definition at line 291 of file kernel_impl.hpp.
|
inline |
Query work-group information from a kernel using the info::kernel_work_group descriptor for a specific device.
Device | is a valid SYCL device. |
Definition at line 275 of file kernel_impl.hpp.
|
inline |
Definition at line 191 of file kernel_impl.hpp.
|
inline |
Get a reference to a raw kernel object.
Definition at line 178 of file kernel_impl.hpp.
|
inline |
Get a constant reference to a raw kernel object.
Definition at line 183 of file kernel_impl.hpp.
|
inline |
Definition at line 193 of file kernel_impl.hpp.
References cl::sycl::detail::plugin::call(), cl::sycl::detail::plugin::getBackend(), piextKernelGetNativeHandle(), and piKernelRetain().
|
inline |
Definition at line 114 of file kernel_impl.hpp.
Referenced by kernel_impl(), and ~kernel_impl().
|
inline |
Check if the associated SYCL context is a SYCL host context.
Definition at line 112 of file kernel_impl.hpp.
Referenced by kernel_impl(), and ~kernel_impl().
bool cl::sycl::detail::kernel_impl::isCreatedFromSource | ( | ) | const |
Check if kernel was created from a program that had been created from source.
Definition at line 84 of file kernel_impl.cpp.
|
inline |
Definition at line 207 of file kernel_impl.hpp.
|
delete |
|
delete |