DPC++ Runtime
Runtime libraries for oneAPI DPC++
|
|
Go to the documentation of this file.
28 class kernel_bundle_impl;
98 cl_kernel
get()
const {
100 throw invalid_object_error(
101 "This instance of kernel doesn't support OpenCL interoperability.",
102 PI_ERROR_INVALID_KERNEL);
105 return pi::cast<cl_kernel>(MKernel);
111 bool is_host()
const {
return MContext->is_host(); }
119 template <
typename Param>
typename Param::return_type get_info()
const;
126 template <
typename Param>
127 typename Param::return_type get_info(
const device &Device)
const;
136 template <
typename Param>
137 typename Param::return_type get_info(
const device &Device,
154 bool isCreatedFromSource()
const;
159 const plugin &Plugin = MContext->getPlugin();
177 return MNoncacheableEnqueueMutex;
184 bool MCreatedFromSource =
true;
187 bool MIsInterop =
false;
188 std::mutex MNoncacheableEnqueueMutex;
191 template <
typename Param>
192 inline typename Param::return_type kernel_impl::get_info()
const {
194 "Invalid kernel information descriptor");
197 assert(0 &&
"Not implemented");
199 return get_kernel_info<Param>(this->getHandleRef(),
getPlugin());
203 inline context kernel_impl::get_info<info::kernel::context>()
const {
204 return createSyclObjFromImpl<context>(MContext);
207 template <
typename Param>
208 inline typename Param::return_type
209 kernel_impl::get_info(
const device &Device)
const {
211 return get_kernel_device_specific_info_host<Param>(Device);
213 return get_kernel_device_specific_info<Param>(
218 template <
typename Param>
219 inline typename Param::return_type
220 kernel_impl::get_info(
const device &Device,
221 const sycl::range<3> &WGSize)
const {
223 throw runtime_error(
"Sub-group feature is not supported on HOST device.",
224 PI_ERROR_INVALID_DEVICE);
226 return get_kernel_device_specific_info_with_input<Param>(
227 this->getHandleRef(),
getSyclObjImpl(Device)->getHandleRef(), WGSize,
std::shared_ptr< sycl::detail::context_impl > ContextImplPtr
pi_result piextKernelGetNativeHandle(pi_kernel kernel, pi_native_handle *nativeHandle)
Gets the native handle of a PI kernel object.
std::shared_ptr< device_image_impl > DeviceImageImplPtr
#define __SYCL_INLINE_VER_NAMESPACE(X)
ProgramImplPtr getProgramImpl() const
std::shared_ptr< program_impl > ProgramImplPtr
---— Error handling, matching OpenCL plugin semantics.
backend getBackend(void) const
std::shared_ptr< detail::kernel_bundle_impl > KernelBundleImplPtr
RT::PiKernel & getHandleRef()
Get a reference to a raw kernel object.
pi_native_handle getNative() const
const plugin & getPlugin()
The plugin class provides a unified interface to the underlying low-level runtimes for the device-agn...
KernelBundleImplPtr get_kernel_bundle() const
annotated_arg & operator=(annotated_arg &)=default
pi_result piKernelRetain(pi_kernel kernel)
cl_kernel get() const
Gets a valid OpenCL kernel handle.
The SYCL device class encapsulates a single SYCL device on which kernels may be executed.
uintptr_t pi_native_handle
const DeviceImageImplPtr & getDeviceImage() const
void call(ArgsT... Args) const
Calls the API, traces the call, checks the result.
const RT::PiKernel & getHandleRef() const
Get a constant reference to a raw kernel object.
bool is_host() const
Check if the associated SYCL context is a SYCL host context.
std::mutex & getNoncacheableEnqueueMutex()
decltype(Obj::impl) getSyclObjImpl(const Obj &SyclObject)
The context class represents a SYCL context on which kernel functions may be executed.
const plugin & getPlugin() const