DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
cl::sycl::kernel_bundle< State > Class Template Reference

The kernel_bundle class represents collection of device images in a particular state. More...

#include <CL/sycl/kernel.hpp>

Public Types

using device_image_iterator = const device_image< State > *
 

Public Member Functions

 kernel_bundle ()=delete
 
bool empty () const noexcept
 
backend get_backend () const noexcept
 
context get_context () const noexcept
 
std::vector< deviceget_devices () const noexcept
 
bool has_kernel (const kernel_id &KernelID) const noexcept
 
bool has_kernel (const kernel_id &KernelID, const device &Dev) const noexcept
 
std::vector< kernel_idget_kernel_ids () const
 
bool contains_specialization_constants () const noexcept
 
bool native_specialization_constant () const noexcept
 
template<bundle_state _State = State, typename = detail::enable_if_t<_State == bundle_state::executable>>
kernel get_kernel (const kernel_id &KernelID) const
 
device_image_iterator begin () const
 
device_image_iterator end () const
 
template<backend Backend>
std::vector< typename backend_traits< Backend >::template return_type< kernel_bundle< State > > > get_native ()
 

Friends

template<class T >
T detail::createSyclObjFromImpl (decltype(T::impl) ImplObj)
 
template<backend Backend, class SyclT >
auto get_native (const SyclT &Obj) -> backend_return_t< Backend, SyclT >
 

Detailed Description

template<bundle_state State>
class cl::sycl::kernel_bundle< State >

The kernel_bundle class represents collection of device images in a particular state.

Definition at line 26 of file kernel.hpp.

Member Typedef Documentation

◆ device_image_iterator

template<bundle_state State>
using cl::sycl::kernel_bundle< State >::device_image_iterator = const device_image<State> *

Definition at line 198 of file kernel_bundle.hpp.

Constructor & Destructor Documentation

◆ kernel_bundle()

template<bundle_state State>
cl::sycl::kernel_bundle< State >::kernel_bundle ( )
delete

Member Function Documentation

◆ begin()

template<bundle_state State>
device_image_iterator cl::sycl::kernel_bundle< State >::begin ( ) const
inline
Returns
an iterator to the first device image kernel_bundle contains

Definition at line 302 of file kernel_bundle.hpp.

◆ contains_specialization_constants()

template<bundle_state State>
bool cl::sycl::kernel_bundle< State >::contains_specialization_constants ( ) const
inlinenoexcept
Returns
true if the kernel_bundle contains at least one device image which uses specialization constants

Definition at line 240 of file kernel_bundle.hpp.

◆ empty()

template<bundle_state State>
bool cl::sycl::kernel_bundle< State >::empty ( ) const
inlinenoexcept
Returns
true if the kernel_bundles contains no device images

Definition at line 203 of file kernel_bundle.hpp.

◆ end()

template<bundle_state State>
device_image_iterator cl::sycl::kernel_bundle< State >::end ( ) const
inline
Returns
an iterator to the last device image kernel_bundle contains

Definition at line 308 of file kernel_bundle.hpp.

◆ get_backend()

template<bundle_state State>
backend cl::sycl::kernel_bundle< State >::get_backend ( ) const
inlinenoexcept
Returns
the backend associated with the kernel bundle

Definition at line 206 of file kernel_bundle.hpp.

◆ get_context()

template<bundle_state State>
context cl::sycl::kernel_bundle< State >::get_context ( ) const
inlinenoexcept
Returns
the context associated with the kernel_bundle

Definition at line 211 of file kernel_bundle.hpp.

◆ get_devices()

template<bundle_state State>
std::vector<device> cl::sycl::kernel_bundle< State >::get_devices ( ) const
inlinenoexcept
Returns
devices associated with the kernel_bundle

Definition at line 216 of file kernel_bundle.hpp.

◆ get_kernel()

template<bundle_state State>
template<bundle_state _State = State, typename = detail::enable_if_t<_State == bundle_state::executable>>
kernel cl::sycl::kernel_bundle< State >::get_kernel ( const kernel_id KernelID) const
inline
Returns
a kernel object which represents the kernel identified by kernel_id passed

Definition at line 254 of file kernel_bundle.hpp.

◆ get_kernel_ids()

template<bundle_state State>
std::vector<kernel_id> cl::sycl::kernel_bundle< State >::get_kernel_ids ( ) const
inline
Returns
a vector of kernel_id's that contained in the kernel_bundle

Definition at line 234 of file kernel_bundle.hpp.

References cl::sycl::get_kernel_ids().

◆ get_native()

template<bundle_state State>
template<backend Backend>
std::vector<typename backend_traits<Backend>::template return_type< kernel_bundle<State> > > cl::sycl::kernel_bundle< State >::get_native ( )
inline

◆ has_kernel() [1/2]

template<bundle_state State>
bool cl::sycl::kernel_bundle< State >::has_kernel ( const kernel_id KernelID) const
inlinenoexcept
Returns
true if the kernel_bundle contains the kernel identified by kernel_id passed

Definition at line 222 of file kernel_bundle.hpp.

◆ has_kernel() [2/2]

template<bundle_state State>
bool cl::sycl::kernel_bundle< State >::has_kernel ( const kernel_id KernelID,
const device Dev 
) const
inlinenoexcept
Returns
true if the kernel_bundle contains the kernel identified by kernel_id passed and if this kernel is compatible with the device specified

Definition at line 229 of file kernel_bundle.hpp.

◆ native_specialization_constant()

template<bundle_state State>
bool cl::sycl::kernel_bundle< State >::native_specialization_constant ( ) const
inlinenoexcept
Returns
true if all specialization constants which are used in the kernel_bundle are "native specialization constants in all device images

Definition at line 246 of file kernel_bundle.hpp.

Friends And Related Function Documentation

◆ detail::createSyclObjFromImpl

template<bundle_state State>
template<class T >
T detail::createSyclObjFromImpl ( decltype(T::impl)  ImplObj)
friend

◆ get_native

template<bundle_state State>
template<backend Backend, class SyclT >
auto get_native ( const SyclT &  Obj) -> backend_return_t< Backend, SyclT >
friend

The documentation for this class was generated from the following files: