35
35
36
36
#include "dppl_data_types.h"
37
37
#include "dppl_sycl_types.h"
38
+ #include "dppl_sycl_context_interface.h"
38
39
#include "dppl_sycl_device_interface.h"
39
40
#include "Support/DllExport.h"
40
41
#include "Support/ExternC.h"
@@ -63,7 +64,8 @@ __dppl_give DPPLSyclQueueRef DPPLQueueMgr_GetCurrentQueue ();
63
64
* raised if no such device exists.
64
65
*/
65
66
DPPL_API
66
- __dppl_give DPPLSyclQueueRef DPPLQueueMgr_GetQueue (DPPLSyclDeviceType DeviceTy ,
67
+ __dppl_give DPPLSyclQueueRef DPPLQueueMgr_GetQueue (DPPLSyclBEType BETy ,
68
+ DPPLSyclDeviceType DeviceTy ,
67
69
size_t DNum );
68
70
69
71
/*!
@@ -75,56 +77,59 @@ __dppl_give DPPLSyclQueueRef DPPLQueueMgr_GetQueue (DPPLSyclDeviceType DeviceTy,
75
77
DPPL_API
76
78
size_t DPPLQueueMgr_GetNumActivatedQueues ();
77
79
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 ();
85
80
86
81
/*!
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.
88
84
*
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.
90
88
*/
91
89
DPPL_API
92
- size_t DPPLQueueMgr_GetNumCPUQueues ();
90
+ size_t DPPLQueueMgr_GetNumQueues (DPPLSyclBEType BETy ,
91
+ DPPLSyclDeviceType DeviceTy );
93
92
94
93
/*!
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.
96
96
*
97
97
* If no such device is found the a runtime_error exception is thrown.
98
98
*
99
+ * @param BETy Type of Sycl backend.
99
100
* @param DeviceTy The type of Sycl device (sycl_device_type)
100
101
* @param DNum Device id for the device (defaults to 0)
101
102
*/
102
103
DPPL_API
103
- void DPPLQueueMgr_SetAsDefaultQueue (DPPLSyclDeviceType DeviceTy ,
104
+ void DPPLQueueMgr_SetAsDefaultQueue (DPPLSyclBEType BETy ,
105
+ DPPLSyclDeviceType DeviceTy ,
104
106
size_t DNum );
105
107
106
108
/*!
107
109
* @brief Pushes a new sycl::queue object to the top of DPPL's thread-local
108
110
* stack of a "activated" queues, and returns a copy of the queue to caller.
109
111
*
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
113
115
* DPPLQueueMgr_GetCurrentQueue(). DPPLPushSyclQueueToStack creates a new
114
116
* sycl::queue corresponding to the specified device and pushes it to the top
115
117
* of the stack. A copy of the sycl::queue is returned to the caller wrapped
116
118
* inside the opaque DPPLSyclQueueRef pointer. A runtime_error exception is
117
119
* thrown when a new sycl::queue could not be created for the specified device.
118
120
*
121
+ * @param BETy Type of Sycl backend.
119
122
* @param DeviceTy The type of Sycl device (sycl_device_type)
120
123
* @param DNum Device id for the device (defaults to 0)
121
124
*
122
125
* @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.
124
127
*/
125
128
DPPL_API
126
129
__dppl_give DPPLSyclQueueRef
127
- DPPLQueueMgr_PushQueue (DPPLSyclDeviceType DeviceTy , size_t DNum );
130
+ DPPLQueueMgr_PushQueue (DPPLSyclBEType BETy ,
131
+ DPPLSyclDeviceType DeviceTy ,
132
+ size_t DNum );
128
133
129
134
/*!
130
135
* @brief Pops the top of stack element from DPPL's stack of activated
0 commit comments