@@ -374,23 +374,9 @@ class queue_impl {
374
374
const std::shared_ptr<queue_impl> &Self,
375
375
const SubmissionInfo &SubmitInfo,
376
376
const detail::code_location &Loc, bool IsTopCodeLoc) {
377
- if (SubmitInfo.SecondaryQueue ()) {
378
- event ResEvent;
379
- const std::shared_ptr<queue_impl> &SecondQueue =
380
- SubmitInfo.SecondaryQueue ();
381
- try {
382
- ResEvent = submit_impl (CGF, Self, Self, SecondQueue,
383
- /* CallerNeedsEvent=*/ true , Loc, IsTopCodeLoc,
384
- SubmitInfo);
385
- } catch (...) {
386
- ResEvent = SecondQueue->submit_impl (CGF, SecondQueue, Self, SecondQueue,
387
- /* CallerNeedsEvent=*/ true , Loc,
388
- IsTopCodeLoc, SubmitInfo);
389
- }
390
- return ResEvent;
391
- }
377
+
392
378
event ResEvent =
393
- submit_impl (CGF, Self, Self, nullptr ,
379
+ submit_impl (CGF, Self, Self, SubmitInfo. SecondaryQueue () ,
394
380
/* CallerNeedsEvent=*/ true , Loc, IsTopCodeLoc, SubmitInfo);
395
381
return discard_or_return (ResEvent);
396
382
}
@@ -400,21 +386,8 @@ class queue_impl {
400
386
const SubmissionInfo &SubmitInfo,
401
387
const detail::code_location &Loc,
402
388
bool IsTopCodeLoc) {
403
- if (SubmitInfo.SecondaryQueue ()) {
404
- const std::shared_ptr<queue_impl> SecondQueue =
405
- SubmitInfo.SecondaryQueue ();
406
- try {
407
- submit_impl (CGF, Self, Self, SecondQueue,
408
- /* CallerNeedsEvent=*/ false , Loc, IsTopCodeLoc, SubmitInfo);
409
- } catch (...) {
410
- SecondQueue->submit_impl (CGF, SecondQueue, Self, SecondQueue,
411
- /* CallerNeedsEvent=*/ false , Loc, IsTopCodeLoc,
412
- SubmitInfo);
413
- }
414
- } else {
415
- submit_impl (CGF, Self, Self, nullptr , /* CallerNeedsEvent=*/ false , Loc,
416
- IsTopCodeLoc, SubmitInfo);
417
- }
389
+ submit_impl (CGF, Self, Self, SubmitInfo.SecondaryQueue (),
390
+ /* CallerNeedsEvent=*/ false , Loc, IsTopCodeLoc, SubmitInfo);
418
391
}
419
392
420
393
// / Performs a blocking wait for the completion of all enqueued tasks in the
0 commit comments