-
Notifications
You must be signed in to change notification settings - Fork 798
[NFCI][SYCL] Change scheduler::enqueueCommandForCG
to accept event_impl &
#19599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,31 +144,29 @@ EventImplPtr Scheduler::addCG( | |
} | ||
} | ||
|
||
enqueueCommandForCG(NewEvent, AuxiliaryCmds); | ||
enqueueCommandForCG(*NewEvent, AuxiliaryCmds); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Known non-null due to dereference at line 136. Closing |
||
|
||
if (!AuxiliaryResources.empty()) | ||
registerAuxiliaryResources(NewEvent, std::move(AuxiliaryResources)); | ||
|
||
return NewEvent; | ||
} | ||
|
||
void Scheduler::enqueueCommandForCG(EventImplPtr NewEvent, | ||
void Scheduler::enqueueCommandForCG(event_impl &Event, | ||
std::vector<Command *> &AuxiliaryCmds, | ||
BlockingT Blocking) { | ||
std::vector<Command *> ToCleanUp; | ||
{ | ||
ReadLockT Lock = acquireReadLock(); | ||
|
||
Command *NewCmd = (NewEvent) ? NewEvent->getCommand() : nullptr; | ||
Command *NewCmd = Event.getCommand(); | ||
|
||
EnqueueResultT Res; | ||
bool Enqueued; | ||
|
||
auto CleanUp = [&]() { | ||
if (NewCmd && (NewCmd->MDeps.size() == 0 && NewCmd->MUsers.size() == 0)) { | ||
if (NewEvent) { | ||
NewEvent->setCommand(nullptr); | ||
} | ||
Event.setCommand(nullptr); | ||
delete NewCmd; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This |
||
} | ||
cleanupCommands(ToCleanUp); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Known non-null due to dereference in line 283.