DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::kernel_bundle< State > Class Template Reference

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

#include <sycl/kernel_bundle.hpp>

Inheritance diagram for sycl::_V1::kernel_bundle< State >:
Collaboration diagram for sycl::_V1::kernel_bundle< State >:

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 = std::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
 
- Public Member Functions inherited from sycl::_V1::detail::kernel_bundle_plain
 kernel_bundle_plain (const detail::KernelBundleImplPtr &Impl)
 
bool operator== (const kernel_bundle_plain &RHS) const
 
bool operator!= (const kernel_bundle_plain &RHS) const
 
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
 
- Public Member Functions inherited from sycl::_V1::detail::OwnerLessBase< kernel_bundle< State > >
bool ext_oneapi_owner_before (const ext::oneapi::detail::weak_object_base< kernel_bundle< State > > &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_bundle< State > &Other) const noexcept
 Compares the object against another object using an owner-based implementation-defined ordering. More...
 

Friends

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

Additional Inherited Members

- Protected Member Functions inherited from sycl::_V1::detail::kernel_bundle_plain
kernel get_kernel (const kernel_id &KernelID) const
 
const device_image_plainbegin () const
 
const device_image_plainend () const
 
bool has_specialization_constant_impl (const char *SpecName) const noexcept
 
void set_specialization_constant_impl (const char *SpecName, void *Value, size_t Size) noexcept
 
void get_specialization_constant_impl (const char *SpecName, void *Value) const noexcept
 
bool is_specialization_constant_set (const char *SpecName) const noexcept
 
- Protected Attributes inherited from sycl::_V1::detail::kernel_bundle_plain
detail::KernelBundleImplPtr impl
 

Detailed Description

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

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

Definition at line 201 of file kernel_bundle.hpp.

Member Typedef Documentation

◆ device_image_iterator

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

Definition at line 204 of file kernel_bundle.hpp.

Constructor & Destructor Documentation

◆ kernel_bundle()

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

Member Function Documentation

◆ begin()

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

Definition at line 308 of file kernel_bundle.hpp.

Referenced by sycl::_V1::detail::make_kernel().

◆ contains_specialization_constants()

template<bundle_state State>
bool sycl::_V1::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 246 of file kernel_bundle.hpp.

◆ empty()

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

Definition at line 209 of file kernel_bundle.hpp.

◆ end()

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

Definition at line 314 of file kernel_bundle.hpp.

◆ get_backend()

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

Definition at line 212 of file kernel_bundle.hpp.

◆ get_context()

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

Definition at line 217 of file kernel_bundle.hpp.

Referenced by sycl::_V1::handler::use_kernel_bundle().

◆ get_devices()

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

Definition at line 222 of file kernel_bundle.hpp.

◆ get_kernel()

template<bundle_state State>
template<bundle_state _State = State, typename = std::enable_if_t<_State == bundle_state::executable>>
kernel sycl::_V1::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 260 of file kernel_bundle.hpp.

◆ get_kernel_ids()

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

Definition at line 240 of file kernel_bundle.hpp.

References sycl::_V1::get_kernel_ids().

◆ has_kernel() [1/2]

template<bundle_state State>
bool sycl::_V1::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 228 of file kernel_bundle.hpp.

◆ has_kernel() [2/2]

template<bundle_state State>
bool sycl::_V1::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 235 of file kernel_bundle.hpp.

◆ native_specialization_constant()

template<bundle_state State>
bool sycl::_V1::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 252 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, bundle_state StateB>
auto get_native ( const kernel_bundle< StateB > &  Obj) -> backend_return_t< Backend, kernel_bundle< StateB >>
friend

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