@@ -364,24 +364,16 @@ class queue_impl {
364
364
const std::shared_ptr<queue_impl> &Self,
365
365
const SubmissionInfo &SubmitInfo,
366
366
const detail::code_location &Loc, bool IsTopCodeLoc) {
367
- if (SubmitInfo.SecondaryQueue ()) {
368
- event ResEvent;
369
- const std::shared_ptr<queue_impl> &SecondQueue =
370
- SubmitInfo.SecondaryQueue ();
371
- try {
372
- ResEvent = submit_impl (CGF, Self, Self, SecondQueue,
373
- /* CallerNeedsEvent=*/ true , Loc, IsTopCodeLoc,
374
- SubmitInfo);
375
- } catch (...) {
376
- ResEvent = SecondQueue->submit_impl (CGF, SecondQueue, Self, SecondQueue,
377
- /* CallerNeedsEvent=*/ true , Loc,
378
- IsTopCodeLoc, SubmitInfo);
379
- }
380
- return ResEvent;
381
- }
382
- event ResEvent =
383
- submit_impl (CGF, Self, Self, nullptr ,
384
- /* CallerNeedsEvent=*/ true , Loc, IsTopCodeLoc, SubmitInfo);
367
+
368
+ event ResEvent;
369
+ if (SubmitInfo.SecondaryQueue ())
370
+ ResEvent =
371
+ submit_impl (CGF, Self, Self, SubmitInfo.SecondaryQueue (),
372
+ /* CallerNeedsEvent=*/ true , Loc, IsTopCodeLoc, SubmitInfo);
373
+ else
374
+ ResEvent =
375
+ submit_impl (CGF, Self, Self, nullptr ,
376
+ /* CallerNeedsEvent=*/ true , Loc, IsTopCodeLoc, SubmitInfo);
385
377
return discard_or_return (ResEvent);
386
378
}
387
379
@@ -390,21 +382,12 @@ class queue_impl {
390
382
const SubmissionInfo &SubmitInfo,
391
383
const detail::code_location &Loc,
392
384
bool IsTopCodeLoc) {
393
- if (SubmitInfo.SecondaryQueue ()) {
394
- const std::shared_ptr<queue_impl> SecondQueue =
395
- SubmitInfo.SecondaryQueue ();
396
- try {
397
- submit_impl (CGF, Self, Self, SecondQueue,
398
- /* CallerNeedsEvent=*/ false , Loc, IsTopCodeLoc, SubmitInfo);
399
- } catch (...) {
400
- SecondQueue->submit_impl (CGF, SecondQueue, Self, SecondQueue,
401
- /* CallerNeedsEvent=*/ false , Loc, IsTopCodeLoc,
402
- SubmitInfo);
403
- }
404
- } else {
385
+ if (SubmitInfo.SecondaryQueue ())
386
+ submit_impl (CGF, Self, Self, SubmitInfo.SecondaryQueue (),
387
+ /* CallerNeedsEvent=*/ false , Loc, IsTopCodeLoc, SubmitInfo);
388
+ else
405
389
submit_impl (CGF, Self, Self, nullptr , /* CallerNeedsEvent=*/ false , Loc,
406
390
IsTopCodeLoc, SubmitInfo);
407
- }
408
391
}
409
392
410
393
// / Performs a blocking wait for the completion of all enqueued tasks in the
0 commit comments