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

Enumerations

enum  ownership { ownership::transfer, ownership::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>
T 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>
T 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>
T 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>
T make (const context &Context, typename sycl::detail::interop< backend::ext_oneapi_level_zero, T >::type Interop, ownership Ownership=ownership::transfer)
 
context make_context (const std::vector< device > &DeviceList, pi_native_handle NativeHandle)
 
program make_program (const context &Context, pi_native_handle NativeHandle)
 
queue make_queue (const context &Context, pi_native_handle NativeHandle)
 

Enumeration Type Documentation

◆ ownership

Enumerator
transfer 
keep 

Definition at line 23 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 cl::sycl::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 101 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 cl::sycl::ext::oneapi::level_zero::make ( const platform Platform,
typename sycl::detail::interop< backend::ext_oneapi_level_zero, T >::type  Interop 
)

Definition at line 58 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 cl::sycl::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 76 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 cl::sycl::ext::oneapi::level_zero::make ( typename sycl::detail::interop< backend::ext_oneapi_level_zero, T >::type  Interop)

Definition at line 49 of file level_zero.hpp.

References make_platform().

◆ make_context() [1/2]

context cl::sycl::ext::oneapi::level_zero::make_context ( const std::vector< device > &  DeviceList,
pi_native_handle  NativeHandle 
)

Definition at line 65 of file level_zero.cpp.

◆ make_context() [2/2]

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

◆ make_device()

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

Definition at line 31 of file level_zero.cpp.

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

Referenced by make().

◆ make_event()

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

◆ make_platform()

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

Definition at line 25 of file level_zero.cpp.

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

Referenced by make().

◆ make_program()

program cl::sycl::ext::oneapi::level_zero::make_program ( const context Context,
pi_native_handle  NativeHandle 
)

Definition at line 72 of file level_zero.cpp.

References cl::sycl::detail::getSyclObjImpl().

◆ make_queue() [1/3]

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

◆ make_queue() [2/3]

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

Definition at line 83 of file level_zero.cpp.

References cl::sycl::detail::getSyclObjImpl(), and make_queue().

◆ make_queue() [3/3]

queue cl::sycl::ext::oneapi::level_zero::make_queue ( const context Context,
pi_native_handle  NativeHandle 
)

Definition at line 102 of file level_zero.cpp.

Referenced by make_queue().