DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
cl::sycl::queue Class Reference

Encapsulates a single SYCL queue which schedules kernels on a SYCL device. More...

#include <CL/sycl/queue.hpp>

Public Member Functions

 queue (const property_list &PropList={})
 Constructs a SYCL queue instance using the device returned by an instance of default_selector. More...
 
 queue (const async_handler &AsyncHandler, const property_list &PropList={})
 Constructs a SYCL queue instance with an async_handler using the device returned by an instance of default_selector. More...
 
 queue (const device_selector &DeviceSelector, const property_list &PropList={})
 Constructs a SYCL queue instance using the device returned by the DeviceSelector provided. More...
 
 queue (const device_selector &DeviceSelector, const async_handler &AsyncHandler, const property_list &PropList={})
 Constructs a SYCL queue instance with an async_handler using the device returned by the DeviceSelector provided. More...
 
 queue (const device &SyclDevice, const property_list &PropList={})
 Constructs a SYCL queue instance using the device provided. More...
 
 queue (const device &SyclDevice, const async_handler &AsyncHandler, const property_list &PropList={})
 Constructs a SYCL queue instance with an async_handler using the device provided. More...
 
 queue (const context &SyclContext, const device_selector &DeviceSelector, const property_list &PropList={})
 Constructs a SYCL queue instance that is associated with the context provided, using the device returned by the device selector. More...
 
 queue (const context &SyclContext, const device_selector &DeviceSelector, const async_handler &AsyncHandler, const property_list &PropList={})
 Constructs a SYCL queue instance with an async_handler that is associated with the context provided, using the device returned by the device selector. More...
 
 queue (const context &SyclContext, const device &SyclDevice, const property_list &PropList={})
 Constructs a SYCL queue associated with the given context, device and optional properties list. More...
 
 queue (const context &SyclContext, const device &SyclDevice, const async_handler &AsyncHandler, const property_list &PropList={})
 Constructs a SYCL queue associated with the given context, device, asynchronous exception handler and optional properties list. More...
 
 queue (cl_command_queue ClQueue, const context &SyclContext, const async_handler &AsyncHandler={})
 Constructs a SYCL queue with an optional async_handler from an OpenCL cl_command_queue. More...
 
 queue (const queue &RHS)=default
 
 queue (queue &&RHS)=default
 
queueoperator= (const queue &RHS)=default
 
queueoperator= (queue &&RHS)=default
 
bool operator== (const queue &RHS) const
 
bool operator!= (const queue &RHS) const
 
cl_command_queue get () const
 
context get_context () const
 
device get_device () const
 
bool is_host () const
 
template<info::queue param>
info::param_traits< info::queue, param >::return_type get_info () const
 Queries SYCL queue for information. More...
 
bool device_has (aspect Aspect) const
 
template<typename T >
event submit (T CGF _CODELOCPARAM(&CodeLoc))
 Submits a command group function object to the queue, in order to be scheduled for execution on the device. More...
 
template<typename T >
event submit (T CGF, queue &SecondaryQueue _CODELOCPARAM(&CodeLoc))
 Submits a command group function object to the queue, in order to be scheduled for execution on the device. More...
 
event ext_oneapi_submit_barrier (_CODELOCONLYPARAM(&CodeLoc))
 Prevents any commands submitted afterward to this queue from executing until all commands previously submitted to this queue have entered the complete state. More...
 
event submit_barrier (_CODELOCONLYPARAM(&CodeLoc))
 Prevents any commands submitted afterward to this queue from executing until all commands previously submitted to this queue have entered the complete state. More...
 
event ext_oneapi_submit_barrier (const std::vector< event > &WaitList _CODELOCPARAM(&CodeLoc))
 Prevents any commands submitted afterward to this queue from executing until all events in WaitList have entered the complete state. More...
 
event submit_barrier (const std::vector< event > &WaitList _CODELOCPARAM(&CodeLoc))
 Prevents any commands submitted afterward to this queue from executing until all events in WaitList have entered the complete state. More...
 
void wait (_CODELOCONLYPARAM(&CodeLoc))
 Performs a blocking wait for the completion of all enqueued tasks in the queue. More...
 
void wait_and_throw (_CODELOCONLYPARAM(&CodeLoc))
 Performs a blocking wait for the completion of all enqueued tasks in the queue. More...
 
void wait_proxy (const detail::code_location &CodeLoc)
 Proxy method for wait to forward the code location information to the implementation. More...
 
void wait_and_throw_proxy (const detail::code_location &CodeLoc)
 Proxy method for wait_and_throw to forward the code location information to the implementation. More...
 
void throw_asynchronous ()
 Checks if any asynchronous errors have been produced by the queue and if so reports them to the async_handler passed on the queue construction. More...
 
template<typename PropertyT >
bool has_property () const
 
template<typename PropertyT >
PropertyT get_property () const
 
template<typename T >
event fill (void *Ptr, const T &Pattern, size_t Count)
 Fills the specified memory with the specified pattern. More...
 
template<typename T >
event fill (void *Ptr, const T &Pattern, size_t Count, event DepEvent)
 Fills the specified memory with the specified pattern. More...
 
template<typename T >
event fill (void *Ptr, const T &Pattern, size_t Count, const std::vector< event > &DepEvents)
 Fills the specified memory with the specified pattern. More...
 
event memset (void *Ptr, int Value, size_t Count)
 Fills the memory pointed by a USM pointer with the value specified. More...
 
event memset (void *Ptr, int Value, size_t Count, event DepEvent)
 Fills the memory pointed by a USM pointer with the value specified. More...
 
event memset (void *Ptr, int Value, size_t Count, const std::vector< event > &DepEvents)
 Fills the memory pointed by a USM pointer with the value specified. More...
 
event memcpy (void *Dest, const void *Src, size_t Count)
 Copies data from one memory region to another, both pointed by USM pointers. More...
 
event memcpy (void *Dest, const void *Src, size_t Count, event DepEvent)
 Copies data from one memory region to another, both pointed by USM pointers. More...
 
event memcpy (void *Dest, const void *Src, size_t Count, const std::vector< event > &DepEvents)
 Copies data from one memory region to another, both pointed by USM pointers. More...
 
template<typename T >
event copy (const T *Src, T *Dest, size_t Count)
 Copies data from one memory region to another, both pointed by USM pointers. More...
 
template<typename T >
event copy (const T *Src, T *Dest, size_t Count, event DepEvent)
 Copies data from one memory region to another, both pointed by USM pointers. More...
 
template<typename T >
event copy (const T *Src, T *Dest, size_t Count, const std::vector< event > &DepEvents)
 Copies data from one memory region to another, both pointed by USM pointers. More...
 
event mem_advise (const void *Ptr, size_t Length, pi_mem_advice Advice)
 Provides additional information to the underlying runtime about how different allocations are used. More...
 
event mem_advise (const void *Ptr, size_t Length, int Advice)
 Provides additional information to the underlying runtime about how different allocations are used. More...
 
event mem_advise (const void *Ptr, size_t Length, int Advice, event DepEvent)
 Provides additional information to the underlying runtime about how different allocations are used. More...
 
event mem_advise (const void *Ptr, size_t Length, int Advice, const std::vector< event > &DepEvents)
 Provides additional information to the underlying runtime about how different allocations are used. More...
 
event prefetch (const void *Ptr, size_t Count)
 Provides hints to the runtime library that data should be made available on a device earlier than Unified Shared Memory would normally require it to be available. More...
 
event prefetch (const void *Ptr, size_t Count, event DepEvent)
 Provides hints to the runtime library that data should be made available on a device earlier than Unified Shared Memory would normally require it to be available. More...
 
event prefetch (const void *Ptr, size_t Count, const std::vector< event > &DepEvents)
 Provides hints to the runtime library that data should be made available on a device earlier than Unified Shared Memory would normally require it to be available. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event single_task (_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 single_task version with a kernel represented as a lambda. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event single_task (event DepEvent, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 single_task version with a kernel represented as a lambda. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event single_task (const std::vector< event > &DepEvents, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 single_task version with a kernel represented as a lambda. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event parallel_for (range< 1 > NumWorkItems, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range that specifies global size only. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event parallel_for (range< 2 > NumWorkItems, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range that specifies global size only. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event parallel_for (range< 3 > NumWorkItems, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range that specifies global size only. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event parallel_for (range< 1 > NumWorkItems, event DepEvent, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range that specifies global size only. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event parallel_for (range< 2 > NumWorkItems, event DepEvent, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range that specifies global size only. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event parallel_for (range< 3 > NumWorkItems, event DepEvent, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range that specifies global size only. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event parallel_for (range< 1 > NumWorkItems, const std::vector< event > &DepEvents, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range that specifies global size only. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event parallel_for (range< 2 > NumWorkItems, const std::vector< event > &DepEvents, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range that specifies global size only. More...
 
template<typename KernelName = detail::auto_name, typename KernelType >
event parallel_for (range< 3 > NumWorkItems, const std::vector< event > &DepEvents, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range that specifies global size only. More...
 
template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event parallel_for (range< Dims > NumWorkItems, id< Dims > WorkItemOffset, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range and offset that specify global size and global offset correspondingly. More...
 
template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event parallel_for (range< Dims > NumWorkItems, id< Dims > WorkItemOffset, event DepEvent, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range and offset that specify global size and global offset correspondingly. More...
 
template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event parallel_for (range< Dims > NumWorkItems, id< Dims > WorkItemOffset, const std::vector< event > &DepEvents, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + range and offset that specify global size and global offset correspondingly. More...
 
template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event parallel_for (nd_range< Dims > ExecutionRange, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + nd_range that specifies global, local sizes and offset. More...
 
template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event parallel_for (nd_range< Dims > ExecutionRange, event DepEvent, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + nd_range that specifies global, local sizes and offset. More...
 
template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event parallel_for (nd_range< Dims > ExecutionRange, const std::vector< event > &DepEvents, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + nd_range that specifies global, local sizes and offset. More...
 
template<typename KernelName = detail::auto_name, typename KernelType , int Dims, typename Reduction >
event parallel_for (nd_range< Dims > ExecutionRange, Reduction Redu, _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc))
 parallel_for version with a kernel represented as a lambda + nd_range that specifies global, local sizes and offset. More...
 
bool is_in_order () const
 Returns whether the queue is in order or OoO. More...
 
backend get_backend () const noexcept
 Returns the backend associated with this queue. More...
 
template<backend BackendName>
auto get_native () const -> typename interop< BackendName, queue >::type
 Gets the native handle of the SYCL queue. More...
 

Friends

template<class T >
T detail::createSyclObjFromImpl (decltype(T::impl) ImplObj)
 
event detail::submitAssertCapture (queue &, event &, queue *, const detail::code_location &)
 

Detailed Description

Encapsulates a single SYCL queue which schedules kernels on a SYCL device.

A SYCL queue can be used to submit command groups to be executed by the SYCL runtime.

See also
device
handler
event
kernel

Definition at line 99 of file queue.hpp.

Constructor & Destructor Documentation

◆ queue() [1/13]

cl::sycl::queue::queue ( const property_list PropList = {})
inlineexplicit

Constructs a SYCL queue instance using the device returned by an instance of default_selector.

Parameters
PropListis a list of properties for queue construction.

Definition at line 105 of file queue.hpp.

◆ queue() [2/13]

cl::sycl::queue::queue ( const async_handler AsyncHandler,
const property_list PropList = {} 
)
inline

Constructs a SYCL queue instance with an async_handler using the device returned by an instance of default_selector.

Parameters
AsyncHandleris a SYCL asynchronous exception handler.
PropListis a list of properties for queue construction.

Definition at line 113 of file queue.hpp.

◆ queue() [3/13]

cl::sycl::queue::queue ( const device_selector DeviceSelector,
const property_list PropList = {} 
)
inline

Constructs a SYCL queue instance using the device returned by the DeviceSelector provided.

Parameters
DeviceSelectoris an instance of SYCL device selector.
PropListis a list of properties for queue construction.

Definition at line 121 of file queue.hpp.

◆ queue() [4/13]

cl::sycl::queue::queue ( const device_selector DeviceSelector,
const async_handler AsyncHandler,
const property_list PropList = {} 
)
inline

Constructs a SYCL queue instance with an async_handler using the device returned by the DeviceSelector provided.

Parameters
DeviceSelectoris an instance of SYCL device selector.
AsyncHandleris a SYCL asynchronous exception handler.
PropListis a list of properties for queue construction.

Definition at line 131 of file queue.hpp.

◆ queue() [5/13]

cl::sycl::queue::queue ( const device SyclDevice,
const property_list PropList = {} 
)
inlineexplicit

Constructs a SYCL queue instance using the device provided.

Parameters
SyclDeviceis an instance of SYCL device.
PropListis a list of properties for queue construction.

Definition at line 139 of file queue.hpp.

◆ queue() [6/13]

cl::sycl::queue::queue ( const device SyclDevice,
const async_handler AsyncHandler,
const property_list PropList = {} 
)
explicit

Constructs a SYCL queue instance with an async_handler using the device provided.

Parameters
SyclDeviceis an instance of SYCL device.
AsyncHandleris a SYCL asynchronous exception handler.
PropListis a list of properties for queue construction.

Definition at line 45 of file queue.cpp.

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

◆ queue() [7/13]

cl::sycl::queue::queue ( const context SyclContext,
const device_selector DeviceSelector,
const property_list PropList = {} 
)

Constructs a SYCL queue instance that is associated with the context provided, using the device returned by the device selector.

Parameters
SyclContextis an instance of SYCL context.
DeviceSelectoris an instance of SYCL device selector.
PropListis a list of properties for queue construction.

Definition at line 58 of file queue.cpp.

◆ queue() [8/13]

cl::sycl::queue::queue ( const context SyclContext,
const device_selector DeviceSelector,
const async_handler AsyncHandler,
const property_list PropList = {} 
)

Constructs a SYCL queue instance with an async_handler that is associated with the context provided, using the device returned by the device selector.

Parameters
SyclContextis an instance of SYCL context.
DeviceSelectoris an instance of SYCL device selector.
AsyncHandleris a SYCL asynchronous exception handler.
PropListis a list of properties for queue construction.

Definition at line 22 of file queue.cpp.

References cl::sycl::context::get_devices(), and cl::sycl::detail::getSyclObjImpl().

◆ queue() [9/13]

cl::sycl::queue::queue ( const context SyclContext,
const device SyclDevice,
const property_list PropList = {} 
)

Constructs a SYCL queue associated with the given context, device and optional properties list.

Parameters
SyclContextis an instance of SYCL context.
SyclDeviceis an instance of SYCL device.
PropListis a list of properties for queue construction.

Definition at line 64 of file queue.cpp.

◆ queue() [10/13]

cl::sycl::queue::queue ( const context SyclContext,
const device SyclDevice,
const async_handler AsyncHandler,
const property_list PropList = {} 
)

Constructs a SYCL queue associated with the given context, device, asynchronous exception handler and optional properties list.

Parameters
SyclContextis an instance of SYCL context.
SyclDeviceis an instance of SYCL device.
AsyncHandleris a SYCL asynchronous exception handler.
PropListis a list of properties for queue construction.

Definition at line 38 of file queue.cpp.

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

◆ queue() [11/13]

cl::sycl::queue::queue ( cl_command_queue  ClQueue,
const context SyclContext,
const async_handler AsyncHandler = {} 
)

Constructs a SYCL queue with an optional async_handler from an OpenCL cl_command_queue.

The instance of cl_command_queue is retained on construction.

Parameters
ClQueueis a valid instance of OpenCL queue.
SyclContextis a valid SYCL context.
AsyncHandleris a SYCL asynchronous exception handler.

Definition at line 51 of file queue.cpp.

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

◆ queue() [12/13]

cl::sycl::queue::queue ( const queue RHS)
default

◆ queue() [13/13]

cl::sycl::queue::queue ( queue &&  RHS)
default

Member Function Documentation

◆ copy() [1/3]

template<typename T >
event cl::sycl::queue::copy ( const T Src,
T Dest,
size_t  Count 
)
inline

Copies data from one memory region to another, both pointed by USM pointers.

No operations is done if

Parameters
Countis zero. An exception is thrown if either
Destor
Srcis nullptr. The behavior is undefined if any of the pointer parameters is invalid.
Srcis a USM pointer to the source memory.
Destis a USM pointer to the destination memory.
Countis a number of elements of type T to copy.
Returns
an event representing copy operation.

Definition at line 549 of file queue.hpp.

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

◆ copy() [2/3]

template<typename T >
event cl::sycl::queue::copy ( const T Src,
T Dest,
size_t  Count,
const std::vector< event > &  DepEvents 
)
inline

Copies data from one memory region to another, both pointed by USM pointers.

No operations is done if

Parameters
Countis zero. An exception is thrown if either
Destor
Srcis nullptr. The behavior is undefined if any of the pointer parameters is invalid.
Srcis a USM pointer to the source memory.
Destis a USM pointer to the destination memory.
Countis a number of elements of type T to copy.
DepEventsis a vector of events that specifies the kernel
Returns
an event representing copy operation.

Definition at line 581 of file queue.hpp.

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

◆ copy() [3/3]

template<typename T >
event cl::sycl::queue::copy ( const T Src,
T Dest,
size_t  Count,
event  DepEvent 
)
inline

Copies data from one memory region to another, both pointed by USM pointers.

No operations is done if

Parameters
Countis zero. An exception is thrown if either
Destor
Srcis nullptr. The behavior is undefined if any of the pointer parameters is invalid.
Srcis a USM pointer to the source memory.
Destis a USM pointer to the destination memory.
Countis a number of elements of type T to copy.
DepEventis an event that specifies the kernel dependencies.
Returns
an event representing copy operation.

Definition at line 565 of file queue.hpp.

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

◆ device_has()

bool cl::sycl::queue::device_has ( aspect  Aspect) const

Definition at line 195 of file queue.cpp.

◆ ext_oneapi_submit_barrier() [1/2]

event cl::sycl::queue::ext_oneapi_submit_barrier ( _CODELOCONLYPARAM CodeLoc)
inline

Prevents any commands submitted afterward to this queue from executing until all commands previously submitted to this queue have entered the complete state.

Parameters
CodeLocis the code location of the submit call (default argument)
Returns
a SYCL event object, which corresponds to the queue the command group is being enqueued on.

Definition at line 319 of file queue.hpp.

References _CODELOCFW, and cl::sycl::handler::ext_oneapi_barrier().

◆ ext_oneapi_submit_barrier() [2/2]

event cl::sycl::queue::ext_oneapi_submit_barrier ( const std::vector< event > &WaitList _CODELOCPARAM CodeLoc)
inline

Prevents any commands submitted afterward to this queue from executing until all events in WaitList have entered the complete state.

If WaitList is empty, then ext_oneapi_submit_barrier has no effect.

Parameters
WaitListis a vector of valid SYCL events that need to complete before barrier command can be executed.
CodeLocis the code location of the submit call (default argument)
Returns
a SYCL event object, which corresponds to the queue the command group is being enqueued on.

Definition at line 346 of file queue.hpp.

References _CODELOCFW, and cl::sycl::handler::ext_oneapi_barrier().

◆ fill() [1/3]

template<typename T >
event cl::sycl::queue::fill ( void *  Ptr,
const T Pattern,
size_t  Count 
)
inline

Fills the specified memory with the specified pattern.

Parameters
Ptris the pointer to the memory to fill.
Patternis the pattern to fill into the memory. T should be trivially copyable.
Countis the number of times to fill Pattern into Ptr.
Returns
an event representing fill operation.

Definition at line 424 of file queue.hpp.

References cl::sycl::handler::fill().

◆ fill() [2/3]

template<typename T >
event cl::sycl::queue::fill ( void *  Ptr,
const T Pattern,
size_t  Count,
const std::vector< event > &  DepEvents 
)
inline

Fills the specified memory with the specified pattern.

Parameters
Ptris the pointer to the memory to fill.
Patternis the pattern to fill into the memory. T should be trivially copyable.
Countis the number of times to fill Pattern into Ptr.
DepEventsis a vector of events that specifies the kernel dependencies.
Returns
an event representing fill operation.

Definition at line 454 of file queue.hpp.

References cl::sycl::handler::depends_on(), and cl::sycl::handler::fill().

◆ fill() [3/3]

template<typename T >
event cl::sycl::queue::fill ( void *  Ptr,
const T Pattern,
size_t  Count,
event  DepEvent 
)
inline

Fills the specified memory with the specified pattern.

Parameters
Ptris the pointer to the memory to fill.
Patternis the pattern to fill into the memory. T should be trivially copyable.
Countis the number of times to fill Pattern into Ptr.
DepEventis an event that specifies the kernel dependencies.
Returns
an event representing fill operation.

Definition at line 437 of file queue.hpp.

References cl::sycl::handler::depends_on(), and cl::sycl::handler::fill().

◆ get()

cl_command_queue cl::sycl::queue::get ( ) const
Returns
a valid instance of OpenCL queue, which is retained before being returned.

Definition at line 70 of file queue.cpp.

◆ get_backend()

backend cl::sycl::queue::get_backend ( ) const
noexcept

Returns the backend associated with this queue.

Returns
the backend associated with this queue.

Definition at line 187 of file queue.cpp.

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

◆ get_context()

◆ get_device()

device cl::sycl::queue::get_device ( ) const
Returns
SYCL device this queue was constructed with.

Definition at line 74 of file queue.cpp.

Referenced by cl::sycl::aligned_alloc(), cl::sycl::aligned_alloc_device(), cl::sycl::aligned_alloc_shared(), cl::sycl::malloc(), cl::sycl::malloc_device(), and cl::sycl::malloc_shared().

◆ get_info()

template<info::queue Param>
info::param_traits< info::queue, Param >::return_type cl::sycl::queue::get_info

Queries SYCL queue for information.

The return type depends on information being queried.

Definition at line 158 of file queue.cpp.

◆ get_native()

template<backend BackendName>
auto cl::sycl::queue::get_native ( ) const -> typename interop<BackendName, queue>::type
inline

Gets the native handle of the SYCL queue.

Returns
a native handle, the type of which defined by the backend.

Definition at line 1028 of file queue.hpp.

◆ get_property()

template<typename PropertyT >
PropertyT cl::sycl::queue::get_property
Returns
a copy of the property of type PropertyT that the queue was constructed with. If the queue was not constructed with the PropertyT property, an invalid_object_error SYCL exception.

Definition at line 174 of file queue.cpp.

◆ has_property()

template<typename PropertyT >
bool cl::sycl::queue::has_property
Returns
true if the queue was constructed with property specified by PropertyT.

Definition at line 170 of file queue.cpp.

◆ is_host()

bool cl::sycl::queue::is_host ( ) const
Returns
true if this queue is a SYCL host queue.

Definition at line 76 of file queue.cpp.

◆ is_in_order()

bool cl::sycl::queue::is_in_order ( ) const

Returns whether the queue is in order or OoO.

Equivalent to has_property<property::queue::in_order>()

Definition at line 183 of file queue.cpp.

◆ mem_advise() [1/4]

event cl::sycl::queue::mem_advise ( const void *  Ptr,
size_t  Length,
int  Advice 
)

Provides additional information to the underlying runtime about how different allocations are used.

Parameters
Ptris a USM pointer to the allocation.
Lengthis a number of bytes in the allocation.
Adviceis a device-defined advice for the specified allocation.
Returns
an event representing advice operation.

Definition at line 111 of file queue.cpp.

◆ mem_advise() [2/4]

event cl::sycl::queue::mem_advise ( const void *  Ptr,
size_t  Length,
int  Advice,
const std::vector< event > &  DepEvents 
)

Provides additional information to the underlying runtime about how different allocations are used.

Parameters
Ptris a USM pointer to the allocation.
Lengthis a number of bytes in the allocation.
Adviceis a device-defined advice for the specified allocation.
DepEventsis a vector of events that specifies the kernel dependencies.
Returns
an event representing advice operation.

Definition at line 120 of file queue.cpp.

◆ mem_advise() [3/4]

event cl::sycl::queue::mem_advise ( const void *  Ptr,
size_t  Length,
int  Advice,
event  DepEvent 
)

Provides additional information to the underlying runtime about how different allocations are used.

Parameters
Ptris a USM pointer to the allocation.
Lengthis a number of bytes in the allocation.
Adviceis a device-defined advice for the specified allocation.
DepEventis an event that specifies the kernel dependencies.
Returns
an event representing advice operation.

Definition at line 115 of file queue.cpp.

◆ mem_advise() [4/4]

event cl::sycl::queue::mem_advise ( const void *  Ptr,
size_t  Length,
pi_mem_advice  Advice 
)

Provides additional information to the underlying runtime about how different allocations are used.

Parameters
Ptris a USM pointer to the allocation.
Lengthis a number of bytes in the allocation.
Adviceis a device-defined advice for the specified allocation.
Returns
an event representing advice operation.

Definition at line 107 of file queue.cpp.

◆ memcpy() [1/3]

event cl::sycl::queue::memcpy ( void *  Dest,
const void *  Src,
size_t  Count 
)

Copies data from one memory region to another, both pointed by USM pointers.

No operations is done if

Parameters
Countis zero. An exception is thrown if either
Destor
Srcis nullptr. The behavior is undefined if any of the pointer parameters is invalid.
Destis a USM pointer to the destination memory.
Srcis a USM pointer to the source memory.
Countis a number of bytes to copy.
Returns
an event representing copy operation.

Definition at line 94 of file queue.cpp.

◆ memcpy() [2/3]

event cl::sycl::queue::memcpy ( void *  Dest,
const void *  Src,
size_t  Count,
const std::vector< event > &  DepEvents 
)

Copies data from one memory region to another, both pointed by USM pointers.

No operations is done if

Parameters
Countis zero. An exception is thrown if either
Destor
Srcis nullptr. The behavior is undefined if any of the pointer parameters is invalid.
Destis a USM pointer to the destination memory.
Srcis a USM pointer to the source memory.
Countis a number of bytes to copy.
DepEventsis a vector of events that specifies the kernel dependencies.
Returns
an event representing copy operation.

Definition at line 102 of file queue.cpp.

◆ memcpy() [3/3]

event cl::sycl::queue::memcpy ( void *  Dest,
const void *  Src,
size_t  Count,
event  DepEvent 
)

Copies data from one memory region to another, both pointed by USM pointers.

No operations is done if

Parameters
Countis zero. An exception is thrown if either
Destor
Srcis nullptr. The behavior is undefined if any of the pointer parameters is invalid.
Destis a USM pointer to the destination memory.
Srcis a USM pointer to the source memory.
Countis a number of bytes to copy.
DepEventis an event that specifies the kernel dependencies.
Returns
an event representing copy operation.

Definition at line 98 of file queue.cpp.

◆ memset() [1/3]

event cl::sycl::queue::memset ( void *  Ptr,
int  Value,
size_t  Count 
)

Fills the memory pointed by a USM pointer with the value specified.

No operations is done if

Parameters
Countis zero. An exception is thrown if
Ptris nullptr. The behavior is undefined if
Ptris invalid.
Ptris a USM pointer to the memory to fill.
Valueis a value to be set. Value is cast as an unsigned char.
Countis a number of bytes to fill.
Returns
an event representing fill operation.

Definition at line 81 of file queue.cpp.

◆ memset() [2/3]

event cl::sycl::queue::memset ( void *  Ptr,
int  Value,
size_t  Count,
const std::vector< event > &  DepEvents 
)

Fills the memory pointed by a USM pointer with the value specified.

No operations is done if

Parameters
Countis zero. An exception is thrown if
Ptris nullptr. The behavior is undefined if
Ptris invalid.
Ptris a USM pointer to the memory to fill.
Valueis a value to be set. Value is cast as an unsigned char.
Countis a number of bytes to fill.
DepEventsis a vector of events that specifies the kernel dependencies.
Returns
an event representing fill operation.

Definition at line 89 of file queue.cpp.

◆ memset() [3/3]

event cl::sycl::queue::memset ( void *  Ptr,
int  Value,
size_t  Count,
event  DepEvent 
)

Fills the memory pointed by a USM pointer with the value specified.

No operations is done if

Parameters
Countis zero. An exception is thrown if
Ptris nullptr. The behavior is undefined if
Ptris invalid.
Ptris a USM pointer to the memory to fill.
Valueis a value to be set. Value is cast as an unsigned char.
Countis a number of bytes to fill.
DepEventis an event that specifies the kernel dependencies.
Returns
an event representing fill operation.

Definition at line 85 of file queue.cpp.

◆ operator!=()

bool cl::sycl::queue::operator!= ( const queue RHS) const
inline

Definition at line 212 of file queue.hpp.

◆ operator=() [1/2]

queue& cl::sycl::queue::operator= ( const queue RHS)
default

◆ operator=() [2/2]

queue& cl::sycl::queue::operator= ( queue &&  RHS)
default

◆ operator==()

bool cl::sycl::queue::operator== ( const queue RHS) const
inline

Definition at line 210 of file queue.hpp.

◆ parallel_for() [1/16]

template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event cl::sycl::queue::parallel_for ( nd_range< Dims >  ExecutionRange,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + nd_range that specifies global, local sizes and offset.

Parameters
ExecutionRangeis a range that specifies the work space of the kernel
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 928 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [2/16]

template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event cl::sycl::queue::parallel_for ( nd_range< Dims >  ExecutionRange,
const std::vector< event > &  DepEvents,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + nd_range that specifies global, local sizes and offset.

Parameters
ExecutionRangeis a range that specifies the work space of the kernel
DepEventsis a vector of events that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 972 of file queue.hpp.

References _CODELOCARG, and cl::sycl::handler::depends_on().

◆ parallel_for() [3/16]

template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event cl::sycl::queue::parallel_for ( nd_range< Dims >  ExecutionRange,
event  DepEvent,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + nd_range that specifies global, local sizes and offset.

Parameters
ExecutionRangeis a range that specifies the work space of the kernel
DepEventis an event that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 949 of file queue.hpp.

References _CODELOCARG, and cl::sycl::handler::depends_on().

◆ parallel_for() [4/16]

template<typename KernelName = detail::auto_name, typename KernelType , int Dims, typename Reduction >
event cl::sycl::queue::parallel_for ( nd_range< Dims >  ExecutionRange,
Reduction  Redu,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + nd_range that specifies global, local sizes and offset.

Parameters
ExecutionRangeis a range that specifies the work space of the kernel
Reduis a reduction operation
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 995 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [5/16]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::parallel_for ( range< 1 >  NumWorkItems,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range that specifies global size only.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 727 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [6/16]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::parallel_for ( range< 1 >  NumWorkItems,
const std::vector< event > &  DepEvents,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range that specifies global size only.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
DepEventsis a vector of events that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 813 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [7/16]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::parallel_for ( range< 1 >  NumWorkItems,
event  DepEvent,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range that specifies global size only.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
DepEventis an event that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 767 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [8/16]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::parallel_for ( range< 2 >  NumWorkItems,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range that specifies global size only.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 740 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [9/16]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::parallel_for ( range< 2 >  NumWorkItems,
const std::vector< event > &  DepEvents,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range that specifies global size only.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
DepEventsis a vector of events that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 829 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [10/16]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::parallel_for ( range< 2 >  NumWorkItems,
event  DepEvent,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range that specifies global size only.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
DepEventis an event that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 782 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [11/16]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::parallel_for ( range< 3 >  NumWorkItems,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range that specifies global size only.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 753 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [12/16]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::parallel_for ( range< 3 >  NumWorkItems,
const std::vector< event > &  DepEvents,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range that specifies global size only.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
DepEventsis a vector of events that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 845 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [13/16]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::parallel_for ( range< 3 >  NumWorkItems,
event  DepEvent,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range that specifies global size only.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
DepEventis an event that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 797 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [14/16]

template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event cl::sycl::queue::parallel_for ( range< Dims >  NumWorkItems,
id< Dims >  WorkItemOffset,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range and offset that specify global size and global offset correspondingly.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
WorkItemOffsetspecifies the offset for each work item id
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 861 of file queue.hpp.

References _CODELOCARG.

◆ parallel_for() [15/16]

template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event cl::sycl::queue::parallel_for ( range< Dims >  NumWorkItems,
id< Dims >  WorkItemOffset,
const std::vector< event > &  DepEvents,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range and offset that specify global size and global offset correspondingly.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
WorkItemOffsetspecifies the offset for each work item id
DepEventsis a vector of events that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 906 of file queue.hpp.

References _CODELOCARG, and cl::sycl::handler::depends_on().

◆ parallel_for() [16/16]

template<typename KernelName = detail::auto_name, typename KernelType , int Dims>
event cl::sycl::queue::parallel_for ( range< Dims >  NumWorkItems,
id< Dims >  WorkItemOffset,
event  DepEvent,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

parallel_for version with a kernel represented as a lambda + range and offset that specify global size and global offset correspondingly.

Parameters
NumWorkItemsis a range that specifies the work space of the kernel
WorkItemOffsetspecifies the offset for each work item id
DepEventis an event that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 882 of file queue.hpp.

References _CODELOCARG, and cl::sycl::handler::depends_on().

◆ prefetch() [1/3]

event cl::sycl::queue::prefetch ( const void *  Ptr,
size_t  Count 
)
inline

Provides hints to the runtime library that data should be made available on a device earlier than Unified Shared Memory would normally require it to be available.

Parameters
Ptris a USM pointer to the memory to be prefetched to the device.
Countis a number of bytes to be prefetched.
Returns
an event representing prefetch operation.

Definition at line 634 of file queue.hpp.

References cl::sycl::handler::prefetch().

◆ prefetch() [2/3]

event cl::sycl::queue::prefetch ( const void *  Ptr,
size_t  Count,
const std::vector< event > &  DepEvents 
)
inline

Provides hints to the runtime library that data should be made available on a device earlier than Unified Shared Memory would normally require it to be available.

Parameters
Ptris a USM pointer to the memory to be prefetched to the device.
Countis a number of bytes to be prefetched.
DepEventsis a vector of events that specifies the kernel dependencies.
Returns
an event representing prefetch operation.

Definition at line 662 of file queue.hpp.

References cl::sycl::handler::depends_on(), and cl::sycl::handler::prefetch().

◆ prefetch() [3/3]

event cl::sycl::queue::prefetch ( const void *  Ptr,
size_t  Count,
event  DepEvent 
)
inline

Provides hints to the runtime library that data should be made available on a device earlier than Unified Shared Memory would normally require it to be available.

Parameters
Ptris a USM pointer to the memory to be prefetched to the device.
Countis a number of bytes to be prefetched.
DepEventis an event that specifies the kernel dependencies.
Returns
an event representing prefetch operation.

Definition at line 646 of file queue.hpp.

References cl::sycl::handler::depends_on(), and cl::sycl::handler::prefetch().

◆ single_task() [1/3]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::single_task ( _KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc)
inline

single_task version with a kernel represented as a lambda.

Parameters
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 675 of file queue.hpp.

References _CODELOCARG.

◆ single_task() [2/3]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::single_task ( const std::vector< event > &  DepEvents,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

single_task version with a kernel represented as a lambda.

Parameters
DepEventsis a vector of events that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 709 of file queue.hpp.

References _CODELOCARG, and cl::sycl::handler::depends_on().

◆ single_task() [3/3]

template<typename KernelName = detail::auto_name, typename KernelType >
event cl::sycl::queue::single_task ( event  DepEvent,
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM CodeLoc 
)
inline

single_task version with a kernel represented as a lambda.

Parameters
DepEventis an event that specifies the kernel dependencies
KernelFuncis the Kernel functor or lambda
CodeLoccontains the code location of user code

Definition at line 691 of file queue.hpp.

References _CODELOCARG, and cl::sycl::handler::depends_on().

◆ submit() [1/2]

template<typename T >
event cl::sycl::queue::submit ( T CGF _CODELOCPARAM CodeLoc)
inline

Submits a command group function object to the queue, in order to be scheduled for execution on the device.

Parameters
CGFis a function object containing command group.
CodeLocis the code location of the submit call (default argument)
Returns
a SYCL event object for the submitted command group.

Definition at line 245 of file queue.hpp.

References _CODELOCARG, and cl::sycl::detail::submitAssertCapture().

◆ submit() [2/2]

template<typename T >
event cl::sycl::queue::submit ( T  CGF,
queue &SecondaryQueue _CODELOCPARAM CodeLoc 
)
inline

Submits a command group function object to the queue, in order to be scheduled for execution on the device.

On a kernel error, this command group function object is then scheduled for execution on a secondary queue.

Parameters
CGFis a function object containing command group.
SecondaryQueueis a fallback SYCL queue.
CodeLocis the code location of the submit call (default argument)
Returns
a SYCL event object, which corresponds to the queue the command group is being enqueued on.

Definition at line 286 of file queue.hpp.

References _CODELOCARG, and cl::sycl::detail::submitAssertCapture().

◆ submit_barrier() [1/2]

event cl::sycl::queue::submit_barrier ( _CODELOCONLYPARAM CodeLoc)
inline

Prevents any commands submitted afterward to this queue from executing until all commands previously submitted to this queue have entered the complete state.

Parameters
CodeLocis the code location of the submit call (default argument)
Returns
a SYCL event object, which corresponds to the queue the command group is being enqueued on.

Definition at line 332 of file queue.hpp.

References _CODELOCARG.

◆ submit_barrier() [2/2]

event cl::sycl::queue::submit_barrier ( const std::vector< event > &WaitList _CODELOCPARAM CodeLoc)
inline

Prevents any commands submitted afterward to this queue from executing until all events in WaitList have entered the complete state.

If WaitList is empty, then submit_barrier has no effect.

Parameters
WaitListis a vector of valid SYCL events that need to complete before barrier command can be executed.
CodeLocis the code location of the submit call (default argument)
Returns
a SYCL event object, which corresponds to the queue the command group is being enqueued on.

Definition at line 364 of file queue.hpp.

References _CODELOCARG.

◆ throw_asynchronous()

void cl::sycl::queue::throw_asynchronous ( )

Checks if any asynchronous errors have been produced by the queue and if so reports them to the async_handler passed on the queue construction.

If no async_handler was provided then asynchronous exceptions will be lost.

Definition at line 79 of file queue.cpp.

◆ wait()

void cl::sycl::queue::wait ( _CODELOCONLYPARAM CodeLoc)
inline

Performs a blocking wait for the completion of all enqueued tasks in the queue.

Synchronous errors will be reported through SYCL exceptions.

Parameters
CodeLocis the code location of the submit call (default argument)

Definition at line 374 of file queue.hpp.

References _CODELOCARG.

◆ wait_and_throw()

void cl::sycl::queue::wait_and_throw ( _CODELOCONLYPARAM CodeLoc)
inline

Performs a blocking wait for the completion of all enqueued tasks in the queue.

Synchronous errors will be reported through SYCL exceptions. Asynchronous errors will be passed to the async_handler passed to the queue on construction. If no async_handler was provided then asynchronous exceptions will be lost.

Parameters
CodeLocis the code location of the submit call (default argument)

Definition at line 388 of file queue.hpp.

References _CODELOCARG.

◆ wait_and_throw_proxy()

void cl::sycl::queue::wait_and_throw_proxy ( const detail::code_location CodeLoc)

Proxy method for wait_and_throw to forward the code location information to the implementation.

Definition at line 152 of file queue.cpp.

◆ wait_proxy()

void cl::sycl::queue::wait_proxy ( const detail::code_location CodeLoc)

Proxy method for wait to forward the code location information to the implementation.

Definition at line 148 of file queue.cpp.

Friends And Related Function Documentation

◆ detail::createSyclObjFromImpl

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

◆ detail::submitAssertCapture

event detail::submitAssertCapture ( queue ,
event ,
queue ,
const detail::code_location  
)
friend

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