DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::ext::oneapi::level_zero Namespace Reference

Enumerations

enum class  ownership { transfer , keep }
 

Functions

platform make_platform (pi_native_handle NativeHandle)
 
device make_device (const platform &Platform, pi_native_handle NativeHandle)
 
context make_context (const std::vector< device > &DeviceList, pi_native_handle NativeHandle, bool keep_ownership=false)
 
queue make_queue (const context &Context, pi_native_handle InteropHandle, bool keep_ownership=false)
 
queue make_queue (const context &Context, const device &Device, pi_native_handle InteropHandle, bool keep_ownership=false)
 
event make_event (const context &Context, pi_native_handle InteropHandle, bool keep_ownership=false)
 
template<typename T , typename sycl::detail::enable_if_t< std::is_same< T, platform >::value > * = nullptr>
make (typename sycl::detail::interop< backend::ext_oneapi_level_zero, T >::type Interop)
 
template<typename T , typename sycl::detail::enable_if_t< std::is_same< T, device >::value > * = nullptr>
make (const platform &Platform, typename sycl::detail::interop< backend::ext_oneapi_level_zero, T >::type Interop)
 
template<typename T , typename std::enable_if< std::is_same< T, context >::value >::type * = nullptr>
make (const std::vector< device > &DeviceList, typename sycl::detail::interop< backend::ext_oneapi_level_zero, T >::type Interop, ownership Ownership=ownership::transfer)
 Construction of SYCL context. More...
 
template<typename T , typename sycl::detail::enable_if_t< std::is_same< T, queue >::value > * = nullptr>
make (const context &Context, typename sycl::detail::interop< backend::ext_oneapi_level_zero, T >::type Interop, ownership Ownership=ownership::transfer)
 

Enumeration Type Documentation

◆ ownership

Enumerator
transfer 
keep 

Definition at line 21 of file level_zero_ownership.hpp.

Function Documentation

◆ make() [1/4]

template<typename T , typename sycl::detail::enable_if_t< std::is_same< T, queue >::value > * = nullptr>
T sycl::_V1::ext::oneapi::level_zero::make ( const context Context,
typename sycl::detail::interop< backend::ext_oneapi_level_zero, T >::type  Interop,
ownership  Ownership = ownership::transfer 
)

Definition at line 82 of file level_zero.hpp.

References make_queue().

◆ make() [2/4]

template<typename T , typename sycl::detail::enable_if_t< std::is_same< T, device >::value > * = nullptr>
T sycl::_V1::ext::oneapi::level_zero::make ( const platform Platform,
typename sycl::detail::interop< backend::ext_oneapi_level_zero, T >::type  Interop 
)

Definition at line 51 of file level_zero.hpp.

References make_device().

◆ make() [3/4]

template<typename T , typename std::enable_if< std::is_same< T, context >::value >::type * = nullptr>
T sycl::_V1::ext::oneapi::level_zero::make ( const std::vector< device > &  DeviceList,
typename sycl::detail::interop< backend::ext_oneapi_level_zero, T >::type  Interop,
ownership  Ownership = ownership::transfer 
)

Construction of SYCL context.

Parameters
DeviceListis a vector of devices which must be encapsulated by created SYCL context. Provided devices and native context handle must be associated with the same platform.
Interopis a Level Zero native context handle.
Ownership(optional) specifies who will assume ownership of the native context handle. Default is that SYCL RT does, so it destroys the native handle when the created SYCL object goes out of life.

Definition at line 69 of file level_zero.hpp.

References make_context().

◆ make() [4/4]

template<typename T , typename sycl::detail::enable_if_t< std::is_same< T, platform >::value > * = nullptr>
T sycl::_V1::ext::oneapi::level_zero::make ( typename sycl::detail::interop< backend::ext_oneapi_level_zero, T >::type  Interop)

Definition at line 42 of file level_zero.hpp.

References make_platform().

◆ make_context()

context sycl::_V1::ext::oneapi::level_zero::make_context ( const std::vector< device > &  DeviceList,
pi_native_handle  NativeHandle,
bool  keep_ownership = false 
)

◆ make_device()

device sycl::_V1::ext::oneapi::level_zero::make_device ( const platform Platform,
pi_native_handle  NativeHandle 
)

Definition at line 29 of file level_zero.cpp.

References sycl::_V1::detail::getSyclObjImpl(), and piextDeviceCreateWithNativeHandle().

Referenced by make().

◆ make_event()

event sycl::_V1::ext::oneapi::level_zero::make_event ( const context Context,
pi_native_handle  InteropHandle,
bool  keep_ownership = false 
)

◆ make_platform()

platform sycl::_V1::ext::oneapi::level_zero::make_platform ( pi_native_handle  NativeHandle)

Definition at line 23 of file level_zero.cpp.

References sycl::_V1::opencl::make_platform().

Referenced by make().

◆ make_queue() [1/2]

queue sycl::_V1::ext::oneapi::level_zero::make_queue ( const context Context,
const device Device,
pi_native_handle  InteropHandle,
bool  keep_ownership = false 
)

◆ make_queue() [2/2]

queue sycl::_V1::ext::oneapi::level_zero::make_queue ( const context Context,
pi_native_handle  InteropHandle,
bool  keep_ownership = false 
)