@@ -17,15 +17,11 @@ namespace sycl {
1717inline namespace _V1 {
1818namespace detail {
1919
20- static Command *getCommand (const EventImplPtr &Event) {
21- return (Command *)Event->getCommand ();
22- }
23-
2420void Scheduler::GraphProcessor::waitForEvent (const EventImplPtr &Event,
2521 ReadLockT &GraphReadLock,
2622 std::vector<Command *> &ToCleanUp,
2723 bool LockTheLock, bool *Success) {
28- Command *Cmd = getCommand (Event );
24+ Command *Cmd = Event-> getCommand ();
2925 // Command can be nullptr if user creates sycl::event explicitly or the
3026 // event has been waited on by another thread
3127 if (!Cmd)
@@ -87,7 +83,7 @@ bool Scheduler::GraphProcessor::enqueueCommand(
8783 // Recursively enqueue all the implicit + explicit backend level dependencies
8884 // first and exit immediately if any of the commands cannot be enqueued.
8985 for (const EventImplPtr &Event : Cmd->getPreparedDepsEvents ()) {
90- if (Command *DepCmd = static_cast <Command *>( Event->getCommand () ))
86+ if (Command *DepCmd = Event->getCommand ())
9187 if (!enqueueCommand (DepCmd, GraphReadLock, EnqueueResult, ToCleanUp,
9288 RootCommand, Blocking))
9389 return false ;
@@ -100,7 +96,7 @@ bool Scheduler::GraphProcessor::enqueueCommand(
10096 // MHostDepsEvents. TO FIX: implement enqueue of blocked commands on host task
10197 // completion stage and eliminate this event waiting in enqueue.
10298 for (const EventImplPtr &Event : Cmd->getPreparedHostDepsEvents ()) {
103- if (Command *DepCmd = static_cast <Command *>( Event->getCommand () ))
99+ if (Command *DepCmd = Event->getCommand ())
104100 if (!enqueueCommand (DepCmd, GraphReadLock, EnqueueResult, ToCleanUp,
105101 RootCommand, Blocking))
106102 return false ;
0 commit comments