@@ -143,6 +143,9 @@ std::unique_ptr<property_list> create_property_list(int properties)
143
143
propList =
144
144
std::make_unique<property_list>(sycl::property::queue::in_order ());
145
145
}
146
+ else {
147
+ propList = std::make_unique<property_list>();
148
+ }
146
149
147
150
if (_prop) {
148
151
std::stringstream ss;
@@ -185,7 +188,7 @@ DPCTLQueue_Create(__dpctl_keep const DPCTLSyclContextRef CRef,
185
188
}
186
189
auto propList = create_property_list (properties);
187
190
188
- if (propList && handler) {
191
+ if (handler) {
189
192
try {
190
193
auto Queue = new queue (*ctx, *dev, DPCTL_AsyncErrorHandler (handler),
191
194
*propList);
@@ -194,26 +197,9 @@ DPCTLQueue_Create(__dpctl_keep const DPCTLSyclContextRef CRef,
194
197
error_handler (e, __FILE__, __func__, __LINE__);
195
198
}
196
199
}
197
- else if (properties) {
198
- try {
199
- auto Queue = new queue (*ctx, *dev, *propList);
200
- q = wrap<queue>(Queue);
201
- } catch (std::exception const &e) {
202
- error_handler (e, __FILE__, __func__, __LINE__);
203
- }
204
- }
205
- else if (handler) {
206
- try {
207
- auto Queue =
208
- new queue (*ctx, *dev, DPCTL_AsyncErrorHandler (handler));
209
- q = wrap<queue>(Queue);
210
- } catch (std::exception const &e) {
211
- error_handler (e, __FILE__, __func__, __LINE__);
212
- }
213
- }
214
200
else {
215
201
try {
216
- auto Queue = new queue (*ctx, *dev);
202
+ auto Queue = new queue (*ctx, *dev, *propList );
217
203
q = wrap<queue>(Queue);
218
204
} catch (std::exception const &e) {
219
205
error_handler (e, __FILE__, __func__, __LINE__);
0 commit comments