.. index:: pair: group; Queue class C wrapper .. _doxid-d2/d22/group___queue_interface: Queue class C wrapper ===================== .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block // global functions :ref:`DPCTL_API` bool :ref:`DPCTLQueue_AreEq`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef1, :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef2 ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclQueueRef` :ref:`DPCTLQueue_Copy`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclQueueRef` :ref:`DPCTLQueue_Create`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclContextRef` CRef, :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, :ref:`error_handler_callback`* handler, int properties ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclQueueRef` :ref:`DPCTLQueue_CreateForDevice`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, :ref:`error_handler_callback`* handler, int properties ); :ref:`DPCTL_API` void :ref:`DPCTLQueue_Delete`(:ref:`__dpctl_take` :ref:`DPCTLSyclQueueRef` QRef); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_Fill128`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint64_t* Value, size_t Count ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_Fill16`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint16_t Value, size_t Count ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_Fill32`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint32_t Value, size_t Count ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_Fill64`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint64_t Value, size_t Count ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_Fill8`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint8_t Value, size_t Count ); :ref:`DPCTL_API` :ref:`DPCTLSyclBackendType` :ref:`DPCTLQueue_GetBackend`(:ref:`__dpctl_keep` :ref:`DPCTLSyclQueueRef` QRef); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclContextRef` :ref:`DPCTLQueue_GetContext`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclDeviceRef` :ref:`DPCTLQueue_GetDevice`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef); :ref:`DPCTL_API` bool :ref:`DPCTLQueue_HasEnableProfiling`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef); :ref:`DPCTL_API` size_t :ref:`DPCTLQueue_Hash`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef); :ref:`DPCTL_API` bool :ref:`DPCTLQueue_IsInOrder`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_MemAdvise`( :ref:`__dpctl_keep` :ref:`DPCTLSyclQueueRef` QRef, const void* Ptr, size_t Count, int Advice ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_Memcpy`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* Dest, const void* Src, size_t Count ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_MemcpyWithEvents`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* Dest, const void* Src, size_t Count, :ref:`__dpctl_keep` const :ref:`DPCTLSyclEventRef`* DepEvents, size_t DepEventsCount ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_Memset`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint8_t Value, size_t Count ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_Prefetch`( :ref:`__dpctl_keep` :ref:`DPCTLSyclQueueRef` QRef, const void* Ptr, size_t Count ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_SubmitNDRange`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclKernelRef` KRef, :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, :ref:`__dpctl_keep` void** Args, :ref:`__dpctl_keep` const :ref:`DPCTLKernelArgType`* ArgTypes, size_t NArgs, :ref:`__dpctl_keep` const size_t gRange[3], :ref:`__dpctl_keep` const size_t lRange[3], size_t NDims, :ref:`__dpctl_keep` const :ref:`DPCTLSyclEventRef`* DepEvents, size_t NDepEvents ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` :ref:`DPCTLQueue_SubmitRange`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclKernelRef` KRef, :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, :ref:`__dpctl_keep` void** Args, :ref:`__dpctl_keep` const :ref:`DPCTLKernelArgType`* ArgTypes, size_t NArgs, :ref:`__dpctl_keep` const size_t Range[3], size_t NRange, :ref:`__dpctl_keep` const :ref:`DPCTLSyclEventRef`* DepEvents, size_t NDepEvents ); :ref:`DPCTL_API` void :ref:`DPCTLQueue_Wait`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef); .. _details-d2/d22/group___queue_interface: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; DPCTLQueue_AreEq .. _doxid-d2/d22/group___queue_interface_1ga8a957bd257ec77b0f57bcb3c35e1e479: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` bool DPCTLQueue_AreEq( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef1, :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef2 ) Checks if two DPCTLSyclQueueRef objects point to the same ``sycl::queue``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef1 - First opaque pointer to the ``sycl::queue``. * - QRef2 - Second opaque pointer to the ``sycl::queue``. .. rubric:: Returns: True if the underlying sycl::queue are same, false otherwise. .. index:: pair: function; DPCTLQueue_Copy .. _doxid-d2/d22/group___queue_interface_1gad8d2312b954460ad658b2f1080c0dee3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclQueueRef` DPCTLQueue_Copy(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef) Returns a copy of the DPCTLSyclQueueRef object. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - DPCTLSyclQueueRef object to be copied. .. rubric:: Returns: A new DPCTLSyclQueueRef created by copying the passed in DPCTLSyclQueueRef object. .. index:: pair: function; DPCTLQueue_Create .. _doxid-d2/d22/group___queue_interface_1gaffc0932f21ca4be9ef6ffa6626d1ee0d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclQueueRef` DPCTLQueue_Create( :ref:`__dpctl_keep` const :ref:`DPCTLSyclContextRef` CRef, :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, :ref:`error_handler_callback`* handler, int properties ) A wrapper for sycl::queue constructor to construct a new queue from the provided context, device, async handler and properties bit flags. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - CRef - An opaque pointer to a sycl::context. * - DRef - An opaque pointer to a sycl::device * - handler - A callback function that will be invoked by the async_handler used during queue creation. Can be NULL if no async_handler is needed. * - properties - A combination of bit flags using the values defined in the DPCTLQueuePropertyType enum. The bit flags are used to create a sycl::property_list that is passed to the SYCL queue constructor. .. rubric:: Returns: An opaque DPCTLSyclQueueRef pointer containing the new sycl::queue object. A nullptr is returned if the queue could not be created. .. index:: pair: function; DPCTLQueue_CreateForDevice .. _doxid-d2/d22/group___queue_interface_1ga2d6224731198dee2f6821f408066d0fa: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclQueueRef` DPCTLQueue_CreateForDevice( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, :ref:`error_handler_callback`* handler, int properties ) Constructs a ``sycl::queue`` object of the specified SYCL device. Constructs a new SYCL queue for the specified SYCL device. The behavior of this function differs from the following queue constructor: .. ref-code-block:: cpp queue( const device &syclDevice, const async_handler &asyncHandler, const property_list &propList = {} ) Unlike the SYCL queue constructor, we try not to create a new SYCL context for the device and instead look to reuse a previously cached SYCL context for the device (refer dpctl_sycl_device_manager.cpp). DPCTL caches contexts only for root devices and for all custom devices the function behaves the same way as the SYCL constructor. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - An opaque pointer to a ``sycl::device``. * - handler - A callback function that will be invoked by the async_handler used during queue creation. Can be NULL if no async_handler is needed. * - properties - A combination of bit flags using the values defined in the DPCTLQueuePropertyType enum. The bit flags are used to create a ``sycl::property_list`` that is passed to the SYCL queue constructor. .. rubric:: Returns: An opaque DPCTLSyclQueueRef pointer containing the new ``sycl::queue`` object. A nullptr is returned if the queue could not be created. .. index:: pair: function; DPCTLQueue_Delete .. _doxid-d2/d22/group___queue_interface_1ga44557847663338a67f423a06ecf9192a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` void DPCTLQueue_Delete(:ref:`__dpctl_take` :ref:`DPCTLSyclQueueRef` QRef) Delete the pointer after casting it to sycl::queue. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - A DPCTLSyclQueueRef pointer that gets deleted. .. index:: pair: function; DPCTLQueue_Fill128 .. _doxid-d2/d22/group___queue_interface_1gaaa78d08b30ca33c9b76eaee19d591f11: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_Fill128( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint64_t* Value, size_t Count ) C-API wrapper for ``sycl::queue::fill``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. * - USMRef - An USM pointer to the memory to fill. * - Value - A pointer to uint64_t array of 2 elements with value to fill. * - Count - A number of 128-bit elements to fill. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue::fill`` function. .. index:: pair: function; DPCTLQueue_Fill16 .. _doxid-d2/d22/group___queue_interface_1ga75e628ef0f3949fbc136ddd1d682455d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_Fill16( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint16_t Value, size_t Count ) C-API wrapper for ``sycl::queue::fill``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. * - USMRef - An USM pointer to the memory to fill. * - Value - A uint16_t value to fill. * - Count - A number of uint16_t elements to fill. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue::fill`` function. .. index:: pair: function; DPCTLQueue_Fill32 .. _doxid-d2/d22/group___queue_interface_1gab94d7bf045ac1dd4e7b911e5cd83697c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_Fill32( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint32_t Value, size_t Count ) C-API wrapper for ``sycl::queue::fill``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. * - USMRef - An USM pointer to the memory to fill. * - Value - A uint32_t value to fill. * - Count - A number of uint32_t elements to fill. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue::fill`` function. .. index:: pair: function; DPCTLQueue_Fill64 .. _doxid-d2/d22/group___queue_interface_1gadfd2d9643f185440a19a6607d2860e05: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_Fill64( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint64_t Value, size_t Count ) C-API wrapper for ``sycl::queue::fill``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. * - USMRef - An USM pointer to the memory to fill. * - Value - A uint64_t value to fill. * - Count - A number of uint64_t elements to fill. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue::fill`` function. .. index:: pair: function; DPCTLQueue_Fill8 .. _doxid-d2/d22/group___queue_interface_1ga73815389ece90cbc68bc05245028f0f0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_Fill8( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint8_t Value, size_t Count ) C-API wrapper for ``sycl::queue::fill``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. * - USMRef - An USM pointer to the memory to fill. * - Value - A uint8_t value to fill. * - Count - A number of uint8_t elements to fill. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue::fill`` function. .. index:: pair: function; DPCTLQueue_GetBackend .. _doxid-d2/d22/group___queue_interface_1ga8c3629a8627e9748cdec34688f6ce908: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`DPCTLSyclBackendType` DPCTLQueue_GetBackend(:ref:`__dpctl_keep` :ref:`DPCTLSyclQueueRef` QRef) Returns the Sycl backend for the provided sycl::queue. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the sycl queue. .. rubric:: Returns: A enum DPCTLSyclBackendType corresponding to the backed for the queue. .. index:: pair: function; DPCTLQueue_GetContext .. _doxid-d2/d22/group___queue_interface_1gad11e27086f2cee7f3d22f33de1a24bc9: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclContextRef` DPCTLQueue_GetContext(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef) Returns the Sycl context for the queue. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the sycl queue. .. rubric:: Returns: A DPCTLSyclContextRef pointer to the sycl context for the queue. .. index:: pair: function; DPCTLQueue_GetDevice .. _doxid-d2/d22/group___queue_interface_1ga44095b28dfb5c357e6c065749e9aa8c0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclDeviceRef` DPCTLQueue_GetDevice(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef) returns the Sycl device for the queue. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the sycl queue. .. rubric:: Returns: A DPCTLSyclDeviceRef pointer to the sycl device for the queue. .. index:: pair: function; DPCTLQueue_HasEnableProfiling .. _doxid-d2/d22/group___queue_interface_1ga348ae09783aa4defd1eb864eb04418a2: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` bool DPCTLQueue_HasEnableProfiling(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef) C-API wrapper for sycl::queue::has_property() that indicates whether the referenced queue was constructed with this property. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. .. index:: pair: function; DPCTLQueue_Hash .. _doxid-d2/d22/group___queue_interface_1ga17f54699da3f3ab226cf8e3c9c57a7dc: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` size_t DPCTLQueue_Hash(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef) C-API wrapper for std::hash's operator(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. .. rubric:: Returns: Hash value of the underlying ``sycl::queue`` instance. .. index:: pair: function; DPCTLQueue_IsInOrder .. _doxid-d2/d22/group___queue_interface_1ga0738e262108a1ac8f43f227548724f07: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` bool DPCTLQueue_IsInOrder(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef) C-API wrapper for sycl::queue::is_in_order that indicates whether the referenced queue is in-order or out-of-order. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. .. index:: pair: function; DPCTLQueue_MemAdvise .. _doxid-d2/d22/group___queue_interface_1gae1c5fe85612e619887c355107210dc93: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_MemAdvise( :ref:`__dpctl_keep` :ref:`DPCTLSyclQueueRef` QRef, const void* Ptr, size_t Count, int Advice ) C-API wrapper for ``sycl::queue::mem_advise``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. * - Ptr - An USM pointer to memory. * - Count - A number of bytes to prefetch. * - Advice - Device-defined advice for the specified allocation. A value of 0 reverts the advice for Ptr to the default behavior. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue::mem_advise`` function. .. index:: pair: function; DPCTLQueue_Memcpy .. _doxid-d2/d22/group___queue_interface_1ga74cd7ea8c9b3ef38c043ce1c09d1b458: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_Memcpy( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* Dest, const void* Src, size_t Count ) C-API wrapper for ``sycl::queue::memcpy``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. * - Dest - An USM pointer to the destination memory. * - Src - An USM pointer to the source memory. * - Count - A number of bytes to copy. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue::memcpy`` function. .. index:: pair: function; DPCTLQueue_MemcpyWithEvents .. _doxid-d2/d22/group___queue_interface_1ga34c52bf71f359347136ea6e45d4a7754: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_MemcpyWithEvents( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* Dest, const void* Src, size_t Count, :ref:`__dpctl_keep` const :ref:`DPCTLSyclEventRef`* DepEvents, size_t DepEventsCount ) C-API wrapper for ``sycl::queue::memcpy``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. * - Dest - An USM pointer to the destination memory. * - Src - An USM pointer to the source memory. * - Count - A number of bytes to copy. * - DepEvents - A pointer to array of DPCTLSyclEventRef opaque pointers to dependent events. * - DepEventsCount - A number of dependent events. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue::memcpy`` function. .. index:: pair: function; DPCTLQueue_Memset .. _doxid-d2/d22/group___queue_interface_1ga263f4a51235b115732a1f088433241e6: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_Memset( :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, void* USMRef, uint8_t Value, size_t Count ) C-API wrapper for ``sycl::queue::memset``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. * - USMRef - An USM pointer to the memory to fill. * - Value - A value to fill. * - Count - A number of uint8_t elements to fill. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue::fill`` function. .. index:: pair: function; DPCTLQueue_Prefetch .. _doxid-d2/d22/group___queue_interface_1ga0a473cde9cee125781af03e42e81a153: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_Prefetch( :ref:`__dpctl_keep` :ref:`DPCTLSyclQueueRef` QRef, const void* Ptr, size_t Count ) C-API wrapper for ``sycl::queue::prefetch``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - An opaque pointer to the ``sycl::queue``. * - Ptr - An USM pointer to memory. * - Count - A number of bytes to prefetch. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue::prefetch`` function. .. index:: pair: function; DPCTLQueue_SubmitNDRange .. _doxid-d2/d22/group___queue_interface_1ga94b6312555d533998e46c9ad312bda8e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_SubmitNDRange( :ref:`__dpctl_keep` const :ref:`DPCTLSyclKernelRef` KRef, :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, :ref:`__dpctl_keep` void** Args, :ref:`__dpctl_keep` const :ref:`DPCTLKernelArgType`* ArgTypes, size_t NArgs, :ref:`__dpctl_keep` const size_t gRange[3], :ref:`__dpctl_keep` const size_t lRange[3], size_t NDims, :ref:`__dpctl_keep` const :ref:`DPCTLSyclEventRef`* DepEvents, size_t NDepEvents ) Submits the kernel to the specified queue with the provided nd_range argument. A wrapper over ``sycl::queue.submit()``. The function takes an interoperability kernel, the kernel arguments, and a Sycl queue as input. The kernel is submitted as ``parallel_for(nd_range, *unwrap(KRef))``. Todo sycl::buffer arguments are not supported yet. Add support for id WorkItemOffset .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - KRef - Opaque pointer to an OpenCL interoperability kernel wrapped inside a sycl::kernel. * - QRef - Opaque pointer to the sycl::queue where the kernel will be enqueued. * - Args - An array of void\* pointers that represent the kernel arguments for the kernel. * - ArgTypes - An array of DPCTLKernelArgType enum values that represent the type of each kernel argument. * - NArgs - Size of Args. * - gRange - Defines the overall dimension of the dispatch for the kernel. The array can have up to three dimensions. * - lRange - Defines the iteration domain of a single work-group in a parallel dispatch. The array can have up to three dimensions. * - NDims - The number of dimensions for both local and global ranges. * - DepEvents - List of dependent DPCTLSyclEventRef objects (events) for the kernel. We call ``sycl::handler.depends_on`` for each of the provided events. * - NDepEvents - Size of the DepEvents list. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue.submit()`` function. .. index:: pair: function; DPCTLQueue_SubmitRange .. _doxid-d2/d22/group___queue_interface_1ga31ae37a405b585b26e10101d13283c62: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclEventRef` DPCTLQueue_SubmitRange( :ref:`__dpctl_keep` const :ref:`DPCTLSyclKernelRef` KRef, :ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef, :ref:`__dpctl_keep` void** Args, :ref:`__dpctl_keep` const :ref:`DPCTLKernelArgType`* ArgTypes, size_t NArgs, :ref:`__dpctl_keep` const size_t Range[3], size_t NRange, :ref:`__dpctl_keep` const :ref:`DPCTLSyclEventRef`* DepEvents, size_t NDepEvents ) Submits the kernel to the specified queue with the provided range argument. A wrapper over ``sycl::queue.submit()``. The function takes an interoperability kernel, the kernel arguments, and a ``sycl::queue`` as input. The kernel is submitted as ``parallel_for(range, *unwrap(KRef))``. Todo ``sycl::buffer`` arguments are not supported yet. Add support for id WorkItemOffset .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - KRef - Opaque pointer to an OpenCL interoperability kernel wrapped inside a sycl::kernel. * - QRef - Opaque pointer to the sycl::queue where the kernel will be enqueued. * - Args - An array of void\* pointers that represent the kernel arguments for the kernel. * - ArgTypes - An array of DPCTLKernelArgType enum values that represent the type of each kernel argument. * - NArgs - Size of Args and ArgTypes. * - Range - Defines the overall dimension of the dispatch for the kernel. The array can have up to three dimensions. * - NRange - Size of the gRange array. * - DepEvents - List of dependent DPCTLSyclEventRef objects (events) for the kernel. We call ``sycl::handler.depends_on`` for each of the provided events. * - NDepEvents - Size of the DepEvents list. .. rubric:: Returns: An opaque pointer to the ``sycl::event`` returned by the ``sycl::queue.submit()`` function. .. index:: pair: function; DPCTLQueue_Wait .. _doxid-d2/d22/group___queue_interface_1ga3411357b2a09bad80be5b4fee8a8ed44: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` void DPCTLQueue_Wait(:ref:`__dpctl_keep` const :ref:`DPCTLSyclQueueRef` QRef) Calls the ``sycl::queue::submit`` function to do a blocking wait on all enqueued tasks in the queue. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - QRef - Opaque pointer to a ``sycl::queue``.