3535
3636#include "dppl_data_types.h"
3737#include "dppl_sycl_types.h"
38+ #include "dppl_sycl_context_interface.h"
3839#include "dppl_sycl_device_interface.h"
3940#include "Support/DllExport.h"
4041#include "Support/ExternC.h"
@@ -63,7 +64,8 @@ __dppl_give DPPLSyclQueueRef DPPLQueueMgr_GetCurrentQueue ();
6364 * raised if no such device exists.
6465 */
6566DPPL_API
66- __dppl_give DPPLSyclQueueRef DPPLQueueMgr_GetQueue (DPPLSyclDeviceType DeviceTy ,
67+ __dppl_give DPPLSyclQueueRef DPPLQueueMgr_GetQueue (DPPLSyclBEType BETy ,
68+ DPPLSyclDeviceType DeviceTy ,
6769 size_t DNum );
6870
6971/*!
@@ -75,56 +77,59 @@ __dppl_give DPPLSyclQueueRef DPPLQueueMgr_GetQueue (DPPLSyclDeviceType DeviceTy,
7577DPPL_API
7678size_t DPPLQueueMgr_GetNumActivatedQueues ();
7779
78- /*!
79- * @brief Get the number of GPU queues available on the system.
80- *
81- * @return The number of available GPU queues.
82- */
83- DPPL_API
84- size_t DPPLQueueMgr_GetNumGPUQueues ();
8580
8681/*!
87- * @brief Get the number of CPU queues available on the system.
82+ * @brief Get the number of available queues for given backend and device type
83+ * combination.
8884 *
89- * @return The number of available CPU queues.
85+ * @param BETy Type of Sycl backend.
86+ * @param DeviceTy Type of Sycl device.
87+ * @return The number of available queues.
9088 */
9189DPPL_API
92- size_t DPPLQueueMgr_GetNumCPUQueues ();
90+ size_t DPPLQueueMgr_GetNumQueues (DPPLSyclBEType BETy ,
91+ DPPLSyclDeviceType DeviceTy );
9392
9493/*!
95- * @brief Set the default DPPL queue to the sycl::queue for the given device.
94+ * @brief Set the default DPPL queue to the sycl::queue for the given backend
95+ * and device type combination.
9696*
9797* If no such device is found the a runtime_error exception is thrown.
9898*
99+ * @param BETy Type of Sycl backend.
99100* @param DeviceTy The type of Sycl device (sycl_device_type)
100101* @param DNum Device id for the device (defaults to 0)
101102*/
102103DPPL_API
103- void DPPLQueueMgr_SetAsDefaultQueue (DPPLSyclDeviceType DeviceTy ,
104+ void DPPLQueueMgr_SetAsDefaultQueue (DPPLSyclBEType BETy ,
105+ DPPLSyclDeviceType DeviceTy ,
104106 size_t DNum );
105107
106108/*!
107109 * @brief Pushes a new sycl::queue object to the top of DPPL's thread-local
108110 * stack of a "activated" queues, and returns a copy of the queue to caller.
109111 *
110- * DPPL maintains a thread-local stack of sycl::queue objects to facilitate
111- * nested parallelism. The sycl::queue at the top of the stack is termed as the
112- * currently activated queue, and is always the one returned by
112+ * The DPPL queue manager maintains a thread-local stack of sycl::queue objects
113+ * to facilitate nested parallelism. The sycl::queue at the top of the stack is
114+ * termed as the currently activated queue, and is always the one returned by
113115 * DPPLQueueMgr_GetCurrentQueue(). DPPLPushSyclQueueToStack creates a new
114116 * sycl::queue corresponding to the specified device and pushes it to the top
115117 * of the stack. A copy of the sycl::queue is returned to the caller wrapped
116118 * inside the opaque DPPLSyclQueueRef pointer. A runtime_error exception is
117119 * thrown when a new sycl::queue could not be created for the specified device.
118120 *
121+ * @param BETy Type of Sycl backend.
119122 * @param DeviceTy The type of Sycl device (sycl_device_type)
120123 * @param DNum Device id for the device (defaults to 0)
121124 *
122125 * @return A copy of the sycl::queue that was pushed to the top of DPPL's
123- * stack of sycl::queue objects.
126+ * stack of sycl::queue objects. Nullptr is returned if no such device exists.
124127 */
125128DPPL_API
126129__dppl_give DPPLSyclQueueRef
127- DPPLQueueMgr_PushQueue (DPPLSyclDeviceType DeviceTy , size_t DNum );
130+ DPPLQueueMgr_PushQueue (DPPLSyclBEType BETy ,
131+ DPPLSyclDeviceType DeviceTy ,
132+ size_t DNum );
128133
129134/*!
130135 * @brief Pops the top of stack element from DPPL's stack of activated
0 commit comments